Run fsdgen.bat

This commit is contained in:
2024-05-24 22:45:38 -05:00
parent ee1e25ccec
commit e03f1a9dfc
20 changed files with 1174 additions and 1174 deletions

View File

@@ -1,33 +1,33 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationChangeSetDto : ServiceDto<ApplicationChangeSetDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationChangeSetDto()
{
}
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationChangeSetDto other)
{
return other != null;
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationChangeSetDto : ServiceDto<ApplicationChangeSetDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationChangeSetDto()
{
}
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationChangeSetDto other)
{
return other != null;
}
}
}

View File

@@ -1,60 +1,60 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationCreateSetDto : ServiceDto<ApplicationCreateSetDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationCreateSetDto()
{
}
/// <summary>
/// Terms a user must accept to start an application.
/// </summary>
public ApplicationTermsCreateSetDto Terms { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationCreateSetDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(Terms, other.Terms);
}
/// <summary>
/// Validates the DTO.
/// </summary>
public override bool Validate(out string errorMessage)
{
errorMessage = GetValidationErrorMessage();
return errorMessage == null;
}
private string GetValidationErrorMessage()
{
if (Terms == null)
return ServiceDataUtility.GetRequiredFieldErrorMessage("terms");
string errorMessage;
if (!ServiceDataUtility.ValidateFieldValue(Terms, "terms", out errorMessage))
return errorMessage;
return null;
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationCreateSetDto : ServiceDto<ApplicationCreateSetDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationCreateSetDto()
{
}
/// <summary>
/// Terms a user must accept to start an application.
/// </summary>
public ApplicationTermsCreateSetDto Terms { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationCreateSetDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(Terms, other.Terms);
}
/// <summary>
/// Validates the DTO.
/// </summary>
public override bool Validate(out string errorMessage)
{
errorMessage = GetValidationErrorMessage();
return errorMessage == null;
}
private string GetValidationErrorMessage()
{
if (Terms == null)
return ServiceDataUtility.GetRequiredFieldErrorMessage("terms");
string errorMessage;
if (!ServiceDataUtility.ValidateFieldValue(Terms, "terms", out errorMessage))
return errorMessage;
return null;
}
}
}

View File

@@ -1,54 +1,54 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// An application.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationDto : ServiceDto<ApplicationDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationDto()
{
}
/// <summary>
/// A unique identifier for the application.
/// </summary>
public string Id { get; set; }
/// <summary>
/// The current status of this application.
/// </summary>
public ApplicationStatus? Status { get; set; }
/// <summary>
/// Terms the user must accept to start, continue an accept an application.
/// </summary>
public ApplicationTermsDto Terms { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationDto other)
{
return other != null &&
Id == other.Id &&
Status == other.Status &&
ServiceDataUtility.AreEquivalentDtos(Terms, other.Terms);
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// An application.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationDto : ServiceDto<ApplicationDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationDto()
{
}
/// <summary>
/// A unique identifier for the application.
/// </summary>
public string Id { get; set; }
/// <summary>
/// The current status of this application.
/// </summary>
public ApplicationStatus? Status { get; set; }
/// <summary>
/// Terms the user must accept to start, continue an accept an application.
/// </summary>
public ApplicationTermsDto Terms { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationDto other)
{
return other != null &&
Id == other.Id &&
Status == other.Status &&
ServiceDataUtility.AreEquivalentDtos(Terms, other.Terms);
}
}
}

View File

@@ -1,112 +1,112 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
[Newtonsoft.Json.JsonConverter(typeof(ApplicationStatusJsonConverter))]
[System.Text.Json.Serialization.JsonConverter(typeof(ApplicationStatusSystemTextJsonConverter))]
public partial struct ApplicationStatus : IEquatable<ApplicationStatus>
{
public static readonly ApplicationStatus InProgress = new ApplicationStatus(Strings.InProgress);
public static readonly ApplicationStatus Submitted = new ApplicationStatus(Strings.Submitted);
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationStatus(string value) => m_value = value;
/// <summary>
/// Converts the instance to a string.
/// </summary>
public override string ToString() => m_value != null && s_valueCache.TryGetValue(m_value, out var cachedValue) ? cachedValue : m_value ?? "";
/// <summary>
/// Checks for equality.
/// </summary>
public bool Equals(ApplicationStatus other) => StringComparer.OrdinalIgnoreCase.Equals(m_value ?? "", other.m_value ?? "");
/// <summary>
/// Checks for equality.
/// </summary>
public override bool Equals(object obj) => obj is ApplicationStatus && Equals((ApplicationStatus) obj);
/// <summary>
/// Gets the hash code.
/// </summary>
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(m_value ?? "");
/// <summary>
/// Checks for equality.
/// </summary>
public static bool operator ==(ApplicationStatus left, ApplicationStatus right) => left.Equals(right);
/// <summary>
/// Checks for inequality.
/// </summary>
public static bool operator !=(ApplicationStatus left, ApplicationStatus right) => !left.Equals(right);
/// <summary>
/// Returns true if the instance is equal to one of the defined values.
/// </summary>
public bool IsDefined() => m_value != null && s_valueCache.ContainsKey(m_value);
/// <summary>
/// Returns all of the defined values.
/// </summary>
public static IReadOnlyList<ApplicationStatus> GetValues() => s_values;
/// <summary>
/// Provides string constants for defined values.
/// </summary>
public static class Strings
{
public const string InProgress = "InProgress";
public const string Submitted = "Submitted";
}
/// <summary>
/// Used for serialization.
/// </summary>
public sealed class ApplicationStatusJsonConverter : ServiceEnumJsonConverter<ApplicationStatus>
{
/// <summary>
/// Creates the value from a string.
/// </summary>
protected override ApplicationStatus CreateCore(string value) => new ApplicationStatus(value);
}
/// <summary>
/// Used for serialization.
/// </summary>
public sealed class ApplicationStatusSystemTextJsonConverter : ServiceEnumSystemTextJsonConverter<ApplicationStatus>
{
/// <summary>
/// Creates the value from a string.
/// </summary>
protected override ApplicationStatus CreateCore(string value) => new ApplicationStatus(value);
}
private static readonly ReadOnlyCollection<ApplicationStatus> s_values = new ReadOnlyCollection<ApplicationStatus>(
new[]
{
InProgress,
Submitted,
});
private static readonly IReadOnlyDictionary<string, string> s_valueCache = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
{
{ Strings.InProgress, Strings.InProgress },
{ Strings.Submitted, Strings.Submitted },
};
private readonly string m_value;
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
[Newtonsoft.Json.JsonConverter(typeof(ApplicationStatusJsonConverter))]
[System.Text.Json.Serialization.JsonConverter(typeof(ApplicationStatusSystemTextJsonConverter))]
public partial struct ApplicationStatus : IEquatable<ApplicationStatus>
{
public static readonly ApplicationStatus InProgress = new ApplicationStatus(Strings.InProgress);
public static readonly ApplicationStatus Submitted = new ApplicationStatus(Strings.Submitted);
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationStatus(string value) => m_value = value;
/// <summary>
/// Converts the instance to a string.
/// </summary>
public override string ToString() => m_value != null && s_valueCache.TryGetValue(m_value, out var cachedValue) ? cachedValue : m_value ?? "";
/// <summary>
/// Checks for equality.
/// </summary>
public bool Equals(ApplicationStatus other) => StringComparer.OrdinalIgnoreCase.Equals(m_value ?? "", other.m_value ?? "");
/// <summary>
/// Checks for equality.
/// </summary>
public override bool Equals(object obj) => obj is ApplicationStatus && Equals((ApplicationStatus) obj);
/// <summary>
/// Gets the hash code.
/// </summary>
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(m_value ?? "");
/// <summary>
/// Checks for equality.
/// </summary>
public static bool operator ==(ApplicationStatus left, ApplicationStatus right) => left.Equals(right);
/// <summary>
/// Checks for inequality.
/// </summary>
public static bool operator !=(ApplicationStatus left, ApplicationStatus right) => !left.Equals(right);
/// <summary>
/// Returns true if the instance is equal to one of the defined values.
/// </summary>
public bool IsDefined() => m_value != null && s_valueCache.ContainsKey(m_value);
/// <summary>
/// Returns all of the defined values.
/// </summary>
public static IReadOnlyList<ApplicationStatus> GetValues() => s_values;
/// <summary>
/// Provides string constants for defined values.
/// </summary>
public static class Strings
{
public const string InProgress = "InProgress";
public const string Submitted = "Submitted";
}
/// <summary>
/// Used for serialization.
/// </summary>
public sealed class ApplicationStatusJsonConverter : ServiceEnumJsonConverter<ApplicationStatus>
{
/// <summary>
/// Creates the value from a string.
/// </summary>
protected override ApplicationStatus CreateCore(string value) => new ApplicationStatus(value);
}
/// <summary>
/// Used for serialization.
/// </summary>
public sealed class ApplicationStatusSystemTextJsonConverter : ServiceEnumSystemTextJsonConverter<ApplicationStatus>
{
/// <summary>
/// Creates the value from a string.
/// </summary>
protected override ApplicationStatus CreateCore(string value) => new ApplicationStatus(value);
}
private static readonly ReadOnlyCollection<ApplicationStatus> s_values = new ReadOnlyCollection<ApplicationStatus>(
new[]
{
InProgress,
Submitted,
});
private static readonly IReadOnlyDictionary<string, string> s_valueCache = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
{
{ Strings.InProgress, Strings.InProgress },
{ Strings.Submitted, Strings.Submitted },
};
private readonly string m_value;
}
}

View File

@@ -1,53 +1,53 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationTermsCreateSetDto : ServiceDto<ApplicationTermsCreateSetDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationTermsCreateSetDto()
{
}
public bool? HasReadInstructions { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationTermsCreateSetDto other)
{
return other != null &&
HasReadInstructions == other.HasReadInstructions;
}
/// <summary>
/// Validates the DTO.
/// </summary>
public override bool Validate(out string errorMessage)
{
errorMessage = GetValidationErrorMessage();
return errorMessage == null;
}
private string GetValidationErrorMessage()
{
if (HasReadInstructions == null)
return ServiceDataUtility.GetRequiredFieldErrorMessage("hasReadInstructions");
return null;
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationTermsCreateSetDto : ServiceDto<ApplicationTermsCreateSetDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationTermsCreateSetDto()
{
}
public bool? HasReadInstructions { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationTermsCreateSetDto other)
{
return other != null &&
HasReadInstructions == other.HasReadInstructions;
}
/// <summary>
/// Validates the DTO.
/// </summary>
public override bool Validate(out string errorMessage)
{
errorMessage = GetValidationErrorMessage();
return errorMessage == null;
}
private string GetValidationErrorMessage()
{
if (HasReadInstructions == null)
return ServiceDataUtility.GetRequiredFieldErrorMessage("hasReadInstructions");
return null;
}
}
}

View File

@@ -1,36 +1,36 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationTermsDto : ServiceDto<ApplicationTermsDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationTermsDto()
{
}
public bool? HasReadInstructions { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationTermsDto other)
{
return other != null &&
HasReadInstructions == other.HasReadInstructions;
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class ApplicationTermsDto : ServiceDto<ApplicationTermsDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public ApplicationTermsDto()
{
}
public bool? HasReadInstructions { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(ApplicationTermsDto other)
{
return other != null &&
HasReadInstructions == other.HasReadInstructions;
}
}
}

View File

@@ -1,60 +1,60 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Request for CreateApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class CreateApplicationRequestDto : ServiceDto<CreateApplicationRequestDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public CreateApplicationRequestDto()
{
}
/// <summary>
/// The application to create.
/// </summary>
public ApplicationCreateSetDto ApplicationCreateSet { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(CreateApplicationRequestDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(ApplicationCreateSet, other.ApplicationCreateSet);
}
/// <summary>
/// Validates the DTO.
/// </summary>
public override bool Validate(out string errorMessage)
{
errorMessage = GetValidationErrorMessage();
return errorMessage == null;
}
private string GetValidationErrorMessage()
{
string errorMessage;
if (!ServiceDataUtility.ValidateFieldValue(ApplicationCreateSet, "applicationCreateSet", out errorMessage))
return errorMessage;
return null;
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Request for CreateApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class CreateApplicationRequestDto : ServiceDto<CreateApplicationRequestDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public CreateApplicationRequestDto()
{
}
/// <summary>
/// The application to create.
/// </summary>
public ApplicationCreateSetDto ApplicationCreateSet { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(CreateApplicationRequestDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(ApplicationCreateSet, other.ApplicationCreateSet);
}
/// <summary>
/// Validates the DTO.
/// </summary>
public override bool Validate(out string errorMessage)
{
errorMessage = GetValidationErrorMessage();
return errorMessage == null;
}
private string GetValidationErrorMessage()
{
string errorMessage;
if (!ServiceDataUtility.ValidateFieldValue(ApplicationCreateSet, "applicationCreateSet", out errorMessage))
return errorMessage;
return null;
}
}
}

View File

@@ -1,42 +1,42 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Response for CreateApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class CreateApplicationResponseDto : ServiceDto<CreateApplicationResponseDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public CreateApplicationResponseDto()
{
}
/// <summary>
/// The created application.
/// </summary>
public ApplicationDto Application { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(CreateApplicationResponseDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(Application, other.Application);
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Response for CreateApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class CreateApplicationResponseDto : ServiceDto<CreateApplicationResponseDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public CreateApplicationResponseDto()
{
}
/// <summary>
/// The created application.
/// </summary>
public ApplicationDto Application { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(CreateApplicationResponseDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(Application, other.Application);
}
}
}

View File

@@ -1,49 +1,49 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Threading;
using System.Threading.Tasks;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// A delegating implementation of OapApiV1.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public partial class DelegatingOapApiV1 : IOapApiV1
{
/// <summary>
/// Creates an instance with the specified delegator.
/// </summary>
public DelegatingOapApiV1(ServiceDelegator delegator) =>
m_delegator = delegator ?? throw new ArgumentNullException(nameof(delegator));
/// <summary>
/// Gets applications for the current user.
/// </summary>
public virtual async Task<ServiceResult<GetApplicationsResponseDto>> GetApplicationsAsync(GetApplicationsRequestDto request, CancellationToken cancellationToken = default) =>
(await m_delegator(OapApiV1Methods.GetApplications, request, cancellationToken).ConfigureAwait(false)).Cast<GetApplicationsResponseDto>();
/// <summary>
/// Creates a new application for the current user.
/// </summary>
public virtual async Task<ServiceResult<CreateApplicationResponseDto>> CreateApplicationAsync(CreateApplicationRequestDto request, CancellationToken cancellationToken = default) =>
(await m_delegator(OapApiV1Methods.CreateApplication, request, cancellationToken).ConfigureAwait(false)).Cast<CreateApplicationResponseDto>();
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
public virtual async Task<ServiceResult<GetApplicationResponseDto>> GetApplicationAsync(GetApplicationRequestDto request, CancellationToken cancellationToken = default) =>
(await m_delegator(OapApiV1Methods.GetApplication, request, cancellationToken).ConfigureAwait(false)).Cast<GetApplicationResponseDto>();
/// <summary>
/// Updates the application.
/// </summary>
public virtual async Task<ServiceResult<UpdateApplicationResponseDto>> UpdateApplicationAsync(UpdateApplicationRequestDto request, CancellationToken cancellationToken = default) =>
(await m_delegator(OapApiV1Methods.UpdateApplication, request, cancellationToken).ConfigureAwait(false)).Cast<UpdateApplicationResponseDto>();
private readonly ServiceDelegator m_delegator;
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Threading;
using System.Threading.Tasks;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// A delegating implementation of OapApiV1.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public partial class DelegatingOapApiV1 : IOapApiV1
{
/// <summary>
/// Creates an instance with the specified delegator.
/// </summary>
public DelegatingOapApiV1(ServiceDelegator delegator) =>
m_delegator = delegator ?? throw new ArgumentNullException(nameof(delegator));
/// <summary>
/// Gets applications for the current user.
/// </summary>
public virtual async Task<ServiceResult<GetApplicationsResponseDto>> GetApplicationsAsync(GetApplicationsRequestDto request, CancellationToken cancellationToken = default) =>
(await m_delegator(OapApiV1Methods.GetApplications, request, cancellationToken).ConfigureAwait(false)).Cast<GetApplicationsResponseDto>();
/// <summary>
/// Creates a new application for the current user.
/// </summary>
public virtual async Task<ServiceResult<CreateApplicationResponseDto>> CreateApplicationAsync(CreateApplicationRequestDto request, CancellationToken cancellationToken = default) =>
(await m_delegator(OapApiV1Methods.CreateApplication, request, cancellationToken).ConfigureAwait(false)).Cast<CreateApplicationResponseDto>();
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
public virtual async Task<ServiceResult<GetApplicationResponseDto>> GetApplicationAsync(GetApplicationRequestDto request, CancellationToken cancellationToken = default) =>
(await m_delegator(OapApiV1Methods.GetApplication, request, cancellationToken).ConfigureAwait(false)).Cast<GetApplicationResponseDto>();
/// <summary>
/// Updates the application.
/// </summary>
public virtual async Task<ServiceResult<UpdateApplicationResponseDto>> UpdateApplicationAsync(UpdateApplicationRequestDto request, CancellationToken cancellationToken = default) =>
(await m_delegator(OapApiV1Methods.UpdateApplication, request, cancellationToken).ConfigureAwait(false)).Cast<UpdateApplicationResponseDto>();
private readonly ServiceDelegator m_delegator;
}
}

View File

@@ -1,42 +1,42 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Request for GetApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class GetApplicationRequestDto : ServiceDto<GetApplicationRequestDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public GetApplicationRequestDto()
{
}
/// <summary>
/// The widget ID.
/// </summary>
public string Id { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(GetApplicationRequestDto other)
{
return other != null &&
Id == other.Id;
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Request for GetApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class GetApplicationRequestDto : ServiceDto<GetApplicationRequestDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public GetApplicationRequestDto()
{
}
/// <summary>
/// The widget ID.
/// </summary>
public string Id { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(GetApplicationRequestDto other)
{
return other != null &&
Id == other.Id;
}
}
}

View File

@@ -1,48 +1,48 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Response for GetApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class GetApplicationResponseDto : ServiceDto<GetApplicationResponseDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public GetApplicationResponseDto()
{
}
/// <summary>
/// The requested widget.
/// </summary>
public ApplicationDto Application { get; set; }
public string ETag { get; set; }
public bool? NotModified { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(GetApplicationResponseDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(Application, other.Application) &&
ETag == other.ETag &&
NotModified == other.NotModified;
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Response for GetApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class GetApplicationResponseDto : ServiceDto<GetApplicationResponseDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public GetApplicationResponseDto()
{
}
/// <summary>
/// The requested widget.
/// </summary>
public ApplicationDto Application { get; set; }
public string ETag { get; set; }
public bool? NotModified { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(GetApplicationResponseDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(Application, other.Application) &&
ETag == other.ETag &&
NotModified == other.NotModified;
}
}
}

View File

@@ -1,54 +1,54 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Request for GetApplications.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class GetApplicationsRequestDto : ServiceDto<GetApplicationsRequestDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public GetApplicationsRequestDto()
{
}
/// <summary>
/// Filter applications by the given status.
/// </summary>
public ApplicationStatus? Status { get; set; }
/// <summary>
/// The limit of returned results.
/// </summary>
public int? Limit { get; set; }
/// <summary>
/// The token presenting the next page of applications to get.
/// </summary>
public string NextToken { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(GetApplicationsRequestDto other)
{
return other != null &&
Status == other.Status &&
Limit == other.Limit &&
NextToken == other.NextToken;
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Request for GetApplications.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class GetApplicationsRequestDto : ServiceDto<GetApplicationsRequestDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public GetApplicationsRequestDto()
{
}
/// <summary>
/// Filter applications by the given status.
/// </summary>
public ApplicationStatus? Status { get; set; }
/// <summary>
/// The limit of returned results.
/// </summary>
public int? Limit { get; set; }
/// <summary>
/// The token presenting the next page of applications to get.
/// </summary>
public string NextToken { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(GetApplicationsRequestDto other)
{
return other != null &&
Status == other.Status &&
Limit == other.Limit &&
NextToken == other.NextToken;
}
}
}

View File

@@ -1,60 +1,60 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Response for GetApplications.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class GetApplicationsResponseDto : ServiceDto<GetApplicationsResponseDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public GetApplicationsResponseDto()
{
}
/// <summary>
/// The applications.
/// </summary>
public IReadOnlyList<ApplicationDto> Applications { get; set; }
/// <summary>
/// The total number of applications.
/// </summary>
public long? Total { get; set; }
/// <summary>
/// The token representing the next page of results.
/// </summary>
public string NextToken { get; set; }
/// <summary>
/// True if this is the last page of results, false otherwise.
/// </summary>
public bool? IsLastPage { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(GetApplicationsResponseDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentFieldValues(Applications, other.Applications) &&
Total == other.Total &&
NextToken == other.NextToken &&
IsLastPage == other.IsLastPage;
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Response for GetApplications.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class GetApplicationsResponseDto : ServiceDto<GetApplicationsResponseDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public GetApplicationsResponseDto()
{
}
/// <summary>
/// The applications.
/// </summary>
public IReadOnlyList<ApplicationDto> Applications { get; set; }
/// <summary>
/// The total number of applications.
/// </summary>
public long? Total { get; set; }
/// <summary>
/// The token representing the next page of results.
/// </summary>
public string NextToken { get; set; }
/// <summary>
/// True if this is the last page of results, false otherwise.
/// </summary>
public bool? IsLastPage { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(GetApplicationsResponseDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentFieldValues(Applications, other.Applications) &&
Total == other.Total &&
NextToken == other.NextToken &&
IsLastPage == other.IsLastPage;
}
}
}

View File

@@ -1,53 +1,53 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Threading;
using System.Threading.Tasks;
using Facility.Core;
using Facility.Core.Http;
namespace Oap.Api.v1.Http
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class HttpClientOapApiV1 : HttpClientService, IOapApiV1
{
/// <summary>
/// Creates the service.
/// </summary>
public HttpClientOapApiV1(HttpClientServiceSettings settings = null)
: base(settings, s_defaults)
{
}
/// <summary>
/// Gets applications for the current user.
/// </summary>
public Task<ServiceResult<GetApplicationsResponseDto>> GetApplicationsAsync(GetApplicationsRequestDto request, CancellationToken cancellationToken = default) =>
TrySendRequestAsync(OapApiV1HttpMapping.GetApplicationsMapping, request, cancellationToken);
/// <summary>
/// Creates a new application for the current user.
/// </summary>
public Task<ServiceResult<CreateApplicationResponseDto>> CreateApplicationAsync(CreateApplicationRequestDto request, CancellationToken cancellationToken = default) =>
TrySendRequestAsync(OapApiV1HttpMapping.CreateApplicationMapping, request, cancellationToken);
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
public Task<ServiceResult<GetApplicationResponseDto>> GetApplicationAsync(GetApplicationRequestDto request, CancellationToken cancellationToken = default) =>
TrySendRequestAsync(OapApiV1HttpMapping.GetApplicationMapping, request, cancellationToken);
/// <summary>
/// Updates the application.
/// </summary>
public Task<ServiceResult<UpdateApplicationResponseDto>> UpdateApplicationAsync(UpdateApplicationRequestDto request, CancellationToken cancellationToken = default) =>
TrySendRequestAsync(OapApiV1HttpMapping.UpdateApplicationMapping, request, cancellationToken);
private static readonly HttpClientServiceDefaults s_defaults = new HttpClientServiceDefaults
{
BaseUri = new Uri("https://oaprotection.org/api/v1"),
ContentSerializer = HttpContentSerializer.Create(SystemTextJsonServiceSerializer.Instance),
};
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Threading;
using System.Threading.Tasks;
using Facility.Core;
using Facility.Core.Http;
namespace Oap.Api.v1.Http
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class HttpClientOapApiV1 : HttpClientService, IOapApiV1
{
/// <summary>
/// Creates the service.
/// </summary>
public HttpClientOapApiV1(HttpClientServiceSettings settings = null)
: base(settings, s_defaults)
{
}
/// <summary>
/// Gets applications for the current user.
/// </summary>
public Task<ServiceResult<GetApplicationsResponseDto>> GetApplicationsAsync(GetApplicationsRequestDto request, CancellationToken cancellationToken = default) =>
TrySendRequestAsync(OapApiV1HttpMapping.GetApplicationsMapping, request, cancellationToken);
/// <summary>
/// Creates a new application for the current user.
/// </summary>
public Task<ServiceResult<CreateApplicationResponseDto>> CreateApplicationAsync(CreateApplicationRequestDto request, CancellationToken cancellationToken = default) =>
TrySendRequestAsync(OapApiV1HttpMapping.CreateApplicationMapping, request, cancellationToken);
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
public Task<ServiceResult<GetApplicationResponseDto>> GetApplicationAsync(GetApplicationRequestDto request, CancellationToken cancellationToken = default) =>
TrySendRequestAsync(OapApiV1HttpMapping.GetApplicationMapping, request, cancellationToken);
/// <summary>
/// Updates the application.
/// </summary>
public Task<ServiceResult<UpdateApplicationResponseDto>> UpdateApplicationAsync(UpdateApplicationRequestDto request, CancellationToken cancellationToken = default) =>
TrySendRequestAsync(OapApiV1HttpMapping.UpdateApplicationMapping, request, cancellationToken);
private static readonly HttpClientServiceDefaults s_defaults = new HttpClientServiceDefaults
{
BaseUri = new Uri("https://oaprotection.org/api/v1"),
ContentSerializer = HttpContentSerializer.Create(SystemTextJsonServiceSerializer.Instance),
};
}
}

View File

@@ -1,80 +1,80 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Facility.Core;
using Facility.Core.Http;
namespace Oap.Api.v1.Http
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class OapApiV1HttpHandler : ServiceHttpHandler
{
/// <summary>
/// Creates the handler.
/// </summary>
public OapApiV1HttpHandler(IOapApiV1 service, ServiceHttpHandlerSettings settings = null)
: base(settings, s_defaults)
{
m_service = service ?? throw new ArgumentNullException(nameof(service));
}
/// <summary>
/// Creates the handler.
/// </summary>
public OapApiV1HttpHandler(Func<HttpRequestMessage, IOapApiV1> getService, ServiceHttpHandlerSettings settings = null)
: base(settings, s_defaults)
{
m_getService = getService ?? throw new ArgumentNullException(nameof(getService));
}
/// <summary>
/// Attempts to handle the HTTP request.
/// </summary>
public override async Task<HttpResponseMessage> TryHandleHttpRequestAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default)
{
return await AdaptTask(TryHandleGetApplicationsAsync(httpRequest, cancellationToken)).ConfigureAwait(true) ??
await AdaptTask(TryHandleCreateApplicationAsync(httpRequest, cancellationToken)).ConfigureAwait(true) ??
await AdaptTask(TryHandleGetApplicationAsync(httpRequest, cancellationToken)).ConfigureAwait(true) ??
await AdaptTask(TryHandleUpdateApplicationAsync(httpRequest, cancellationToken)).ConfigureAwait(true);
}
/// <summary>
/// Gets applications for the current user.
/// </summary>
public Task<HttpResponseMessage> TryHandleGetApplicationsAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default) =>
TryHandleServiceMethodAsync(OapApiV1HttpMapping.GetApplicationsMapping, httpRequest, GetService(httpRequest).GetApplicationsAsync, cancellationToken);
/// <summary>
/// Creates a new application for the current user.
/// </summary>
public Task<HttpResponseMessage> TryHandleCreateApplicationAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default) =>
TryHandleServiceMethodAsync(OapApiV1HttpMapping.CreateApplicationMapping, httpRequest, GetService(httpRequest).CreateApplicationAsync, cancellationToken);
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
public Task<HttpResponseMessage> TryHandleGetApplicationAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default) =>
TryHandleServiceMethodAsync(OapApiV1HttpMapping.GetApplicationMapping, httpRequest, GetService(httpRequest).GetApplicationAsync, cancellationToken);
/// <summary>
/// Updates the application.
/// </summary>
public Task<HttpResponseMessage> TryHandleUpdateApplicationAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default) =>
TryHandleServiceMethodAsync(OapApiV1HttpMapping.UpdateApplicationMapping, httpRequest, GetService(httpRequest).UpdateApplicationAsync, cancellationToken);
private IOapApiV1 GetService(HttpRequestMessage httpRequest) => m_service ?? m_getService(httpRequest);
private static readonly ServiceHttpHandlerDefaults s_defaults = new ServiceHttpHandlerDefaults
{
ContentSerializer = HttpContentSerializer.Create(SystemTextJsonServiceSerializer.Instance),
};
private readonly IOapApiV1 m_service;
private readonly Func<HttpRequestMessage, IOapApiV1> m_getService;
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Facility.Core;
using Facility.Core.Http;
namespace Oap.Api.v1.Http
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class OapApiV1HttpHandler : ServiceHttpHandler
{
/// <summary>
/// Creates the handler.
/// </summary>
public OapApiV1HttpHandler(IOapApiV1 service, ServiceHttpHandlerSettings settings = null)
: base(settings, s_defaults)
{
m_service = service ?? throw new ArgumentNullException(nameof(service));
}
/// <summary>
/// Creates the handler.
/// </summary>
public OapApiV1HttpHandler(Func<HttpRequestMessage, IOapApiV1> getService, ServiceHttpHandlerSettings settings = null)
: base(settings, s_defaults)
{
m_getService = getService ?? throw new ArgumentNullException(nameof(getService));
}
/// <summary>
/// Attempts to handle the HTTP request.
/// </summary>
public override async Task<HttpResponseMessage> TryHandleHttpRequestAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default)
{
return await AdaptTask(TryHandleGetApplicationsAsync(httpRequest, cancellationToken)).ConfigureAwait(true) ??
await AdaptTask(TryHandleCreateApplicationAsync(httpRequest, cancellationToken)).ConfigureAwait(true) ??
await AdaptTask(TryHandleGetApplicationAsync(httpRequest, cancellationToken)).ConfigureAwait(true) ??
await AdaptTask(TryHandleUpdateApplicationAsync(httpRequest, cancellationToken)).ConfigureAwait(true);
}
/// <summary>
/// Gets applications for the current user.
/// </summary>
public Task<HttpResponseMessage> TryHandleGetApplicationsAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default) =>
TryHandleServiceMethodAsync(OapApiV1HttpMapping.GetApplicationsMapping, httpRequest, GetService(httpRequest).GetApplicationsAsync, cancellationToken);
/// <summary>
/// Creates a new application for the current user.
/// </summary>
public Task<HttpResponseMessage> TryHandleCreateApplicationAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default) =>
TryHandleServiceMethodAsync(OapApiV1HttpMapping.CreateApplicationMapping, httpRequest, GetService(httpRequest).CreateApplicationAsync, cancellationToken);
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
public Task<HttpResponseMessage> TryHandleGetApplicationAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default) =>
TryHandleServiceMethodAsync(OapApiV1HttpMapping.GetApplicationMapping, httpRequest, GetService(httpRequest).GetApplicationAsync, cancellationToken);
/// <summary>
/// Updates the application.
/// </summary>
public Task<HttpResponseMessage> TryHandleUpdateApplicationAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default) =>
TryHandleServiceMethodAsync(OapApiV1HttpMapping.UpdateApplicationMapping, httpRequest, GetService(httpRequest).UpdateApplicationAsync, cancellationToken);
private IOapApiV1 GetService(HttpRequestMessage httpRequest) => m_service ?? m_getService(httpRequest);
private static readonly ServiceHttpHandlerDefaults s_defaults = new ServiceHttpHandlerDefaults
{
ContentSerializer = HttpContentSerializer.Create(SystemTextJsonServiceSerializer.Instance),
};
private readonly IOapApiV1 m_service;
private readonly Func<HttpRequestMessage, IOapApiV1> m_getService;
}
}

View File

@@ -1,186 +1,186 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Net;
using System.Net.Http;
using Facility.Core;
using Facility.Core.Http;
#pragma warning disable 612, 618 // member is obsolete
namespace Oap.Api.v1.Http
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public static partial class OapApiV1HttpMapping
{
/// <summary>
/// Gets applications for the current user.
/// </summary>
public static readonly HttpMethodMapping<GetApplicationsRequestDto, GetApplicationsResponseDto> GetApplicationsMapping =
new HttpMethodMapping<GetApplicationsRequestDto, GetApplicationsResponseDto>.Builder
{
HttpMethod = HttpMethod.Get,
Path = "/applications",
GetUriParameters = request =>
new Dictionary<string, string>
{
{ "status", request.Status == null ? null : request.Status.Value.ToString() },
{ "limit", request.Limit == null ? null : request.Limit.Value.ToString(CultureInfo.InvariantCulture) },
{ "nextToken", request.NextToken },
},
SetUriParameters = (request, parameters) =>
{
parameters.TryGetValue("status", out var queryParameterStatus);
request.Status = queryParameterStatus == null ? default(ApplicationStatus?) : new ApplicationStatus(queryParameterStatus);
parameters.TryGetValue("limit", out var queryParameterLimit);
request.Limit = ServiceDataUtility.TryParseInt32(queryParameterLimit);
parameters.TryGetValue("nextToken", out var queryParameterNextToken);
request.NextToken = queryParameterNextToken;
return request;
},
ResponseMappings =
{
new HttpResponseMapping<GetApplicationsResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 200,
ResponseBodyType = typeof(GetApplicationsResponseDto),
}.Build(),
},
}.Build();
/// <summary>
/// Creates a new application for the current user.
/// </summary>
public static readonly HttpMethodMapping<CreateApplicationRequestDto, CreateApplicationResponseDto> CreateApplicationMapping =
new HttpMethodMapping<CreateApplicationRequestDto, CreateApplicationResponseDto>.Builder
{
HttpMethod = HttpMethod.Post,
Path = "/applications/",
ValidateRequest = request =>
{
if (request.ApplicationCreateSet == null)
return ServiceResult.Failure(ServiceErrors.CreateRequestFieldRequired("applicationCreateSet"));
return ServiceResult.Success();
},
RequestBodyType = typeof(ApplicationCreateSetDto),
GetRequestBody = request => request.ApplicationCreateSet,
CreateRequest = body => new CreateApplicationRequestDto { ApplicationCreateSet = (ApplicationCreateSetDto) body },
ResponseMappings =
{
new HttpResponseMapping<CreateApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 200,
ResponseBodyType = typeof(ApplicationDto),
MatchesResponse = response => response.Application != null,
GetResponseBody = response => response.Application,
CreateResponse = body => new CreateApplicationResponseDto { Application = (ApplicationDto) body },
}.Build(),
new HttpResponseMapping<CreateApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 201,
}.Build(),
},
}.Build();
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
public static readonly HttpMethodMapping<GetApplicationRequestDto, GetApplicationResponseDto> GetApplicationMapping =
new HttpMethodMapping<GetApplicationRequestDto, GetApplicationResponseDto>.Builder
{
HttpMethod = HttpMethod.Get,
Path = "/applications/{id}",
ValidateRequest = request =>
{
if (string.IsNullOrEmpty(request.Id))
return ServiceResult.Failure(ServiceErrors.CreateRequestFieldRequired("id"));
return ServiceResult.Success();
},
GetUriParameters = request =>
new Dictionary<string, string>
{
{ "id", request.Id },
},
SetUriParameters = (request, parameters) =>
{
parameters.TryGetValue("id", out var queryParameterId);
request.Id = queryParameterId;
return request;
},
ResponseMappings =
{
new HttpResponseMapping<GetApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 200,
ResponseBodyType = typeof(ApplicationDto),
MatchesResponse = response => response.Application != null,
GetResponseBody = response => response.Application,
CreateResponse = body => new GetApplicationResponseDto { Application = (ApplicationDto) body },
}.Build(),
new HttpResponseMapping<GetApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 304,
MatchesResponse = response => response.NotModified.GetValueOrDefault(),
CreateResponse = body => new GetApplicationResponseDto { NotModified = true },
}.Build(),
},
GetResponseHeaders = response =>
new Dictionary<string, string>
{
["eTag"] = response.ETag,
},
SetResponseHeaders = (response, headers) =>
{
headers.TryGetValue("eTag", out var headerETag);
response.ETag = headerETag;
return response;
},
}.Build();
/// <summary>
/// Updates the application.
/// </summary>
public static readonly HttpMethodMapping<UpdateApplicationRequestDto, UpdateApplicationResponseDto> UpdateApplicationMapping =
new HttpMethodMapping<UpdateApplicationRequestDto, UpdateApplicationResponseDto>.Builder
{
HttpMethod = new HttpMethod("PATCH"),
Path = "/applications/{id}",
ValidateRequest = request =>
{
if (string.IsNullOrEmpty(request.Id))
return ServiceResult.Failure(ServiceErrors.CreateRequestFieldRequired("id"));
if (request.ApplicationChangeSet == null)
return ServiceResult.Failure(ServiceErrors.CreateRequestFieldRequired("applicationChangeSet"));
return ServiceResult.Success();
},
GetUriParameters = request =>
new Dictionary<string, string>
{
{ "id", request.Id },
},
SetUriParameters = (request, parameters) =>
{
parameters.TryGetValue("id", out var queryParameterId);
request.Id = queryParameterId;
return request;
},
RequestBodyType = typeof(ApplicationChangeSetDto),
GetRequestBody = request => request.ApplicationChangeSet,
CreateRequest = body => new UpdateApplicationRequestDto { ApplicationChangeSet = (ApplicationChangeSetDto) body },
ResponseMappings =
{
new HttpResponseMapping<UpdateApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 200,
ResponseBodyType = typeof(ApplicationDto),
MatchesResponse = response => response.Application != null,
GetResponseBody = response => response.Application,
CreateResponse = body => new UpdateApplicationResponseDto { Application = (ApplicationDto) body },
}.Build(),
},
}.Build();
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Net;
using System.Net.Http;
using Facility.Core;
using Facility.Core.Http;
#pragma warning disable 612, 618 // member is obsolete
namespace Oap.Api.v1.Http
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public static partial class OapApiV1HttpMapping
{
/// <summary>
/// Gets applications for the current user.
/// </summary>
public static readonly HttpMethodMapping<GetApplicationsRequestDto, GetApplicationsResponseDto> GetApplicationsMapping =
new HttpMethodMapping<GetApplicationsRequestDto, GetApplicationsResponseDto>.Builder
{
HttpMethod = HttpMethod.Get,
Path = "/applications",
GetUriParameters = request =>
new Dictionary<string, string>
{
{ "status", request.Status == null ? null : request.Status.Value.ToString() },
{ "limit", request.Limit == null ? null : request.Limit.Value.ToString(CultureInfo.InvariantCulture) },
{ "nextToken", request.NextToken },
},
SetUriParameters = (request, parameters) =>
{
parameters.TryGetValue("status", out var queryParameterStatus);
request.Status = queryParameterStatus == null ? default(ApplicationStatus?) : new ApplicationStatus(queryParameterStatus);
parameters.TryGetValue("limit", out var queryParameterLimit);
request.Limit = ServiceDataUtility.TryParseInt32(queryParameterLimit);
parameters.TryGetValue("nextToken", out var queryParameterNextToken);
request.NextToken = queryParameterNextToken;
return request;
},
ResponseMappings =
{
new HttpResponseMapping<GetApplicationsResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 200,
ResponseBodyType = typeof(GetApplicationsResponseDto),
}.Build(),
},
}.Build();
/// <summary>
/// Creates a new application for the current user.
/// </summary>
public static readonly HttpMethodMapping<CreateApplicationRequestDto, CreateApplicationResponseDto> CreateApplicationMapping =
new HttpMethodMapping<CreateApplicationRequestDto, CreateApplicationResponseDto>.Builder
{
HttpMethod = HttpMethod.Post,
Path = "/applications/",
ValidateRequest = request =>
{
if (request.ApplicationCreateSet == null)
return ServiceResult.Failure(ServiceErrors.CreateRequestFieldRequired("applicationCreateSet"));
return ServiceResult.Success();
},
RequestBodyType = typeof(ApplicationCreateSetDto),
GetRequestBody = request => request.ApplicationCreateSet,
CreateRequest = body => new CreateApplicationRequestDto { ApplicationCreateSet = (ApplicationCreateSetDto) body },
ResponseMappings =
{
new HttpResponseMapping<CreateApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 200,
ResponseBodyType = typeof(ApplicationDto),
MatchesResponse = response => response.Application != null,
GetResponseBody = response => response.Application,
CreateResponse = body => new CreateApplicationResponseDto { Application = (ApplicationDto) body },
}.Build(),
new HttpResponseMapping<CreateApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 201,
}.Build(),
},
}.Build();
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
public static readonly HttpMethodMapping<GetApplicationRequestDto, GetApplicationResponseDto> GetApplicationMapping =
new HttpMethodMapping<GetApplicationRequestDto, GetApplicationResponseDto>.Builder
{
HttpMethod = HttpMethod.Get,
Path = "/applications/{id}",
ValidateRequest = request =>
{
if (string.IsNullOrEmpty(request.Id))
return ServiceResult.Failure(ServiceErrors.CreateRequestFieldRequired("id"));
return ServiceResult.Success();
},
GetUriParameters = request =>
new Dictionary<string, string>
{
{ "id", request.Id },
},
SetUriParameters = (request, parameters) =>
{
parameters.TryGetValue("id", out var queryParameterId);
request.Id = queryParameterId;
return request;
},
ResponseMappings =
{
new HttpResponseMapping<GetApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 200,
ResponseBodyType = typeof(ApplicationDto),
MatchesResponse = response => response.Application != null,
GetResponseBody = response => response.Application,
CreateResponse = body => new GetApplicationResponseDto { Application = (ApplicationDto) body },
}.Build(),
new HttpResponseMapping<GetApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 304,
MatchesResponse = response => response.NotModified.GetValueOrDefault(),
CreateResponse = body => new GetApplicationResponseDto { NotModified = true },
}.Build(),
},
GetResponseHeaders = response =>
new Dictionary<string, string>
{
["eTag"] = response.ETag,
},
SetResponseHeaders = (response, headers) =>
{
headers.TryGetValue("eTag", out var headerETag);
response.ETag = headerETag;
return response;
},
}.Build();
/// <summary>
/// Updates the application.
/// </summary>
public static readonly HttpMethodMapping<UpdateApplicationRequestDto, UpdateApplicationResponseDto> UpdateApplicationMapping =
new HttpMethodMapping<UpdateApplicationRequestDto, UpdateApplicationResponseDto>.Builder
{
HttpMethod = new HttpMethod("PATCH"),
Path = "/applications/{id}",
ValidateRequest = request =>
{
if (string.IsNullOrEmpty(request.Id))
return ServiceResult.Failure(ServiceErrors.CreateRequestFieldRequired("id"));
if (request.ApplicationChangeSet == null)
return ServiceResult.Failure(ServiceErrors.CreateRequestFieldRequired("applicationChangeSet"));
return ServiceResult.Success();
},
GetUriParameters = request =>
new Dictionary<string, string>
{
{ "id", request.Id },
},
SetUriParameters = (request, parameters) =>
{
parameters.TryGetValue("id", out var queryParameterId);
request.Id = queryParameterId;
return request;
},
RequestBodyType = typeof(ApplicationChangeSetDto),
GetRequestBody = request => request.ApplicationChangeSet,
CreateRequest = body => new UpdateApplicationRequestDto { ApplicationChangeSet = (ApplicationChangeSetDto) body },
ResponseMappings =
{
new HttpResponseMapping<UpdateApplicationResponseDto>.Builder
{
StatusCode = (HttpStatusCode) 200,
ResponseBodyType = typeof(ApplicationDto),
MatchesResponse = response => response.Application != null,
GetResponseBody = response => response.Application,
CreateResponse = body => new UpdateApplicationResponseDto { Application = (ApplicationDto) body },
}.Build(),
},
}.Build();
}
}

View File

@@ -1,34 +1,34 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Threading;
using System.Threading.Tasks;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public partial interface IOapApiV1
{
/// <summary>
/// Gets applications for the current user.
/// </summary>
Task<ServiceResult<GetApplicationsResponseDto>> GetApplicationsAsync(GetApplicationsRequestDto request, CancellationToken cancellationToken = default);
/// <summary>
/// Creates a new application for the current user.
/// </summary>
Task<ServiceResult<CreateApplicationResponseDto>> CreateApplicationAsync(CreateApplicationRequestDto request, CancellationToken cancellationToken = default);
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
Task<ServiceResult<GetApplicationResponseDto>> GetApplicationAsync(GetApplicationRequestDto request, CancellationToken cancellationToken = default);
/// <summary>
/// Updates the application.
/// </summary>
Task<ServiceResult<UpdateApplicationResponseDto>> UpdateApplicationAsync(UpdateApplicationRequestDto request, CancellationToken cancellationToken = default);
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Threading;
using System.Threading.Tasks;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public partial interface IOapApiV1
{
/// <summary>
/// Gets applications for the current user.
/// </summary>
Task<ServiceResult<GetApplicationsResponseDto>> GetApplicationsAsync(GetApplicationsRequestDto request, CancellationToken cancellationToken = default);
/// <summary>
/// Creates a new application for the current user.
/// </summary>
Task<ServiceResult<CreateApplicationResponseDto>> CreateApplicationAsync(CreateApplicationRequestDto request, CancellationToken cancellationToken = default);
/// <summary>
/// Gets the specified application for the current user.
/// </summary>
Task<ServiceResult<GetApplicationResponseDto>> GetApplicationAsync(GetApplicationRequestDto request, CancellationToken cancellationToken = default);
/// <summary>
/// Updates the application.
/// </summary>
Task<ServiceResult<UpdateApplicationResponseDto>> UpdateApplicationAsync(UpdateApplicationRequestDto request, CancellationToken cancellationToken = default);
}
}

View File

@@ -1,28 +1,28 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
internal static class OapApiV1Methods
{
public static readonly IServiceMethodInfo GetApplications =
ServiceMethodInfo.Create<IOapApiV1, GetApplicationsRequestDto, GetApplicationsResponseDto>(
"getApplications", "OapApiV1", x => x.GetApplicationsAsync);
public static readonly IServiceMethodInfo CreateApplication =
ServiceMethodInfo.Create<IOapApiV1, CreateApplicationRequestDto, CreateApplicationResponseDto>(
"createApplication", "OapApiV1", x => x.CreateApplicationAsync);
public static readonly IServiceMethodInfo GetApplication =
ServiceMethodInfo.Create<IOapApiV1, GetApplicationRequestDto, GetApplicationResponseDto>(
"getApplication", "OapApiV1", x => x.GetApplicationAsync);
public static readonly IServiceMethodInfo UpdateApplication =
ServiceMethodInfo.Create<IOapApiV1, UpdateApplicationRequestDto, UpdateApplicationResponseDto>(
"updateApplication", "OapApiV1", x => x.UpdateApplicationAsync);
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using Facility.Core;
namespace Oap.Api.v1
{
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
internal static class OapApiV1Methods
{
public static readonly IServiceMethodInfo GetApplications =
ServiceMethodInfo.Create<IOapApiV1, GetApplicationsRequestDto, GetApplicationsResponseDto>(
"getApplications", "OapApiV1", x => x.GetApplicationsAsync);
public static readonly IServiceMethodInfo CreateApplication =
ServiceMethodInfo.Create<IOapApiV1, CreateApplicationRequestDto, CreateApplicationResponseDto>(
"createApplication", "OapApiV1", x => x.CreateApplicationAsync);
public static readonly IServiceMethodInfo GetApplication =
ServiceMethodInfo.Create<IOapApiV1, GetApplicationRequestDto, GetApplicationResponseDto>(
"getApplication", "OapApiV1", x => x.GetApplicationAsync);
public static readonly IServiceMethodInfo UpdateApplication =
ServiceMethodInfo.Create<IOapApiV1, UpdateApplicationRequestDto, UpdateApplicationResponseDto>(
"updateApplication", "OapApiV1", x => x.UpdateApplicationAsync);
}
}

View File

@@ -1,48 +1,48 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Request for UpdateApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class UpdateApplicationRequestDto : ServiceDto<UpdateApplicationRequestDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public UpdateApplicationRequestDto()
{
}
/// <summary>
/// The application ID.
/// </summary>
public string Id { get; set; }
/// <summary>
/// The application update set.
/// </summary>
public ApplicationChangeSetDto ApplicationChangeSet { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(UpdateApplicationRequestDto other)
{
return other != null &&
Id == other.Id &&
ServiceDataUtility.AreEquivalentDtos(ApplicationChangeSet, other.ApplicationChangeSet);
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Request for UpdateApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class UpdateApplicationRequestDto : ServiceDto<UpdateApplicationRequestDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public UpdateApplicationRequestDto()
{
}
/// <summary>
/// The application ID.
/// </summary>
public string Id { get; set; }
/// <summary>
/// The application update set.
/// </summary>
public ApplicationChangeSetDto ApplicationChangeSet { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(UpdateApplicationRequestDto other)
{
return other != null &&
Id == other.Id &&
ServiceDataUtility.AreEquivalentDtos(ApplicationChangeSet, other.ApplicationChangeSet);
}
}
}

View File

@@ -1,42 +1,42 @@
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Response for UpdateApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class UpdateApplicationResponseDto : ServiceDto<UpdateApplicationResponseDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public UpdateApplicationResponseDto()
{
}
/// <summary>
/// The updated Application.
/// </summary>
public ApplicationDto Application { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(UpdateApplicationResponseDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(Application, other.Application);
}
}
}
// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;
namespace Oap.Api.v1
{
/// <summary>
/// Response for UpdateApplication.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
public sealed partial class UpdateApplicationResponseDto : ServiceDto<UpdateApplicationResponseDto>
{
/// <summary>
/// Creates an instance.
/// </summary>
public UpdateApplicationResponseDto()
{
}
/// <summary>
/// The updated Application.
/// </summary>
public ApplicationDto Application { get; set; }
/// <summary>
/// The JSON serializer.
/// </summary>
protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;
/// <summary>
/// Determines if two DTOs are equivalent.
/// </summary>
public override bool IsEquivalentTo(UpdateApplicationResponseDto other)
{
return other != null &&
ServiceDataUtility.AreEquivalentDtos(Application, other.Application);
}
}
}