From 7344f859afdf646b508479b43a2aff0672f57116 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Thu, 23 Oct 2025 17:11:36 +0200 Subject: [PATCH 01/44] Implements not required nullables - Not required fields are wrapped in an Option struct - Nullable field use "?" when appropriate - Breaking changes, as non required fields previously used "?" # Conflicts: # modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java # modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache --- .mvn/.develocity/develocity-workspace-id | 1 + .../languages/CSharpClientCodegen.java | 17 +--- .../CamelCaseSanitizedParamName.mustache | 1 + .../src/main/resources/csharp/Option.mustache | 99 +++++++++++++++++++ .../libraries/httpclient/ApiClient.mustache | 7 +- .../NullConditionalProperty.mustache | 1 + .../libraries/httpclient/model.mustache | 1 + .../unityWebRequest/ApiClient.mustache | 7 +- .../libraries/unityWebRequest/model.mustache | 1 + .../resources/csharp/modelGeneric.mustache | 84 +++++++--------- 10 files changed, 155 insertions(+), 64 deletions(-) create mode 100644 .mvn/.develocity/develocity-workspace-id create mode 100644 modules/openapi-generator/src/main/resources/csharp/CamelCaseSanitizedParamName.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp/Option.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/NullConditionalProperty.mustache diff --git a/.mvn/.develocity/develocity-workspace-id b/.mvn/.develocity/develocity-workspace-id new file mode 100644 index 000000000000..487f2bbfc511 --- /dev/null +++ b/.mvn/.develocity/develocity-workspace-id @@ -0,0 +1 @@ +vry6ndrjebbgjatruxxl37vo3q \ No newline at end of file diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 96352d244c2c..c5372c9ace57 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -393,20 +393,6 @@ protected void setTypeMapping() { } } - @Override - protected void updateCodegenParameterEnum(CodegenParameter parameter, CodegenModel model) { - if (GENERICHOST.equals(getLibrary())) { - super.updateCodegenParameterEnum(parameter, model); - return; - } - - super.updateCodegenParameterEnumLegacy(parameter, model); - - if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional - parameter.dataType = parameter.dataType + "?"; - } - } - @Override public String apiDocFileFolder() { if (GENERICHOST.equals(getLibrary())) { @@ -986,6 +972,7 @@ public CodegenOperation fromOperation(String path, public void addSupportingFiles(final String clientPackageDir, final String packageFolder, final AtomicReference excludeTests, final String testPackageFolder, final String testPackageName, final String modelPackageDir, final String authPackageDir) { + supportingFiles.add(new SupportingFile("Option.mustache", clientPackageDir, "Option.cs")); supportingFiles.add(new SupportingFile("IApiAccessor.mustache", clientPackageDir, "IApiAccessor.cs")); supportingFiles.add(new SupportingFile("Configuration.mustache", clientPackageDir, "Configuration.cs")); supportingFiles.add(new SupportingFile("ApiClient.mustache", clientPackageDir, "ApiClient.cs")); @@ -994,6 +981,8 @@ public void addSupportingFiles(final String clientPackageDir, final String packa supportingFiles.add(new SupportingFile("ExceptionFactory.mustache", clientPackageDir, "ExceptionFactory.cs")); supportingFiles.add(new SupportingFile("OpenAPIDateConverter.mustache", clientPackageDir, "OpenAPIDateConverter.cs")); supportingFiles.add(new SupportingFile("ClientUtils.mustache", clientPackageDir, "ClientUtils.cs")); + supportingFiles.add(new SupportingFile("Option.mustache", clientPackageDir, "Option.cs")); + if (needsCustomHttpMethod) { supportingFiles.add(new SupportingFile("HttpMethod.mustache", clientPackageDir, "HttpMethod.cs")); } diff --git a/modules/openapi-generator/src/main/resources/csharp/CamelCaseSanitizedParamName.mustache b/modules/openapi-generator/src/main/resources/csharp/CamelCaseSanitizedParamName.mustache new file mode 100644 index 000000000000..9bd19bcf3e8f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp/CamelCaseSanitizedParamName.mustache @@ -0,0 +1 @@ +{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/Option.mustache b/modules/openapi-generator/src/main/resources/csharp/Option.mustache new file mode 100644 index 000000000000..1cab49bf67ba --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp/Option.mustache @@ -0,0 +1,99 @@ +// +{{>partial_header}} + +using System; +using Newtonsoft.Json; + +{{#nrt}} +#nullable enable + +{{/nrt}} + +namespace {{packageName}}.{{clientPackage}} +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + Type innerType = value?.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType)!; + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/ApiClient.mustache index 9bed800e40d6..1248eaa6762e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/ApiClient.mustache @@ -25,6 +25,7 @@ using System.Net.Http.Headers; {{#supportsRetry}} using Polly; {{/supportsRetry}} +using {{packageName}}.{{clientPackage}}; namespace {{packageName}}.Client { @@ -45,7 +46,8 @@ namespace {{packageName}}.Client { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -211,7 +213,8 @@ namespace {{packageName}}.Client { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/NullConditionalProperty.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/NullConditionalProperty.mustache new file mode 100644 index 000000000000..d8ad9266699e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/NullConditionalProperty.mustache @@ -0,0 +1 @@ +{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/model.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/model.mustache index f84de7f64327..09774a5fc31a 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/model.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/model.mustache @@ -14,6 +14,7 @@ using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using {{packageName}}.{{clientPackage}}; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/ApiClient.mustache index 908c829f53ba..1c06889732f4 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/ApiClient.mustache @@ -21,6 +21,7 @@ using System.Net.Http; using System.Net.Http.Headers; using UnityEngine.Networking; using UnityEngine; +using {{packageName}}.{{clientPackage}}; namespace {{packageName}}.Client { @@ -41,7 +42,8 @@ namespace {{packageName}}.Client { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -184,7 +186,8 @@ namespace {{packageName}}.Client { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/model.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/model.mustache index 3c1c6c0e252b..89e6011b7f69 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/model.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/model.mustache @@ -14,6 +14,7 @@ using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using {{packageName}}.{{clientPackage}}; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 432b6e34b8e5..f8a481233988 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -18,6 +18,7 @@ {{/useUnityWebRequest}} {{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}} : .{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} { + {{! Inner enums definition }} {{#vars}} {{#items.isEnum}} {{#items}} @@ -31,6 +32,7 @@ {{>modelInnerEnum}} {{/complexType}} {{/isEnum}} + {{! Inner enum fields }} {{#isEnum}} /// @@ -47,7 +49,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } + public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; set; } {{#isReadOnly}} /// @@ -62,11 +64,11 @@ {{/conditionalSerialization}} {{#conditionalSerialization}} {{#isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] + [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}false{{/required}}{{/vendorExtensions.x-emit-default-value}})] {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } + public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; set; } /// @@ -84,7 +86,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} + public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get{ return _{{name}};} set @@ -93,7 +95,7 @@ _flag{{name}} = true; } } - private {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} _{{name}}; + private {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} _{{name}}; private bool _flag{{name}}; /// @@ -129,75 +131,65 @@ /// Initializes a new instance of the class. /// {{#readWriteVars}} - /// {{description}}{{^description}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. + /// {{description}}{{^description}}{{>CamelCaseSanitizedParamName}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. {{/readWriteVars}} {{#hasOnlyReadOnly}} [JsonConstructorAttribute] {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} + public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default{{/defaultValue}}{{/required}}{{^required}}default{{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} { {{#vars}} {{^isInherited}} {{^isReadOnly}} - {{#required}} - {{^conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - // to ensure "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" is required (not null) - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null) - { - throw new ArgumentNullException("{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} is a required property for {{classname}} and cannot be null"); - } - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{#conditionalSerialization}} + {{^isNullable}} {{! Push all sanity tests on top }} {{^vendorExtensions.x-csharp-value-type}} - // to ensure "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" is required (not null) - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null) + // to ensure "{{>CamelCaseSanitizedParamName}}" is required (not null) + if ({{^required}}{{>CamelCaseSanitizedParamName}}.IsSet && {{/required}}{{>CamelCaseSanitizedParamName}}{{^required}}.Value{{/required}} == null) { - throw new ArgumentNullException("{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} is a required property for {{classname}} and cannot be null"); + throw new ArgumentNullException("{{>CamelCaseSanitizedParamName}} isn't a nullable property for {{classname}} and cannot be null"); } - this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{/required}} + {{/isNullable}} {{/isReadOnly}} {{/isInherited}} {{/vars}} - {{#vars}} + {{#vars}} {{! Assign all values }} {{^isInherited}} {{^isReadOnly}} {{^required}} {{#defaultValue}} {{^conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - // use default value if no "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" provided - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} ?? {{#isString}}@{{/isString}}{{{defaultValue}}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/vendorExtensions.x-csharp-value-type}} + this.{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}}.Value : new Option({{#isString}}@{{/isString}}{{{defaultValue}}}); + {{/conditionalSerialization}} + {{#conditionalSerialization}} + this._{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}}.Value : new Option({{#isString}}@{{/isString}}{{{defaultValue}}}); {{/conditionalSerialization}} {{/defaultValue}} {{^defaultValue}} {{^conditionalSerialization}} - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; + this.{{name}} = {{>CamelCaseSanitizedParamName}}; {{/conditionalSerialization}} {{#conditionalSerialization}} - this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - if (this.{{name}} != null) + this._{{name}} = {{>CamelCaseSanitizedParamName}}; + if (this.{{name}}.IsSet) { this._flag{{name}} = true; } {{/conditionalSerialization}} {{/defaultValue}} {{/required}} + {{#required}} + {{^conditionalSerialization}} + this.{{name}} = {{>CamelCaseSanitizedParamName}}; + {{/conditionalSerialization}} + {{#conditionalSerialization}} + this._{{name}} = {{>CamelCaseSanitizedParamName}}; + if (this.{{name}}.IsSet) + { + this._flag{{name}} = true; + } + {{/conditionalSerialization}} + {{/required}} {{/isReadOnly}} {{/isInherited}} {{/vars}} @@ -226,7 +218,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } {{#isReadOnly}} /// @@ -248,7 +240,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{dataType}}} {{name}} { get; private set; } + public {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; private set; } /// /// Returns false as {{name}} should not be serialized given that it's read-only. @@ -267,7 +259,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{dataType}}} {{name}} + public {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get{ return _{{name}};} set @@ -276,7 +268,7 @@ _flag{{name}} = true; } } - private {{{dataType}}} _{{name}}; + private {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} _{{name}}; private bool _flag{{name}}; /// From f0445d79abd14ebeaae589840744656b9c0fdbcd Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Fri, 24 Oct 2025 16:27:51 +0200 Subject: [PATCH 02/44] Fix NullConditionalProperty for all csharp generators without break generichost --- .../src/main/resources/csharp/NullConditionalProperty.mustache | 2 +- .../libraries/generichost/NullConditionalProperty.mustache | 1 + .../libraries/httpclient/NullConditionalProperty.mustache | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/csharp/libraries/generichost/NullConditionalProperty.mustache delete mode 100644 modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/NullConditionalProperty.mustache diff --git a/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache b/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache index 7dcafa8033e4..d8ad9266699e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache @@ -1 +1 @@ -{{#lambda.first}}{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} \ No newline at end of file +{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/NullConditionalProperty.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/NullConditionalProperty.mustache new file mode 100644 index 000000000000..7dcafa8033e4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/NullConditionalProperty.mustache @@ -0,0 +1 @@ +{{#lambda.first}}{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/NullConditionalProperty.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/NullConditionalProperty.mustache deleted file mode 100644 index d8ad9266699e..000000000000 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/NullConditionalProperty.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}} \ No newline at end of file From 764d4c6d38a7e3ce02acc92f1e8c5302cb197b76 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Fri, 24 Oct 2025 17:32:55 +0200 Subject: [PATCH 03/44] Fix modelGeneric.mustache to remove extra spaces --- .../src/main/resources/csharp/modelGeneric.mustache | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index f8a481233988..cd8864fa9640 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -138,10 +138,11 @@ {{/hasOnlyReadOnly}} public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default{{/defaultValue}}{{/required}}{{^required}}default{{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} { + {{! Push all sanity tests on top }} {{#vars}} {{^isInherited}} {{^isReadOnly}} - {{^isNullable}} {{! Push all sanity tests on top }} + {{^isNullable}} {{^vendorExtensions.x-csharp-value-type}} // to ensure "{{>CamelCaseSanitizedParamName}}" is required (not null) if ({{^required}}{{>CamelCaseSanitizedParamName}}.IsSet && {{/required}}{{>CamelCaseSanitizedParamName}}{{^required}}.Value{{/required}} == null) @@ -153,7 +154,8 @@ {{/isReadOnly}} {{/isInherited}} {{/vars}} - {{#vars}} {{! Assign all values }} + {{! Assign all values }} + {{#vars}} {{^isInherited}} {{^isReadOnly}} {{^required}} @@ -188,7 +190,7 @@ { this._flag{{name}} = true; } - {{/conditionalSerialization}} + {{/conditionalSerialization}} {{/required}} {{/isReadOnly}} {{/isInherited}} From bc01737c80d4aed931cf95438314b7b743ab7e3f Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Fri, 24 Oct 2025 17:33:20 +0200 Subject: [PATCH 04/44] modelGeneric.mustache : fix comment --- .../src/main/resources/csharp/modelGeneric.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index cd8864fa9640..c2c122468626 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -144,7 +144,7 @@ {{^isReadOnly}} {{^isNullable}} {{^vendorExtensions.x-csharp-value-type}} - // to ensure "{{>CamelCaseSanitizedParamName}}" is required (not null) + // to ensure "{{>CamelCaseSanitizedParamName}}" (not nullable) is not null if ({{^required}}{{>CamelCaseSanitizedParamName}}.IsSet && {{/required}}{{>CamelCaseSanitizedParamName}}{{^required}}.Value{{/required}} == null) { throw new ArgumentNullException("{{>CamelCaseSanitizedParamName}} isn't a nullable property for {{classname}} and cannot be null"); From 493891655c6873461c09461d5937268a0e883a8d Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Fri, 24 Oct 2025 18:18:37 +0200 Subject: [PATCH 05/44] Fix Option file not being added to all generators # Conflicts: # modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java --- .../org/openapitools/codegen/languages/CSharpClientCodegen.java | 1 - .../openapi-generator/src/main/resources/csharp/model.mustache | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index c5372c9ace57..0c0d9c6c1bb8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -972,7 +972,6 @@ public CodegenOperation fromOperation(String path, public void addSupportingFiles(final String clientPackageDir, final String packageFolder, final AtomicReference excludeTests, final String testPackageFolder, final String testPackageName, final String modelPackageDir, final String authPackageDir) { - supportingFiles.add(new SupportingFile("Option.mustache", clientPackageDir, "Option.cs")); supportingFiles.add(new SupportingFile("IApiAccessor.mustache", clientPackageDir, "IApiAccessor.cs")); supportingFiles.add(new SupportingFile("Configuration.mustache", clientPackageDir, "Configuration.cs")); supportingFiles.add(new SupportingFile("ApiClient.mustache", clientPackageDir, "ApiClient.cs")); diff --git a/modules/openapi-generator/src/main/resources/csharp/model.mustache b/modules/openapi-generator/src/main/resources/csharp/model.mustache index 0d0c0b683541..217837928a04 100644 --- a/modules/openapi-generator/src/main/resources/csharp/model.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/model.mustache @@ -29,6 +29,7 @@ using OpenAPIDateConverter = {{packageName}}.Client.OpenAPIDateConverter; {{#useCompareNetObjects}} using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; {{/useCompareNetObjects}} +using {{packageName}}.{{clientPackage}}; {{#models}} {{#model}} {{#oneOf}} From a8004a6487f009bfea39da479f37473598efc17f Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Fri, 24 Oct 2025 19:18:15 +0200 Subject: [PATCH 06/44] handle equatable --- .../src/main/resources/csharp/Option.mustache | 13 +++++++++++ .../resources/csharp/modelGeneric.mustache | 23 ++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/Option.mustache b/modules/openapi-generator/src/main/resources/csharp/Option.mustache index 1cab49bf67ba..aa13faa72f4f 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Option.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Option.mustache @@ -84,6 +84,19 @@ namespace {{packageName}}.{{clientPackage}} Value = value; } + {{#equatable}} + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + {{/equatable}} + /// /// Implicitly converts this option to the contained type /// diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index c2c122468626..5868a5b84dab 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -359,8 +359,8 @@ ( this.{{name}} == input.{{name}} || {{^vendorExtensions.x-is-value-type}} - (this.{{name}} != null && - this.{{name}}.Equals(input.{{name}})) + {{#required}}(this.{{name}} != null &&{{/required}} + this.{{name}}.Equals(input.{{name}}){{#required}}){{/required}} {{/vendorExtensions.x-is-value-type}} {{#vendorExtensions.x-is-value-type}} this.{{name}}.Equals(input.{{name}}) @@ -368,9 +368,9 @@ ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} ( this.{{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}}this.{{name}} != null && - input.{{name}} != null && - {{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}}) + {{^vendorExtensions.x-is-value-type}}{{^required}}this.{{name}}.IsSet && {{/required}}this.{{name}}{{^required}}.Value{{/required}} != null && + {{^required}}input.{{name}}.IsSet && {{/required}}input.{{name}}{{^required}}.Value{{/required}} != null && + {{/vendorExtensions.x-is-value-type}}this.{{name}}{{^required}}.Value{{/required}}.SequenceEqual(input.{{name}}{{^required}}.Value{{/required}}) ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} {{#isAdditionalPropertiesTrue}} && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); @@ -394,13 +394,20 @@ {{/parent}} {{#vars}} {{^vendorExtensions.x-is-value-type}} - if (this.{{name}} != null) + if ({{^required}}this.{{name}}.IsSet && {{/required}}this.{{name}}{{^required}}.Value{{/required}} != null) { - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); + hashCode = (hashCode * 59) + this.{{name}}{{^required}}.Value{{/required}}.GetHashCode(); } {{/vendorExtensions.x-is-value-type}} {{#vendorExtensions.x-is-value-type}} - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); + {{^required}} + if (this.{{name}}.IsSet) + { + {{/required}} + hashCode = (hashCode * 59) + this.{{name}}{{^required}}.Value{{/required}}.GetHashCode(); + {{^required}} + } + {{/required}} {{/vendorExtensions.x-is-value-type}} {{/vars}} {{#isAdditionalPropertiesTrue}} From 815879b6606269e563da16f5e7e3daa996c32db1 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 27 Oct 2025 12:07:29 +0100 Subject: [PATCH 07/44] Fix equality --- .../src/main/resources/csharp/Option.mustache | 20 ++++++++++++++----- .../resources/csharp/modelGeneric.mustache | 4 +++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/Option.mustache b/modules/openapi-generator/src/main/resources/csharp/Option.mustache index aa13faa72f4f..e1a6edb21fc4 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Option.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Option.mustache @@ -87,13 +87,23 @@ namespace {{packageName}}.{{clientPackage}} {{#equatable}} public bool Equals(Option other) { - if (IsSet != other.IsSet) { - return false; + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); } - if (!IsSet) { - return true; + + public static bool ==(Option left, Option right) + { + return left.Equals(right); } - return object.Equals(Value, other.Value); + + public static bool !=(Option left, Option right) + { + return !left.Equals(right); } {{/equatable}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 5868a5b84dab..9c6dc424871e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -357,7 +357,9 @@ } return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}} ( + {{#required}} this.{{name}} == input.{{name}} || + {{/required}} {{^vendorExtensions.x-is-value-type}} {{#required}}(this.{{name}} != null &&{{/required}} this.{{name}}.Equals(input.{{name}}){{#required}}){{/required}} @@ -367,7 +369,7 @@ {{/vendorExtensions.x-is-value-type}} ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} ( - this.{{name}} == input.{{name}} || + {{#required}}this.{{name}} == input.{{name}} || {{/required}} {{^vendorExtensions.x-is-value-type}}{{^required}}this.{{name}}.IsSet && {{/required}}this.{{name}}{{^required}}.Value{{/required}} != null && {{^required}}input.{{name}}.IsSet && {{/required}}input.{{name}}{{^required}}.Value{{/required}} != null && {{/vendorExtensions.x-is-value-type}}this.{{name}}{{^required}}.Value{{/required}}.SequenceEqual(input.{{name}}{{^required}}.Value{{/required}}) From 943a63c124530534e88f7a942fcf2ac0097b928d Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 27 Oct 2025 14:55:21 +0100 Subject: [PATCH 08/44] Fix signature of api methods # Conflicts: # modules/openapi-generator/src/main/resources/csharp/api.mustache # modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache # modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache # modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpOperationTest.java --- .../languages/CSharpClientCodegen.java | 2 +- .../src/main/resources/csharp/api.mustache | 76 +++++++++---------- .../csharp/libraries/httpclient/api.mustache | 62 +++++++-------- .../libraries/unityWebRequest/api.mustache | 58 +++++++------- .../csharpnetcore/CSharpOperationTest.java | 4 +- 5 files changed, 99 insertions(+), 103 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 0c0d9c6c1bb8..fab819fb7371 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -652,7 +652,7 @@ public void postProcessParameter(CodegenParameter parameter) { super.postProcessParameter(parameter); postProcessEmitDefaultValue(parameter.vendorExtensions); - if (!GENERICHOST.equals(getLibrary()) && !parameter.dataType.endsWith("?") && !parameter.required && (nullReferenceTypesFlag || this.getNullableTypes().contains(parameter.dataType))) { + if (!GENERICHOST.equals(getLibrary()) && !parameter.dataType.endsWith("?") && parameter.isNullable && (nullReferenceTypesFlag || this.getNullableTypes().contains(parameter.dataType))) { parameter.dataType = parameter.dataType + "?"; } } diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index 6494627b3a6f..4c31ba41a55c 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -260,19 +260,17 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) { {{#allParams}} - {{#required}} + {{^nullable}} {{^vendorExtensions.x-csharp-value-type}} // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - { - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - } + if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) + throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); {{/vendorExtensions.x-csharp-value-type}} - {{/required}} + {{/nullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -306,9 +304,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // path parameter } {{/required}} {{/pathParams}} @@ -327,21 +325,21 @@ namespace {{packageName}}.{{apiPackage}} {{/isDeepObject}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isDeepObject}} {{#items.vars}} - if ({{paramName}}.{{name}} != null) + if ({{paramName}}.Value.{{name}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.Value.{{name}})); } {{/items.vars}} {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}}.Value)); {{/items}} {{/isDeepObject}} {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value)); {{/isDeepObject}} } {{/required}} @@ -351,9 +349,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // header parameter } {{/required}} {{/headerParams}} @@ -379,12 +377,12 @@ namespace {{packageName}}.{{apiPackage}} {{/isFile}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isFile}} {{#isArray}} {{#supportsFileParameters}} - foreach (var file in {{paramName}}) + foreach (var file in {{paramName}}.Value) { localVarRequestOptions.FileParameters.Add("{{baseName}}", file); } @@ -392,12 +390,12 @@ namespace {{packageName}}.{{apiPackage}} {{/isArray}} {{^isArray}} {{#supportsFileParameters}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}.Value); {{/supportsFileParameters}} {{/isArray}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}}.Value)); // form parameter {{/isFile}} } {{/required}} @@ -531,19 +529,17 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default) { {{#allParams}} - {{#required}} + {{^nullable}} {{^vendorExtensions.x-csharp-value-type}} // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - { - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - } + if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) + throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); {{/vendorExtensions.x-csharp-value-type}} - {{/required}} + {{/nullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -584,9 +580,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // path parameter } {{/required}} {{/pathParams}} @@ -611,21 +607,21 @@ namespace {{packageName}}.{{apiPackage}} {{/isDeepObject}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isDeepObject}} {{#items.vars}} - if ({{paramName}}.{{name}} != null) + if ({{paramName}}.Value.{{name}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.Value.{{name}})); } {{/items.vars}} {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}}.Value)); {{/items}} {{/isDeepObject}} {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value)); {{/isDeepObject}} } {{/required}} @@ -641,9 +637,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // header parameter } {{/required}} {{/headerParams}} @@ -669,12 +665,12 @@ namespace {{packageName}}.{{apiPackage}} {{/isFile}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isFile}} {{#isArray}} {{#supportsFileParameters}} - foreach (var file in {{paramName}}) + foreach (var file in {{paramName}}.Value) { localVarRequestOptions.FileParameters.Add("{{baseName}}", file); } @@ -682,12 +678,12 @@ namespace {{packageName}}.{{apiPackage}} {{/isArray}} {{^isArray}} {{#supportsFileParameters}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}.Value); {{/supportsFileParameters}} {{/isArray}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}}.Value)); // form parameter {{/isFile}} } {{/required}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache index 22c8fd0c3f8e..6d9606022c2b 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache @@ -350,17 +350,17 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} - {{#required}} + {{^nullable}} {{^vendorExtensions.x-csharp-value-type}} // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); + if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) + throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); {{/vendorExtensions.x-csharp-value-type}} - {{/required}} + {{/nullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -388,9 +388,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // path parameter } {{/required}} {{/pathParams}} @@ -409,21 +409,21 @@ namespace {{packageName}}.{{apiPackage}} {{/isDeepObject}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isDeepObject}} {{#items.vars}} - if ({{paramName}}.{{name}} != null) + if ({{paramName}}.Value.{{name}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value.{{name}})); } {{/items.vars}} {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}}.Value)); {{/items}} {{/isDeepObject}} {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value)); {{/isDeepObject}} } {{/required}} @@ -433,9 +433,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // header parameter } {{/required}} {{/headerParams}} @@ -449,13 +449,13 @@ namespace {{packageName}}.{{apiPackage}} {{/isFile}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isFile}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}.Value); {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // form parameter {{/isFile}} } {{/required}} @@ -570,17 +570,17 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) { {{#allParams}} - {{#required}} + {{^nullable}} {{^vendorExtensions.x-csharp-value-type}} // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); + if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) + throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); {{/vendorExtensions.x-csharp-value-type}} - {{/required}} + {{/nullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -616,9 +616,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // path parameter } {{/required}} {{/pathParams}} @@ -633,9 +633,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value)); } {{/required}} {{/queryParams}} @@ -650,9 +650,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}IsSet) { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // header parameter } {{/required}} {{/headerParams}} @@ -666,13 +666,13 @@ namespace {{packageName}}.{{apiPackage}} {{/isFile}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isFile}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}.Value); {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // form parameter {{/isFile}} } {{/required}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache index 6b0a5883d30e..57f05788cd7c 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache @@ -276,17 +276,17 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} - {{#required}} + {{^nullable}} {{^vendorExtensions.x-csharp-value-type}} // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); + if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) + throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); {{/vendorExtensions.x-csharp-value-type}} - {{/required}} + {{/nullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -314,9 +314,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // path parameter } {{/required}} {{/pathParams}} @@ -335,21 +335,21 @@ namespace {{packageName}}.{{apiPackage}} {{/isDeepObject}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isDeepObject}} {{#items.vars}} - if ({{paramName}}.{{name}} != null) + if ({{paramName}}.Value.{{name}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value.{{name}})); } {{/items.vars}} {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}}.Value)); {{/items}} {{/isDeepObject}} {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value)); {{/isDeepObject}} } {{/required}} @@ -359,9 +359,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // header parameter } {{/required}} {{/headerParams}} @@ -374,12 +374,12 @@ namespace {{packageName}}.{{apiPackage}} {{/isFile}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isFile}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // form parameter {{/isFile}} } {{/required}} @@ -508,17 +508,17 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) { {{#allParams}} - {{#required}} + {{^nullable}} {{^vendorExtensions.x-csharp-value-type}} // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); + if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) + throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); {{/vendorExtensions.x-csharp-value-type}} - {{/required}} + {{/nullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -548,9 +548,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // path parameter } {{/required}} {{/pathParams}} @@ -559,9 +559,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value)); } {{/required}} {{/queryParams}} @@ -570,9 +570,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // header parameter } {{/required}} {{/headerParams}} @@ -585,12 +585,12 @@ namespace {{packageName}}.{{apiPackage}} {{/isFile}} {{/required}} {{^required}} - if ({{paramName}} != null) + if ({{paramName}}.IsSet) { {{#isFile}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // form parameter {{/isFile}} } {{/required}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpOperationTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpOperationTest.java index 0e794c7bdd01..d0190c9abb17 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpOperationTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpOperationTest.java @@ -39,9 +39,9 @@ public void assertMethodOptionalParameterDataType() { assertEquals(getOperationOptionalParameterDataType(new AspNetServerCodegen(), 3, true), "System.IO.Stream?"); assertEquals(getOperationOptionalParameterDataType(new CSharpClientCodegen(), 2, false), "System.IO.Stream"); - assertEquals(getOperationOptionalParameterDataType(new CSharpClientCodegen(), 2, true), "System.IO.Stream?"); + assertEquals(getOperationOptionalParameterDataType(new CSharpClientCodegen(), 2, true), "System.IO.Stream"); assertEquals(getOperationOptionalParameterDataType(new CSharpClientCodegen(), 3, false), "System.IO.Stream"); - assertEquals(getOperationOptionalParameterDataType(new CSharpClientCodegen(), 3, true), "System.IO.Stream?"); + assertEquals(getOperationOptionalParameterDataType(new CSharpClientCodegen(), 3, true), "System.IO.Stream"); } public String getOperationOptionalParameterDataType(final AbstractCSharpCodegen codegen, final int openApiVersion, final Boolean nullableReferenceTypes){ From 751994afe8e3687f7ea5ba9114afea4d1dc5195d Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 27 Oct 2025 15:16:25 +0100 Subject: [PATCH 09/44] Fix Option.mustache operator --- .../src/main/resources/csharp/Option.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/Option.mustache b/modules/openapi-generator/src/main/resources/csharp/Option.mustache index e1a6edb21fc4..623115e92e75 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Option.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Option.mustache @@ -96,12 +96,12 @@ namespace {{packageName}}.{{clientPackage}} return object.Equals(Value, other.Value); } - public static bool ==(Option left, Option right) + public static bool operator ==(Option left, Option right) { return left.Equals(right); } - public static bool !=(Option left, Option right) + public static bool operator !=(Option left, Option right) { return !left.Equals(right); } From dd8503ca24032194f1e40dfd3851789050691565 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 27 Oct 2025 15:38:34 +0100 Subject: [PATCH 10/44] Fix Api signature # Conflicts: # modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache --- .../csharp/libraries/httpclient/api.mustache | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache index 6d9606022c2b..613e7d1b789f 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache @@ -36,7 +36,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// /// {{summary}} @@ -50,7 +50,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations } @@ -78,7 +78,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); /// /// {{summary}} @@ -95,7 +95,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); {{/operation}} #endregion Asynchronous Operations } @@ -335,7 +335,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -552,7 +552,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}} From 09166e3721a8184104b0ba91c901d35710e8cd6b Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 27 Oct 2025 15:45:43 +0100 Subject: [PATCH 11/44] Fix Api signature # Conflicts: # modules/openapi-generator/src/main/resources/csharp/api.mustache # modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache --- .../src/main/resources/csharp/api.mustache | 12 ++++++------ .../csharp/libraries/unityWebRequest/api.mustache | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index 4c31ba41a55c..5d0b2810654a 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -38,7 +38,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); /// /// {{summary}} @@ -53,7 +53,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); {{/operation}} #endregion Synchronous Operations } @@ -82,7 +82,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default); /// /// {{summary}} @@ -100,7 +100,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default); {{/operation}} #endregion Asynchronous Operations } @@ -244,7 +244,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -510,7 +510,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false);{{/returnType}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache index 57f05788cd7c..1666a1ae040c 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache @@ -35,7 +35,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// /// {{summary}} @@ -49,7 +49,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations } @@ -77,7 +77,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); /// /// {{summary}} @@ -94,7 +94,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); {{/operation}} #endregion Asynchronous Operations } @@ -261,7 +261,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -476,7 +476,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) { var task = {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken); {{#returnType}} From 0c1c279b6029149e5237a493747d7817e7e1c18c Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 28 Oct 2025 10:46:17 +0100 Subject: [PATCH 12/44] Add String? to language specific primitives to handle nullables better --- .../codegen/languages/AbstractCSharpCodegen.java | 2 ++ .../codegen/languages/CSharpClientCodegen.java | 6 +----- .../main/resources/csharp/modelGeneric.mustache | 16 ++++++++-------- .../codegen/csharpnetcore/CSharpModelTest.java | 9 +++++---- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index bf77ff2ef250..c455247d6a3f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -164,6 +164,8 @@ public AbstractCSharpCodegen() { // TODO: Either include fully qualified names here or handle in DefaultCodegen via lastIndexOf(".") search languageSpecificPrimitives = new HashSet<>( Arrays.asList( + "String?", + "string?", "String", "string", "bool?", diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index fab819fb7371..93244f344a29 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -610,7 +610,7 @@ public String getNullableType(Schema p, String type) { } if (languageSpecificPrimitives.contains(type)) { - if (isSupportNullable() && ModelUtils.isNullable(p) && this.getNullableTypes().contains(type)) { + if (!type.endsWith("?") && isSupportNullable() && ModelUtils.isNullable(p) && (nullReferenceTypesFlag || this.getNullableTypes().contains(type))) { return type + "?"; } else { return type; @@ -651,10 +651,6 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert public void postProcessParameter(CodegenParameter parameter) { super.postProcessParameter(parameter); postProcessEmitDefaultValue(parameter.vendorExtensions); - - if (!GENERICHOST.equals(getLibrary()) && !parameter.dataType.endsWith("?") && parameter.isNullable && (nullReferenceTypesFlag || this.getNullableTypes().contains(parameter.dataType))) { - parameter.dataType = parameter.dataType + "?"; - } } public void postProcessEmitDefaultValue(Map vendorExtensions) { diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 9c6dc424871e..6ef6f33190f0 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -49,7 +49,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; set; } + public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{/complexType}}{{^required}}>{{/required}} {{name}} { get; set; } {{#isReadOnly}} /// @@ -68,7 +68,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; set; } + public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{/complexType}}{{^required}}>{{/required}} {{name}} { get; set; } /// @@ -86,7 +86,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} + public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{/complexType}}{{^required}}>{{/required}} {{name}} { get{ return _{{name}};} set @@ -95,7 +95,7 @@ _flag{{name}} = true; } } - private {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} _{{name}}; + private {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{/complexType}}{{^required}}>{{/required}} _{{name}}; private bool _flag{{name}}; /// @@ -220,7 +220,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } {{#isReadOnly}} /// @@ -242,7 +242,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; private set; } + public {{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{name}} { get; private set; } /// /// Returns false as {{name}} should not be serialized given that it's read-only. @@ -261,7 +261,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} + public {{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{name}} { get{ return _{{name}};} set @@ -270,7 +270,7 @@ _flag{{name}} = true; } } - private {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} _{{name}}; + private {{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} _{{name}}; private bool _flag{{name}}; /// diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java index c16b194e7957..6df2bed499e8 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java @@ -208,12 +208,13 @@ public void nonNullablePropertyTest() { .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT).nullable(false)) .addProperties("urls", new ArraySchema() .items(new StringSchema())) - .addProperties("name", new StringSchema().nullable(true)) + .addProperties("name", new StringSchema().nullable(false)) .addRequiredItem("id"); final DefaultCodegen codegen = new CSharpClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); codegen.processOpts(); + codegen.additionalProperties().put(CodegenConstants.NULLABLE_REFERENCE_TYPES, false); final CodegenModel cm = codegen.fromModel("sample", model); Assert.assertEquals(cm.name, "sample"); @@ -293,10 +294,10 @@ public void nullablePropertyTest() { final CodegenProperty property3 = cm.vars.get(2); Assert.assertEquals(property3.baseName, "name"); - Assert.assertEquals(property3.dataType, "string"); + Assert.assertEquals(property3.dataType, "string?"); Assert.assertEquals(property3.name, "Name"); Assert.assertNull(property3.defaultValue); - Assert.assertEquals(property3.baseType, "string"); + Assert.assertEquals(property3.baseType, "string?"); Assert.assertFalse(property3.required); Assert.assertTrue(property3.isPrimitiveType); } @@ -411,7 +412,7 @@ public void nullablePropertyWithNullableReferenceTypesTest() { Assert.assertNull(property3.defaultValue); Assert.assertEquals(property3.baseType, "string?"); Assert.assertFalse(property3.required); - Assert.assertFalse(property3.isPrimitiveType); + Assert.assertTrue(property3.isPrimitiveType); final CodegenProperty property4 = cm.vars.get(3); Assert.assertEquals(property4.baseName, "subObject"); From e7e47f5966a3c86ca7299543738cc7c86068ed8c Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 28 Oct 2025 11:56:14 +0100 Subject: [PATCH 13/44] Fix tests that were using null reference types without knowing --- .../codegen/csharpnetcore/CSharpClientCodegenTest.java | 1 + .../openapitools/codegen/csharpnetcore/CSharpModelTest.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientCodegenTest.java index 4617ec5044ad..0b42840439f4 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientCodegenTest.java @@ -128,6 +128,7 @@ public void test31specAdditionalPropertiesOfOneOf() throws IOException { CSharpClientCodegen cSharpClientCodegen = new CSharpClientCodegen(); cSharpClientCodegen.setOutputDir(output.getAbsolutePath()); cSharpClientCodegen.setAutosetConstants(true); + cSharpClientCodegen.additionalProperties().put(CodegenConstants.DOTNET_FRAMEWORK, "netstandard2.0"); clientOptInput.config(cSharpClientCodegen); defaultGenerator.opts(clientOptInput); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java index 6df2bed499e8..00e47e504a85 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java @@ -208,13 +208,13 @@ public void nonNullablePropertyTest() { .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT).nullable(false)) .addProperties("urls", new ArraySchema() .items(new StringSchema())) - .addProperties("name", new StringSchema().nullable(false)) + .addProperties("name", new StringSchema().nullable(true)) .addRequiredItem("id"); final DefaultCodegen codegen = new CSharpClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); + codegen.additionalProperties().put(CodegenConstants.DOTNET_FRAMEWORK, "netstandard2.0"); codegen.processOpts(); - codegen.additionalProperties().put(CodegenConstants.NULLABLE_REFERENCE_TYPES, false); final CodegenModel cm = codegen.fromModel("sample", model); Assert.assertEquals(cm.name, "sample"); From 0402efe8c6d48b88aa9b44b8bf78c392a833f29c Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 28 Oct 2025 11:56:42 +0100 Subject: [PATCH 14/44] Option.mustache: Handle null reference types better --- .../src/main/resources/csharp/Option.mustache | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/Option.mustache b/modules/openapi-generator/src/main/resources/csharp/Option.mustache index 623115e92e75..a53c4ea04e85 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Option.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Option.mustache @@ -42,15 +42,15 @@ namespace {{packageName}}.{{clientPackage}} public override bool CanConvert(Type objectType) => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + public override void WriteJson(JsonWriter writer, object{{nrt?}} value, JsonSerializer serializer) { - Type innerType = value?.GetType().GetGenericArguments()[0] ?? typeof(object); + Type innerType = value{{nrt?}}.GetType().GetGenericArguments()[0] ?? typeof(object); var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); var converter = (JsonConverter)Activator.CreateInstance(converterType); converter.WriteJson(writer, value, serializer); } - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + public override object ReadJson(JsonReader reader, Type objectType, object{{nrt?}} existingValue, JsonSerializer serializer) { Type innerType = objectType.GetGenericArguments()[0]; var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); From 095e3afdae791e1ed630a62706a162eebc1b37a1 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 28 Oct 2025 11:58:05 +0100 Subject: [PATCH 15/44] modelGeneric: Fix default value assignation --- .../src/main/resources/csharp/modelGeneric.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 6ef6f33190f0..4806e018f315 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -161,10 +161,10 @@ {{^required}} {{#defaultValue}} {{^conditionalSerialization}} - this.{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}}.Value : new Option({{#isString}}@{{/isString}}{{{defaultValue}}}); + this.{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}} : new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>({{#isString}}@{{/isString}}{{{defaultValue}}}); {{/conditionalSerialization}} {{#conditionalSerialization}} - this._{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}}.Value : new Option({{#isString}}@{{/isString}}{{{defaultValue}}}); + this._{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}} : new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>({{#isString}}@{{/isString}}{{{defaultValue}}}); {{/conditionalSerialization}} {{/defaultValue}} {{^defaultValue}} From e798ea3325c11613eb1f8f01f895e901eb096ffb Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Wed, 29 Oct 2025 14:17:50 +0100 Subject: [PATCH 16/44] Csharp: fix nullable generation # Conflicts: # modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java # modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java # modules/openapi-generator/src/main/resources/csharp/api.mustache # modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache # modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache --- .../languages/AbstractCSharpCodegen.java | 42 ++++++++++++++----- .../languages/CSharpClientCodegen.java | 30 ++++++------- .../csharp/NullConditionalParameter.mustache | 2 +- .../csharp/NullConditionalProperty.mustache | 2 +- .../src/main/resources/csharp/api.mustache | 16 +++---- .../main/resources/csharp/api_doc.mustache | 2 +- .../csharp/libraries/httpclient/api.mustache | 16 +++---- .../libraries/unityWebRequest/api.mustache | 16 +++---- .../resources/csharp/modelGeneric.mustache | 14 +++---- .../main/resources/csharp/model_doc.mustache | 4 +- 10 files changed, 80 insertions(+), 64 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index c455247d6a3f..e6df53b279aa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -44,6 +44,8 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; +import static org.openapitools.codegen.CodegenConstants.*; +import static org.openapitools.codegen.languages.CSharpClientCodegen.GENERICHOST; import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -1159,23 +1161,31 @@ private void patchParameter(CodegenModel model, CodegenParameter parameter) { } protected void processOperation(CodegenOperation operation) { - String[] nestedTypes = { "List", "Collection", "ICollection", "Dictionary" }; + if (operation.returnProperty == null || operation.returnProperty.items == null) { + return; + } - Arrays.stream(nestedTypes).forEach(nestedType -> { - if (operation.returnProperty != null && operation.returnType.contains("<" + nestedType + ">") && operation.returnProperty.items != null) { - String nestedReturnType = operation.returnProperty.items.dataType; - operation.returnType = operation.returnType.replace("<" + nestedType + ">", "<" + nestedReturnType + ">"); + String[] nestedTypes = {"List", "Collection", "ICollection", "Dictionary"}; + String dataType = operation.returnProperty.items.dataType; + if (!GENERICHOST.equals(getLibrary())) { + if (operation.returnProperty.items.isNullable && (this.nullReferenceTypesFlag || operation.returnProperty.items.isEnum || getValueTypes().contains(dataType)) && !dataType.endsWith("?")) { + dataType += "?"; + } + } + + for (String nestedType : nestedTypes) { + if (operation.returnType.contains("<" + nestedType + ">")) { + operation.returnType = operation.returnType.replace("<" + nestedType + ">", "<" + dataType + ">"); operation.returnProperty.dataType = operation.returnType; operation.returnProperty.datatypeWithEnum = operation.returnType; } - if (operation.returnProperty != null && operation.returnType.contains(", " + nestedType + ">") && operation.returnProperty.items != null) { - String nestedReturnType = operation.returnProperty.items.dataType; - operation.returnType = operation.returnType.replace(", " + nestedType + ">", ", " + nestedReturnType + ">"); + if (operation.returnType.contains(", " + nestedType + ">")) { + operation.returnType = operation.returnType.replace(", " + nestedType + ">", ", " + dataType + ">"); operation.returnProperty.dataType = operation.returnType; operation.returnProperty.datatypeWithEnum = operation.returnType; } - }); + } } protected void updateCodegenParameterEnumLegacy(CodegenParameter parameter, CodegenModel model) { @@ -1435,6 +1445,12 @@ private String getArrayTypeDeclaration(Schema arr) { StringBuilder instantiationType = new StringBuilder(arrayType); Schema items = ModelUtils.getSchemaItems(arr); String nestedType = getTypeDeclaration(items); + + if (!GENERICHOST.equals(getLibrary())) { + if (ModelUtils.isNullable(items) && (this.nullReferenceTypesFlag || ModelUtils.isEnumSchema(items) || getValueTypes().contains(nestedType)) && !nestedType.endsWith("?")) { + nestedType += "?"; + } + } // TODO: We may want to differentiate here between generics and primitive arrays. instantiationType.append("<").append(nestedType).append(">"); return instantiationType.toString(); @@ -1455,7 +1471,13 @@ public String getTypeDeclaration(Schema p) { } else if (ModelUtils.isMapSchema(p)) { // Should we also support maps of maps? Schema inner = ModelUtils.getAdditionalProperties(p); - return getSchemaType(p) + ""; + String typeDeclaration = getTypeDeclaration(inner); + if (!GENERICHOST.equals(getLibrary())) { + if (ModelUtils.isNullable(inner) && (this.nullReferenceTypesFlag || ModelUtils.isEnumSchema(inner) || getValueTypes().contains(typeDeclaration)) && !typeDeclaration.endsWith("?")) { + typeDeclaration += "?"; + } + } + return getSchemaType(p) + ""; } return super.getTypeDeclaration(p); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 93244f344a29..4aae556ded22 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -603,23 +603,6 @@ public String getNameUsingModelPropertyNaming(String name) { } } - @Override - public String getNullableType(Schema p, String type) { - if (GENERICHOST.equals(getLibrary())) { - return super.getNullableType(p, type); - } - - if (languageSpecificPrimitives.contains(type)) { - if (!type.endsWith("?") && isSupportNullable() && ModelUtils.isNullable(p) && (nullReferenceTypesFlag || this.getNullableTypes().contains(type))) { - return type + "?"; - } else { - return type; - } - } else { - return null; - } - } - @Override public CodegenType getTag() { return CodegenType.CLIENT; @@ -1528,9 +1511,20 @@ public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(additionalProperties)) { inner = toInstantiationType(additionalProperties); } + if (!GENERICHOST.equals(getLibrary())) { + if (ModelUtils.isNullable(additionalProperties) && (this.nullReferenceTypesFlag || ModelUtils.isEnumSchema(additionalProperties) || getValueTypes().contains(inner)) && !inner.endsWith("?")) { + inner += "?"; + } + } return instantiationTypes.get("map") + ""; } else if (ModelUtils.isArraySchema(schema)) { - String inner = getSchemaType(ModelUtils.getSchemaItems(schema)); + Schema schemaItems = ModelUtils.getSchemaItems(schema); + String inner = getSchemaType(schemaItems); + if (!GENERICHOST.equals(getLibrary())) { + if (ModelUtils.isNullable(schemaItems) && (this.nullReferenceTypesFlag || ModelUtils.isEnumSchema(schemaItems) || getValueTypes().contains(inner)) && !inner.endsWith("?")) { + inner += "?"; + } + } return instantiationTypes.get("array") + "<" + inner + ">"; } else { return null; diff --git a/modules/openapi-generator/src/main/resources/csharp/NullConditionalParameter.mustache b/modules/openapi-generator/src/main/resources/csharp/NullConditionalParameter.mustache index d8ad9266699e..53c99d1b2275 100644 --- a/modules/openapi-generator/src/main/resources/csharp/NullConditionalParameter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/NullConditionalParameter.mustache @@ -1 +1 @@ -{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}} \ No newline at end of file +{{#isNullable}}{{#vendorExtensions.x-nullable-type}}?{{/vendorExtensions.x-nullable-type}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache b/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache index d8ad9266699e..53c99d1b2275 100644 --- a/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache @@ -1 +1 @@ -{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}} \ No newline at end of file +{{#isNullable}}{{#vendorExtensions.x-nullable-type}}?{{/vendorExtensions.x-nullable-type}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index 5d0b2810654a..e39eba2ef853 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -38,7 +38,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); /// /// {{summary}} @@ -53,7 +53,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); {{/operation}} #endregion Synchronous Operations } @@ -82,7 +82,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default); /// /// {{summary}} @@ -100,7 +100,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default); {{/operation}} #endregion Asynchronous Operations } @@ -244,7 +244,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -260,7 +260,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) { {{#allParams}} {{^nullable}} @@ -510,7 +510,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false);{{/returnType}} @@ -529,7 +529,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default) { {{#allParams}} {{^nullable}} diff --git a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache index da1654635648..ba2229afeb88 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache @@ -15,7 +15,7 @@ All URIs are relative to *{{{basePath}}}* {{#operation}} # **{{{operationId}}}** -> {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}}{{^useGenericHost}}{{>NullConditionalParameter}}{{/useGenericHost}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache index 613e7d1b789f..800ec6c17286 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache @@ -36,7 +36,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// /// {{summary}} @@ -50,7 +50,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations } @@ -78,7 +78,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); /// /// {{summary}} @@ -95,7 +95,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); {{/operation}} #endregion Asynchronous Operations } @@ -335,7 +335,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -350,7 +350,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} {{^nullable}} @@ -552,7 +552,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}} @@ -570,7 +570,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) { {{#allParams}} {{^nullable}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache index 1666a1ae040c..4b0d707e7827 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache @@ -35,7 +35,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// /// {{summary}} @@ -49,7 +49,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations } @@ -77,7 +77,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); /// /// {{summary}} @@ -94,7 +94,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); {{/operation}} #endregion Asynchronous Operations } @@ -261,7 +261,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -276,7 +276,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} {{^nullable}} @@ -476,7 +476,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) { var task = {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken); {{#returnType}} @@ -508,7 +508,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) { {{#allParams}} {{^nullable}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 4806e018f315..bad1b0ca8b54 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -136,7 +136,7 @@ {{#hasOnlyReadOnly}} [JsonConstructorAttribute] {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default{{/defaultValue}}{{/required}}{{^required}}default{{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} + public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default{{/defaultValue}}{{/required}}{{^required}}default{{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} { {{! Push all sanity tests on top }} {{#vars}} @@ -161,10 +161,10 @@ {{^required}} {{#defaultValue}} {{^conditionalSerialization}} - this.{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}} : new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>({{#isString}}@{{/isString}}{{{defaultValue}}}); + this.{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}} : new Option<{{{datatypeWithEnum}}}{{>NullConditionalParameter}}>({{#isString}}@{{/isString}}{{{defaultValue}}}); {{/conditionalSerialization}} {{#conditionalSerialization}} - this._{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}} : new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>({{#isString}}@{{/isString}}{{{defaultValue}}}); + this._{{name}} = {{>CamelCaseSanitizedParamName}}.IsSet ? {{>CamelCaseSanitizedParamName}} : new Option<{{{datatypeWithEnum}}}{{>NullConditionalParameter}}>({{#isString}}@{{/isString}}{{{defaultValue}}}); {{/conditionalSerialization}} {{/defaultValue}} {{^defaultValue}} @@ -220,7 +220,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } {{#isReadOnly}} /// @@ -242,7 +242,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{name}} { get; private set; } + public {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; private set; } /// /// Returns false as {{name}} should not be serialized given that it's read-only. @@ -261,7 +261,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{name}} + public {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get{ return _{{name}};} set @@ -270,7 +270,7 @@ _flag{{name}} = true; } } - private {{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}} _{{name}}; + private {{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} _{{name}}; private bool _flag{{name}}; /// diff --git a/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache b/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache index 3c7f8b2db810..5248be74d8c0 100644 --- a/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache @@ -10,10 +10,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- {{#parent}} {{#parentVars}} -**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +**{{name}}** | {{#isPrimitiveType}}**{{dataType}}{{^useGenericHost}}{{>NullConditionalProperty}}{{/useGenericHost}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/parentVars}} {{/parent}} -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}{{^useGenericHost}}{{>NullConditionalProperty}}{{/useGenericHost}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[Back to Model list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-models) [[Back to API list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-api-endpoints) [[Back to README]](../{{#useGenericHost}}../{{/useGenericHost}}README.md) From 288b0b6ddc4be959eb1fa57026a1e868b662aff5 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Wed, 29 Oct 2025 15:00:19 +0100 Subject: [PATCH 17/44] modelGeneric: fix nullable not handled on complex types --- .../src/main/resources/csharp/modelGeneric.mustache | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index bad1b0ca8b54..9811fed7a73a 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -49,7 +49,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{/complexType}}{{^required}}>{{/required}} {{name}} { get; set; } + public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; set; } {{#isReadOnly}} /// @@ -68,7 +68,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{/complexType}}{{^required}}>{{/required}} {{name}} { get; set; } + public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get; set; } /// @@ -86,7 +86,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{/complexType}}{{^required}}>{{/required}} {{name}} + public {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{name}} { get{ return _{{name}};} set @@ -95,7 +95,7 @@ _flag{{name}} = true; } } - private {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{/complexType}}{{^required}}>{{/required}} _{{name}}; + private {{^required}}Option<{{/required}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{>NullConditionalProperty}}{{^required}}>{{/required}} _{{name}}; private bool _flag{{name}}; /// From 0bf0df213aafb22d98b93be4f6b1933d87afef6f Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Wed, 29 Oct 2025 15:05:58 +0100 Subject: [PATCH 18/44] Option.mustache: better handling of null reference types --- .../openapi-generator/src/main/resources/csharp/Option.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/Option.mustache b/modules/openapi-generator/src/main/resources/csharp/Option.mustache index a53c4ea04e85..b5877f329483 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Option.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Option.mustache @@ -54,7 +54,7 @@ namespace {{packageName}}.{{clientPackage}} { Type innerType = objectType.GetGenericArguments()[0]; var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); - var converter = (JsonConverter)Activator.CreateInstance(converterType)!; + var converter = (JsonConverter)Activator.CreateInstance(converterType){{nrt!}}; return converter.ReadJson(reader, objectType, existingValue, serializer); } } From 698f124eb93c2aac8b2036d0f79636102691bab9 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Wed, 29 Oct 2025 15:12:55 +0100 Subject: [PATCH 19/44] modelGeneric.mustache: fix conditional serialization --- .../src/main/resources/csharp/modelGeneric.mustache | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 9811fed7a73a..8eb423fc092c 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -186,10 +186,7 @@ {{/conditionalSerialization}} {{#conditionalSerialization}} this._{{name}} = {{>CamelCaseSanitizedParamName}}; - if (this.{{name}}.IsSet) - { - this._flag{{name}} = true; - } + this._flag{{name}} = true; {{/conditionalSerialization}} {{/required}} {{/isReadOnly}} From 8ad66c131e489f2ec5d22490ab358c5887f1bf76 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Wed, 29 Oct 2025 15:31:32 +0100 Subject: [PATCH 20/44] fix typo in httpclient/api.mustache --- .../src/main/resources/csharp/libraries/httpclient/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache index 800ec6c17286..3840b11267eb 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache @@ -650,7 +650,7 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter {{/required}} {{^required}} - if ({{paramName}}IsSet) + if ({{paramName}}.IsSet) { localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}.Value)); // header parameter } From df4dc2a28eda78b1df06f3cd8a312936a5fc8342 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Wed, 29 Oct 2025 16:28:35 +0100 Subject: [PATCH 21/44] call postProcessModelProperty on readWriteVars --- .../languages/CSharpClientCodegen.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 4aae556ded22..6f51509bf9b5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -442,16 +442,22 @@ public CodegenModel fromModel(String name, Schema model) { } } - // Cleanup possible duplicates. Currently, readWriteVars can contain the same property twice. May or may not be isolated to C#. - if (codegenModel != null && codegenModel.readWriteVars != null && codegenModel.readWriteVars.size() > 1) { - int length = codegenModel.readWriteVars.size() - 1; - for (int i = length; i > (length / 2); i--) { - final CodegenProperty codegenProperty = codegenModel.readWriteVars.get(i); - // If the property at current index is found earlier in the list, remove this last instance. - if (codegenModel.readWriteVars.indexOf(codegenProperty) < i) { - codegenModel.readWriteVars.remove(i); + if (codegenModel != null && codegenModel.readWriteVars != null) { + // Cleanup possible duplicates. Currently, readWriteVars can contain the same property twice. May or may not be isolated to C#. + if (codegenModel.readWriteVars.size() > 1) { + int length = codegenModel.readWriteVars.size() - 1; + for (int i = length; i > (length / 2); i--) { + final CodegenProperty codegenProperty = codegenModel.readWriteVars.get(i); + // If the property at current index is found earlier in the list, remove this last instance. + if (codegenModel.readWriteVars.indexOf(codegenProperty) < i) { + codegenModel.readWriteVars.remove(i); + } } } + + for (CodegenProperty prop : codegenModel.readWriteVars) { + postProcessModelProperty(codegenModel, prop); + } } // avoid breaking changes From b2173a9ac9a2520636b9a4745e8231e671172c83 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Wed, 29 Oct 2025 14:25:30 +0100 Subject: [PATCH 22/44] Fix tests # Conflicts: # modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java --- .../codegen/csharpnetcore/CSharpModelTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java index 00e47e504a85..f76b2e77d900 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java @@ -274,10 +274,10 @@ public void nullablePropertyTest() { final CodegenProperty property1 = cm.vars.get(0); Assert.assertEquals(property1.baseName, "id"); - Assert.assertEquals(property1.dataType, "long?"); + Assert.assertEquals(property1.dataType, "long"); Assert.assertEquals(property1.name, "Id"); Assert.assertNull(property1.defaultValue); - Assert.assertEquals(property1.baseType, "long?"); + Assert.assertEquals(property1.baseType, "long"); Assert.assertTrue(property1.required); Assert.assertTrue(property1.isPrimitiveType); @@ -294,10 +294,10 @@ public void nullablePropertyTest() { final CodegenProperty property3 = cm.vars.get(2); Assert.assertEquals(property3.baseName, "name"); - Assert.assertEquals(property3.dataType, "string?"); + Assert.assertEquals(property3.dataType, "string"); Assert.assertEquals(property3.name, "Name"); Assert.assertNull(property3.defaultValue); - Assert.assertEquals(property3.baseType, "string?"); + Assert.assertEquals(property3.baseType, "string"); Assert.assertFalse(property3.required); Assert.assertTrue(property3.isPrimitiveType); } From 0ee25270297f9688f24b5d9089087f9339365c25 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Wed, 29 Oct 2025 18:26:19 +0100 Subject: [PATCH 23/44] Fix ApiClient not using the OptionJsonConverter # Conflicts: # samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs --- .../src/main/resources/csharp/ApiClient.mustache | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache index 0d826c87c9d0..6f2c8a0207be 100644 --- a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache @@ -30,6 +30,7 @@ using Polly; using {{packageName}}.Client.Auth; {{/hasOAuthMethods}} using {{packageName}}.{{modelPackage}}; +using {{packageName}}.{{clientPackage}}; namespace {{packageName}}.Client { @@ -49,7 +50,8 @@ namespace {{packageName}}.Client { OverrideSpecifiedNames = false } - } + }{{^useGenericHost}}, + Converters = new List { new OptionConverterFactory() }{{/useGenericHost}} }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -184,7 +186,8 @@ namespace {{packageName}}.Client { OverrideSpecifiedNames = false } - } + }{{^useGenericHost}}, + Converters = new List { new OptionConverterFactory() }{{/useGenericHost}} }; /// From d0deb9997fe66760b057211d6c2655eed73d2cb4 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Thu, 30 Oct 2025 09:43:35 +0100 Subject: [PATCH 24/44] Remove String? from languagePrimitives --- .../openapitools/codegen/languages/AbstractCSharpCodegen.java | 4 ++-- .../openapitools/codegen/csharpnetcore/CSharpModelTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index e6df53b279aa..4eace162df9a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -166,8 +166,8 @@ public AbstractCSharpCodegen() { // TODO: Either include fully qualified names here or handle in DefaultCodegen via lastIndexOf(".") search languageSpecificPrimitives = new HashSet<>( Arrays.asList( - "String?", - "string?", +// "String?", +// "string?", "String", "string", "bool?", diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java index f76b2e77d900..3716ac412f4c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java @@ -412,7 +412,7 @@ public void nullablePropertyWithNullableReferenceTypesTest() { Assert.assertNull(property3.defaultValue); Assert.assertEquals(property3.baseType, "string?"); Assert.assertFalse(property3.required); - Assert.assertTrue(property3.isPrimitiveType); + Assert.assertFalse(property3.isPrimitiveType); final CodegenProperty property4 = cm.vars.get(3); Assert.assertEquals(property4.baseName, "subObject"); From 88fada4a65ea93de749275a7616bf2f4b0193650 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Thu, 30 Oct 2025 09:50:18 +0100 Subject: [PATCH 25/44] Remove String? from languagePrimitives --- .../openapitools/codegen/languages/AbstractCSharpCodegen.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 4eace162df9a..fd86835ee36d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -166,8 +166,6 @@ public AbstractCSharpCodegen() { // TODO: Either include fully qualified names here or handle in DefaultCodegen via lastIndexOf(".") search languageSpecificPrimitives = new HashSet<>( Arrays.asList( -// "String?", -// "string?", "String", "string", "bool?", From 283a2eb633fae4143a6f79d0a2e8c8efb44f425c Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Thu, 30 Oct 2025 11:40:13 +0100 Subject: [PATCH 26/44] Copy old NullConditionalParameter.mustache in generichost to make sure behaviour stays the same --- .../libraries/generichost/NullConditionalParameter.mustache | 1 + 1 file changed, 1 insertion(+) create mode 100644 modules/openapi-generator/src/main/resources/csharp/libraries/generichost/NullConditionalParameter.mustache diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/NullConditionalParameter.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/NullConditionalParameter.mustache new file mode 100644 index 000000000000..d8ad9266699e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/NullConditionalParameter.mustache @@ -0,0 +1 @@ +{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}} \ No newline at end of file From 0ae1ad5612ec7a5d3aa7f85698b4fafddfeddb43 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Wed, 29 Oct 2025 17:42:42 +0100 Subject: [PATCH 27/44] Fix tests --- .../Org.OpenAPITools.Test/Api/PetApiTests.cs | 58 +++++++------- .../Api/PetApiTestsV2.cs | 78 +++++++++---------- .../Org.OpenAPITools.Test/Api/PetApiTests.cs | 54 ++++++------- 3 files changed, 95 insertions(+), 95 deletions(-) diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTests.cs index f0b087398912..f617e209ba2b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTests.cs @@ -132,7 +132,7 @@ public void FindPetsByStatusTest() foreach (Pet pet in listPet) // Loop through List with foreach. { Assert.IsType(pet); - Assert.Equal("available", pet.Tags[0].Name); + Assert.Equal("available", pet.Tags.Value[0].Name); } } @@ -165,18 +165,18 @@ public void GetPetByIdTest() Assert.IsType(response); Assert.Equal("Csharp test", response.Name); - Assert.Equal(Pet.StatusEnum.Available, response.Status); + Assert.Equal(Pet.StatusEnum.Available, response.Status.Value); - Assert.IsType>(response.Tags); - Assert.Equal(petId, response.Tags[0].Id); - Assert.Equal("csharp sample tag name1", response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(petId, response.Tags.Value[0].Id.Value); + Assert.Equal("csharp sample tag name1", response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal("sample photoUrls", response.PhotoUrls[0]); - Assert.IsType(response.Category); - Assert.Equal(56, response.Category.Id); - Assert.Equal("sample category name2", response.Category.Name); + Assert.IsType(response.Category.Value); + Assert.Equal(56, response.Category.Value.Id.Value); + Assert.Equal("sample category name2", response.Category.Value.Name); } /// @@ -191,18 +191,18 @@ public void TestGetPetByIdAsync() Assert.IsType(response); Assert.Equal("Csharp test", response.Name); - Assert.Equal(Pet.StatusEnum.Available, response.Status); + Assert.Equal(Pet.StatusEnum.Available, response.Status.Value); - Assert.IsType>(response.Tags); - Assert.Equal(petId, response.Tags[0].Id); - Assert.Equal("csharp sample tag name1", response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(petId, response.Tags.Value[0].Id.Value); + Assert.Equal("csharp sample tag name1", response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal("sample photoUrls", response.PhotoUrls[0]); - Assert.IsType(response.Category); - Assert.Equal(56, response.Category.Id); - Assert.Equal("sample category name2", response.Category.Name); + Assert.IsType(response.Category.Value); + Assert.Equal(56, response.Category.Value.Id.Value); + Assert.Equal("sample category name2", response.Category.Value.Name); } /// @@ -254,18 +254,18 @@ public void TestGetPetByIdWithHttpInfoAsync() Assert.IsType(response); Assert.Equal("Csharp test", response.Name); - Assert.Equal(Pet.StatusEnum.Available, response.Status); + Assert.Equal(Pet.StatusEnum.Available, response.Status.Value); - Assert.IsType>(response.Tags); - Assert.Equal(petId, response.Tags[0].Id); - Assert.Equal("csharp sample tag name1", response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(petId, response.Tags.Value[0].Id.Value); + Assert.Equal("csharp sample tag name1", response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal("sample photoUrls", response.PhotoUrls[0]); - Assert.IsType(response.Category); - Assert.Equal(56, response.Category.Id); - Assert.Equal("sample category name2", response.Category.Name); + Assert.IsType(response.Category.Value); + Assert.Equal(56, response.Category.Value.Id.Value); + Assert.Equal("sample category name2", response.Category.Value.Name); } [Fact] @@ -310,14 +310,14 @@ public void UpdatePetWithFormTest() Pet response = petApi.GetPetById(petId); Assert.IsType(response); - Assert.IsType(response.Category); - Assert.IsType>(response.Tags); + Assert.IsType(response.Category.Value); + Assert.IsType>(response.Tags.Value); Assert.Equal("new form name", response.Name); - Assert.Equal(Pet.StatusEnum.Pending, response.Status); + Assert.Equal(Pet.StatusEnum.Pending, response.Status.Value); - Assert.Equal(petId, response.Tags[0].Id); - Assert.Equal(56, response.Category.Id); + Assert.Equal(petId, response.Tags.Value[0].Id.Value); + Assert.Equal(56, response.Category.Value.Id.Value); // test optional parameter petApi.UpdatePetWithForm(petId, "new form name2"); @@ -335,11 +335,11 @@ public void UploadFileTest() Stream _imageStream = _assembly.GetManifestResourceStream("Org.OpenAPITools.Test.linux-logo.png"); PetApi petApi = new PetApi(); // test file upload with form parameters - petApi.UploadFile(petId, "new form name", _imageStream); + petApi.UploadFile(petId, "new form name", (FileParameter) _imageStream); // test file upload without any form parameters // using optional parameter syntax introduced at .net 4.0 - petApi.UploadFile(petId: petId, file: _imageStream); + petApi.UploadFile(petId: petId, file: (FileParameter) _imageStream); } /// diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTestsV2.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTestsV2.cs index e00f3d614671..00481c96f984 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTestsV2.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTestsV2.cs @@ -74,14 +74,14 @@ public void GetPetById_GivenExistentId_ReturnsPet() Assert.IsType(response); Assert.Equal(expected.Name, response.Name); Assert.Equal(expected.Status, response.Status); - Assert.IsType>(response.Tags); - Assert.Equal(expected.Tags[0].Id, response.Tags[0].Id); - Assert.Equal(expected.Tags[0].Name, response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(expected.Tags.Value[0].Id.Value, response.Tags.Value[0].Id.Value); + Assert.Equal(expected.Tags.Value[0].Name.Value, response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal(expected.PhotoUrls[0], response.PhotoUrls[0]); Assert.IsType(response.Category); - Assert.Equal(expected.Category.Id, response.Category.Id); - Assert.Equal(expected.Category.Name, response.Category.Name); + Assert.Equal(expected.Category.Value.Id.Value, response.Category.Value.Id.Value); + Assert.Equal(expected.Category.Value.Name, response.Category.Value.Name); } /// @@ -119,14 +119,14 @@ public void GetPetByIdWithHttpInfo_GivenExistentId_Returns200Response() Assert.Equal(expected.Name, result.Name); Assert.Equal(expected.Status, result.Status); - Assert.IsType>(result.Tags); - Assert.Equal(expected.Tags[0].Id, result.Tags[0].Id); - Assert.Equal(expected.Tags[0].Name, result.Tags[0].Name); + Assert.IsType>(result.Tags.Value); + Assert.Equal(expected.Tags.Value[0].Id.Value, result.Tags.Value[0].Id.Value); + Assert.Equal(expected.Tags.Value[0].Name.Value, result.Tags.Value[0].Name.Value); Assert.IsType>(result.PhotoUrls); Assert.Equal(expected.PhotoUrls[0], result.PhotoUrls[0]); Assert.IsType(result.Category); - Assert.Equal(expected.Category.Id, result.Category.Id); - Assert.Equal(expected.Category.Name, result.Category.Name); + Assert.Equal(expected.Category.Value.Id.Value, result.Category.Value.Id.Value); + Assert.Equal(expected.Category.Value.Name, result.Category.Value.Name); } /// @@ -183,14 +183,14 @@ public async Task GetPetByIdAsync_GivenExistentId_ReturnsPet() Assert.IsType(response); Assert.Equal(expected.Name, response.Name); Assert.Equal(expected.Status, response.Status); - Assert.IsType>(response.Tags); - Assert.Equal(expected.Tags[0].Id, response.Tags[0].Id); - Assert.Equal(expected.Tags[0].Name, response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(expected.Tags.Value[0].Id.Value, response.Tags.Value[0].Id.Value); + Assert.Equal(expected.Tags.Value[0].Name.Value, response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal(expected.PhotoUrls[0], response.PhotoUrls[0]); - Assert.IsType(response.Category); - Assert.Equal(expected.Category.Id, response.Category.Id); - Assert.Equal(expected.Category.Name, response.Category.Name); + Assert.IsType(response.Category.Value); + Assert.Equal(expected.Category.Value.Id.Value, response.Category.Value.Id.Value); + Assert.Equal(expected.Category.Value.Name, response.Category.Value.Name); } /// @@ -225,14 +225,14 @@ public async Task GetPetByIdWithHttpInfoAsync_GivenExistentId_Returns200Response Assert.Equal(expected.Name, result.Name); Assert.Equal(expected.Status, result.Status); - Assert.IsType>(result.Tags); - Assert.Equal(expected.Tags[0].Id, result.Tags[0].Id); - Assert.Equal(expected.Tags[0].Name, result.Tags[0].Name); + Assert.IsType>(result.Tags.Value); + Assert.Equal(expected.Tags.Value[0].Id.Value, result.Tags.Value[0].Id.Value); + Assert.Equal(expected.Tags.Value[0].Name, result.Tags.Value[0].Name); Assert.IsType>(result.PhotoUrls); Assert.Equal(expected.PhotoUrls[0], result.PhotoUrls[0]); - Assert.IsType(result.Category); - Assert.Equal(expected.Category.Id, result.Category.Id); - Assert.Equal(expected.Category.Name, result.Category.Name); + Assert.IsType(result.Category.Value); + Assert.Equal(expected.Category.Value.Id.Value, result.Category.Value.Id.Value); + Assert.Equal(expected.Category.Value.Name, result.Category.Value.Name); } /// @@ -284,7 +284,7 @@ public void FindPetsByStatus_ReturnsListOfPetsFiltered() foreach (Pet pet in pets) { Assert.IsType(pet); - Assert.Equal(Pet.StatusEnum.Available, pet.Status); + Assert.Equal(Pet.StatusEnum.Available, pet.Status.Value); } } @@ -363,14 +363,14 @@ public void UpdatePetWithForm_GivenExistentId_UpdatesTheFields() Assert.IsType(response); Assert.Equal(expected.Name, response.Name); Assert.Equal(expected.Status, response.Status); - Assert.IsType>(response.Tags); - Assert.Equal(expected.Tags[0].Id, response.Tags[0].Id); - Assert.Equal(expected.Tags[0].Name, response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(expected.Tags.Value[0].Id.Value, response.Tags.Value[0].Id.Value); + Assert.Equal(expected.Tags.Value[0].Name.Value, response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal(expected.PhotoUrls[0], response.PhotoUrls[0]); - Assert.IsType(response.Category); - Assert.Equal(expected.Category.Id, response.Category.Id); - Assert.Equal(expected.Category.Name, response.Category.Name); + Assert.IsType(response.Category.Value); + Assert.Equal(expected.Category.Value.Id.Value, response.Category.Value.Id.Value); + Assert.Equal(expected.Category.Value.Name, response.Category.Value.Name); _petApi.UpdatePetWithForm(PetId, "name updated twice"); @@ -387,7 +387,7 @@ public void UploadFile_UploadFileUsingFormParameters_UpdatesTheFields() { var assembly = Assembly.GetExecutingAssembly(); using Stream imageStream = assembly.GetManifestResourceStream("Org.OpenAPITools.Test.linux-logo.png"); - _petApi.UploadFile(PetId, "metadata sample", imageStream); + _petApi.UploadFile(PetId, "metadata sample", (FileParameter) imageStream); } /// @@ -398,7 +398,7 @@ public void UploadFile_UploadFileAlone_UpdatesTheField() { var assembly = Assembly.GetExecutingAssembly(); using Stream imageStream = assembly.GetManifestResourceStream("Org.OpenAPITools.Test.linux-logo.png"); - _petApi.UploadFile(petId: PetId, file: imageStream); + _petApi.UploadFile(petId: PetId, file: (FileParameter) imageStream); } #endregion @@ -446,14 +446,14 @@ public async Task UpdatePetWithFormAsync_GivenExistentId_UpdatesTheFields() Assert.IsType(response); Assert.Equal(expected.Name, response.Name); Assert.Equal(expected.Status, response.Status); - Assert.IsType>(response.Tags); - Assert.Equal(expected.Tags[0].Id, response.Tags[0].Id); - Assert.Equal(expected.Tags[0].Name, response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(expected.Tags.Value[0].Id.Value, response.Tags.Value[0].Id.Value); + Assert.Equal(expected.Tags.Value[0].Name.Value, response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal(expected.PhotoUrls[0], response.PhotoUrls[0]); - Assert.IsType(response.Category); - Assert.Equal(expected.Category.Id, response.Category.Id); - Assert.Equal(expected.Category.Name, response.Category.Name); + Assert.IsType(response.Category.Value); + Assert.Equal(expected.Category.Value.Id.Value, response.Category.Value.Id.Value); + Assert.Equal(expected.Category.Value.Name, response.Category.Value.Name); await _petApi.UpdatePetWithFormAsync(PetId, "name updated twice"); @@ -470,7 +470,7 @@ public async Task UploadFileAsync_UploadFileUsingFormParameters_UpdatesTheFields { var assembly = Assembly.GetExecutingAssembly(); await using Stream imageStream = assembly.GetManifestResourceStream("Org.OpenAPITools.Test.linux-logo.png"); - await _petApi.UploadFileAsync(PetId, "metadata sample", imageStream); + await _petApi.UploadFileAsync(PetId, "metadata sample", (FileParameter) imageStream); } /// @@ -481,7 +481,7 @@ public async Task UploadFileAsync_UploadFileAlone_UpdatesTheField() { var assembly = Assembly.GetExecutingAssembly(); await using Stream imageStream = assembly.GetManifestResourceStream("Org.OpenAPITools.Test.linux-logo.png"); - await _petApi.UploadFileAsync(petId: PetId, file: imageStream); + await _petApi.UploadFileAsync(petId: PetId, file: (FileParameter) imageStream); } #endregion diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTests.cs index 35c2d517a210..277fa47a3d5d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/PetApiTests.cs @@ -131,7 +131,7 @@ public void FindPetsByStatusTest() foreach (Pet pet in listPet) // Loop through List with foreach. { Assert.IsType(pet); - Assert.Equal("available", pet.Tags[0].Name); + Assert.Equal("available", pet.Tags.Value[0].Name); } } @@ -162,18 +162,18 @@ public void GetPetByIdTest() Assert.IsType(response); Assert.Equal("Csharp test", response.Name); - Assert.Equal(Pet.StatusEnum.Available, response.Status); + Assert.Equal(Pet.StatusEnum.Available, response.Status.Value); - Assert.IsType>(response.Tags); - Assert.Equal(petId, response.Tags[0].Id); - Assert.Equal("csharp sample tag name1", response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(petId, response.Tags.Value[0].Id.Value); + Assert.Equal("csharp sample tag name1", response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal("sample photoUrls", response.PhotoUrls[0]); - Assert.IsType(response.Category); - Assert.Equal(56, response.Category.Id); - Assert.Equal("sample category name2", response.Category.Name); + Assert.IsType(response.Category.Value); + Assert.Equal(56, response.Category.Value.Id.Value); + Assert.Equal("sample category name2", response.Category.Value.Name); } /// @@ -188,18 +188,18 @@ public void TestGetPetByIdAsync() Assert.IsType(response); Assert.Equal("Csharp test", response.Name); - Assert.Equal(Pet.StatusEnum.Available, response.Status); + Assert.Equal(Pet.StatusEnum.Available, response.Status.Value); - Assert.IsType>(response.Tags); - Assert.Equal(petId, response.Tags[0].Id); - Assert.Equal("csharp sample tag name1", response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(petId, response.Tags.Value[0].Id.Value); + Assert.Equal("csharp sample tag name1", response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal("sample photoUrls", response.PhotoUrls[0]); - Assert.IsType(response.Category); - Assert.Equal(56, response.Category.Id); - Assert.Equal("sample category name2", response.Category.Name); + Assert.IsType(response.Category.Value); + Assert.Equal(56, response.Category.Value.Id.Value); + Assert.Equal("sample category name2", response.Category.Value.Name); } /* a simple test for binary response. no longer in use. @@ -232,18 +232,18 @@ public void TestGetPetByIdWithHttpInfoAsync() Assert.IsType(response); Assert.Equal("Csharp test", response.Name); - Assert.Equal(Pet.StatusEnum.Available, response.Status); + Assert.Equal(Pet.StatusEnum.Available, response.Status.Value); - Assert.IsType>(response.Tags); - Assert.Equal(petId, response.Tags[0].Id); - Assert.Equal("csharp sample tag name1", response.Tags[0].Name); + Assert.IsType>(response.Tags.Value); + Assert.Equal(petId, response.Tags.Value[0].Id.Value); + Assert.Equal("csharp sample tag name1", response.Tags.Value[0].Name.Value); Assert.IsType>(response.PhotoUrls); Assert.Equal("sample photoUrls", response.PhotoUrls[0]); - Assert.IsType(response.Category); - Assert.Equal(56, response.Category.Id); - Assert.Equal("sample category name2", response.Category.Name); + Assert.IsType(response.Category.Value); + Assert.Equal(56, response.Category.Value.Id.Value); + Assert.Equal("sample category name2", response.Category.Value.Name); } /// @@ -270,14 +270,14 @@ public void UpdatePetWithFormTest() Pet response = petApi.GetPetById(petId); Assert.IsType(response); - Assert.IsType(response.Category); - Assert.IsType>(response.Tags); + Assert.IsType(response.Category.Value); + Assert.IsType>(response.Tags.Value); Assert.Equal("new form name", response.Name); - Assert.Equal(Pet.StatusEnum.Pending, response.Status); + Assert.Equal(Pet.StatusEnum.Pending, response.Status.Value); - Assert.Equal(petId, response.Tags[0].Id); - Assert.Equal(56, response.Category.Id); + Assert.Equal(petId, response.Tags.Value[0].Id.Value); + Assert.Equal(56, response.Category.Value.Id.Value); // test optional parameter petApi.UpdatePetWithForm(petId, "new form name2"); From 54613fa86d5e6b8ef0414dc9eefb5b44bd4d7307 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Thu, 30 Oct 2025 15:22:02 +0100 Subject: [PATCH 28/44] Fix modelGeneric defaultValue --- .../src/main/resources/csharp/modelGeneric.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 8eb423fc092c..13cd27558792 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -136,7 +136,7 @@ {{#hasOnlyReadOnly}} [JsonConstructorAttribute] {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default{{/defaultValue}}{{/required}}{{^required}}default{{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} + public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}){{/defaultValue}}{{/required}}{{^required}}default({{{datatypeWithEnum}}}){{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} { {{! Push all sanity tests on top }} {{#vars}} From 0230f9d2712666aa6c90a3dafe253fcd7621c5b7 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Thu, 30 Oct 2025 17:10:27 +0100 Subject: [PATCH 29/44] Fix default value --- .../csharp/DefaultDataTypeParameter.mustache | 1 + .../src/main/resources/csharp/api.mustache | 16 ++++++++-------- .../DefaultDataTypeParameter.mustache | 1 + .../csharp/libraries/httpclient/api.mustache | 16 ++++++++-------- .../libraries/unityWebRequest/api.mustache | 16 ++++++++-------- .../main/resources/csharp/modelGeneric.mustache | 2 +- 6 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/csharp/DefaultDataTypeParameter.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DefaultDataTypeParameter.mustache diff --git a/modules/openapi-generator/src/main/resources/csharp/DefaultDataTypeParameter.mustache b/modules/openapi-generator/src/main/resources/csharp/DefaultDataTypeParameter.mustache new file mode 100644 index 000000000000..9bff6a270ba2 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp/DefaultDataTypeParameter.mustache @@ -0,0 +1 @@ +default({{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}}) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index e39eba2ef853..1b2893195fc5 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -38,7 +38,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); /// /// {{summary}} @@ -53,7 +53,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); {{/operation}} #endregion Synchronous Operations } @@ -82,7 +82,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// {{summary}} @@ -100,7 +100,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); {{/operation}} #endregion Asynchronous Operations } @@ -244,7 +244,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -260,7 +260,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) { {{#allParams}} {{^nullable}} @@ -510,7 +510,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false);{{/returnType}} @@ -529,7 +529,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#allParams}} {{^nullable}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DefaultDataTypeParameter.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DefaultDataTypeParameter.mustache new file mode 100644 index 000000000000..bcad619a0b5b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DefaultDataTypeParameter.mustache @@ -0,0 +1 @@ +default({{{dataType}}}) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache index 3840b11267eb..aef996c768a7 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache @@ -36,7 +36,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// /// {{summary}} @@ -50,7 +50,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations } @@ -78,7 +78,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// {{summary}} @@ -95,7 +95,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); {{/operation}} #endregion Asynchronous Operations } @@ -335,7 +335,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -350,7 +350,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} {{^nullable}} @@ -552,7 +552,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}} @@ -570,7 +570,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#allParams}} {{^nullable}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache index 4b0d707e7827..53590c377376 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache @@ -35,7 +35,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// /// {{summary}} @@ -49,7 +49,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations } @@ -77,7 +77,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// {{summary}} @@ -94,7 +94,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); {{/operation}} #endregion Asynchronous Operations } @@ -261,7 +261,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -276,7 +276,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} {{^nullable}} @@ -476,7 +476,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken); {{#returnType}} @@ -508,7 +508,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#allParams}} {{^nullable}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 13cd27558792..043a2392c445 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -136,7 +136,7 @@ {{#hasOnlyReadOnly}} [JsonConstructorAttribute] {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}){{/defaultValue}}{{/required}}{{^required}}default({{{datatypeWithEnum}}}){{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} + public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}){{/defaultValue}}{{/required}}{{^required}}default(Option<{{{datatypeWithEnum}}}{{>NullConditionalParameter}}>){{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} { {{! Push all sanity tests on top }} {{#vars}} From 112639eeae8a3d70434d39576c22114111cef311 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 3 Nov 2025 12:50:01 +0100 Subject: [PATCH 30/44] Fix csharp generation --- .../codegen/languages/CSharpClientCodegen.java | 6 ++++++ .../resources/csharp/NullConditionalParameter.mustache | 2 +- .../resources/csharp/NullConditionalProperty.mustache | 2 +- .../src/main/resources/csharp/api.mustache | 8 ++++---- .../resources/csharp/libraries/httpclient/api.mustache | 8 ++++---- .../csharp/libraries/unityWebRequest/api.mustache | 8 ++++---- .../src/main/resources/csharp/modelGeneric.mustache | 6 +++--- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 6f51509bf9b5..8bf3a05f0af3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -634,6 +634,12 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert postProcessEmitDefaultValue(property.vendorExtensions); super.postProcessModelProperty(model, property); + + if (!GENERICHOST.equals(getLibrary())) { + if (property.isNullable && (nullReferenceTypesFlag || (!property.isContainer && (getNullableTypes().contains(property.dataType) || property.isEnum)))) { + property.vendorExtensions.put("x-csharp-use-nullable-operator", true); + } + } } @Override diff --git a/modules/openapi-generator/src/main/resources/csharp/NullConditionalParameter.mustache b/modules/openapi-generator/src/main/resources/csharp/NullConditionalParameter.mustache index 53c99d1b2275..acc78cc03e3e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/NullConditionalParameter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/NullConditionalParameter.mustache @@ -1 +1 @@ -{{#isNullable}}{{#vendorExtensions.x-nullable-type}}?{{/vendorExtensions.x-nullable-type}}{{/isNullable}} \ No newline at end of file +{{#vendorExtensions.x-csharp-use-nullable-operator}}?{{/vendorExtensions.x-csharp-use-nullable-operator}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache b/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache index 53c99d1b2275..acc78cc03e3e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/NullConditionalProperty.mustache @@ -1 +1 @@ -{{#isNullable}}{{#vendorExtensions.x-nullable-type}}?{{/vendorExtensions.x-nullable-type}}{{/isNullable}} \ No newline at end of file +{{#vendorExtensions.x-csharp-use-nullable-operator}}?{{/vendorExtensions.x-csharp-use-nullable-operator}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index 1b2893195fc5..68e73cd0b518 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -264,12 +264,12 @@ namespace {{packageName}}.{{apiPackage}} { {{#allParams}} {{^nullable}} - {{^vendorExtensions.x-csharp-value-type}} + {{^vendorExtensions.x-is-value-type}} // verify the required parameter '{{paramName}}' is set if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - {{/vendorExtensions.x-csharp-value-type}} + {{/vendorExtensions.x-is-value-type}} {{/nullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -533,12 +533,12 @@ namespace {{packageName}}.{{apiPackage}} { {{#allParams}} {{^nullable}} - {{^vendorExtensions.x-csharp-value-type}} + {{^vendorExtensions.x-is-value-type}} // verify the required parameter '{{paramName}}' is set if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - {{/vendorExtensions.x-csharp-value-type}} + {{/vendorExtensions.x-is-value-type}} {{/nullable}} {{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache index aef996c768a7..16e4f85a6211 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache @@ -354,12 +354,12 @@ namespace {{packageName}}.{{apiPackage}} { {{#allParams}} {{^nullable}} - {{^vendorExtensions.x-csharp-value-type}} + {{^vendorExtensions.x-is-value-type}} // verify the required parameter '{{paramName}}' is set if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - {{/vendorExtensions.x-csharp-value-type}} + {{/vendorExtensions.x-is-value-type}} {{/nullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -574,12 +574,12 @@ namespace {{packageName}}.{{apiPackage}} { {{#allParams}} {{^nullable}} - {{^vendorExtensions.x-csharp-value-type}} + {{^vendorExtensions.x-is-value-type}} // verify the required parameter '{{paramName}}' is set if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - {{/vendorExtensions.x-csharp-value-type}} + {{/vendorExtensions.x-is-value-type}} {{/nullable}} {{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache index 53590c377376..987d3f95c542 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache @@ -280,12 +280,12 @@ namespace {{packageName}}.{{apiPackage}} { {{#allParams}} {{^nullable}} - {{^vendorExtensions.x-csharp-value-type}} + {{^vendorExtensions.x-is-value-type}} // verify the required parameter '{{paramName}}' is set if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - {{/vendorExtensions.x-csharp-value-type}} + {{/vendorExtensions.x-is-value-type}} {{/nullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -512,12 +512,12 @@ namespace {{packageName}}.{{apiPackage}} { {{#allParams}} {{^nullable}} - {{^vendorExtensions.x-csharp-value-type}} + {{^vendorExtensions.x-is-value-type}} // verify the required parameter '{{paramName}}' is set if ({{^required}}{{paramName}}.IsSet && {{/required}}{{paramName}}{{^required}}.Value{{/required}} == null) throw new {{packageName}}.Client.ApiException(400, "Null non nullable parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - {{/vendorExtensions.x-csharp-value-type}} + {{/vendorExtensions.x-is-value-type}} {{/nullable}} {{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 043a2392c445..0f44df83604e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -136,20 +136,20 @@ {{#hasOnlyReadOnly}} [JsonConstructorAttribute] {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}){{/defaultValue}}{{/required}}{{^required}}default(Option<{{{datatypeWithEnum}}}{{>NullConditionalParameter}}>){{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} + public {{classname}}({{#readWriteVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{>CamelCaseSanitizedParamName}} = {{#required}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}{{>NullConditionalParameter}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{>NullConditionalParameter}}){{/defaultValue}}{{/required}}{{^required}}default(Option<{{{datatypeWithEnum}}}{{>NullConditionalParameter}}>){{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{>CamelCaseSanitizedParamName}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} { {{! Push all sanity tests on top }} {{#vars}} {{^isInherited}} {{^isReadOnly}} {{^isNullable}} - {{^vendorExtensions.x-csharp-value-type}} + {{^vendorExtensions.x-is-value-type}} // to ensure "{{>CamelCaseSanitizedParamName}}" (not nullable) is not null if ({{^required}}{{>CamelCaseSanitizedParamName}}.IsSet && {{/required}}{{>CamelCaseSanitizedParamName}}{{^required}}.Value{{/required}} == null) { throw new ArgumentNullException("{{>CamelCaseSanitizedParamName}} isn't a nullable property for {{classname}} and cannot be null"); } - {{/vendorExtensions.x-csharp-value-type}} + {{/vendorExtensions.x-is-value-type}} {{/isNullable}} {{/isReadOnly}} {{/isInherited}} From 58f28ff1d10379d88f32d31b21dbb00e7618303e Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 3 Nov 2025 12:50:51 +0100 Subject: [PATCH 31/44] Generate samples --- .../csharp-restsharp/.openapi-generator/FILES | 1 + .../echo_api/csharp-restsharp/docs/BodyApi.md | 48 +- .../csharp-restsharp/docs/DefaultValue.md | 6 +- .../echo_api/csharp-restsharp/docs/FormApi.md | 40 +- .../csharp-restsharp/docs/HeaderApi.md | 22 +- .../csharp-restsharp/docs/QueryApi.md | 80 +-- .../src/Org.OpenAPITools/Api/BodyApi.cs | 208 +++--- .../src/Org.OpenAPITools/Api/FormApi.cs | 144 +++-- .../src/Org.OpenAPITools/Api/HeaderApi.cs | 72 ++- .../src/Org.OpenAPITools/Api/PathApi.cs | 16 +- .../src/Org.OpenAPITools/Api/QueryApi.cs | 416 +++++++----- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 127 ++++ .../src/Org.OpenAPITools/Model/Bird.cs | 35 +- .../src/Org.OpenAPITools/Model/Category.cs | 27 +- .../src/Org.OpenAPITools/Model/DataQuery.cs | 51 +- .../Org.OpenAPITools/Model/DefaultValue.cs | 137 ++-- .../Model/NumberPropertiesOnly.cs | 27 +- .../src/Org.OpenAPITools/Model/Pet.cs | 68 +- .../src/Org.OpenAPITools/Model/Query.cs | 30 +- .../Org.OpenAPITools/Model/StringEnumRef.cs | 1 + .../src/Org.OpenAPITools/Model/Tag.cs | 27 +- .../TestFormObjectMultipartRequestMarker.cs | 19 +- ...lodeTrueObjectAllOfQueryObjectParameter.cs | 59 +- ...lodeTrueArrayStringQueryObjectParameter.cs | 22 +- .../.openapi-generator/FILES | 1 + .../src/Org.OpenAPITools/Api/MultipartApi.cs | 120 ++-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 124 ++++ .../Model/MultipartArrayRequest.cs | 14 +- .../Model/MultipartMixedRequest.cs | 33 +- .../Model/MultipartMixedRequestMarker.cs | 14 +- .../Model/MultipartMixedStatus.cs | 1 + .../Model/MultipartSingleRequest.cs | 14 +- .../Petstore/.openapi-generator/FILES | 1 + .../standard2.0/Petstore/docs/FakeApi.md | 62 +- .../Petstore/docs/RequiredClass.md | 4 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 4 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 524 +++++++++------ .../Api/FakeClassnameTags123Api.cs | 4 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 180 ++++-- .../src/Org.OpenAPITools/Api/StoreApi.cs | 8 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 36 +- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 124 ++++ .../src/Org.OpenAPITools/Model/Activity.cs | 14 +- .../ActivityOutputElementRepresentation.cs | 25 +- .../Model/AdditionalPropertiesClass.cs | 86 ++- .../src/Org.OpenAPITools/Model/Animal.cs | 21 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 32 +- .../src/Org.OpenAPITools/Model/Apple.cs | 36 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 14 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 14 +- .../Model/ArrayOfNumberOnly.cs | 14 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 36 +- .../src/Org.OpenAPITools/Model/Banana.cs | 10 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 10 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 5 +- .../Org.OpenAPITools/Model/Capitalization.cs | 69 +- .../src/Org.OpenAPITools/Model/Cat.cs | 10 +- .../src/Org.OpenAPITools/Model/Category.cs | 16 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 16 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 14 +- .../Model/ComplexQuadrilateral.cs | 11 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 5 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 14 +- .../Model/DeprecatedObject.cs | 14 +- .../src/Org.OpenAPITools/Model/Dog.cs | 14 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 37 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 21 +- .../src/Org.OpenAPITools/Model/EnumClass.cs | 1 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 61 +- .../Model/EquilateralTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/File.cs | 14 +- .../Model/FileSchemaTestClass.cs | 25 +- .../src/Org.OpenAPITools/Model/Foo.cs | 17 +- .../Model/FooGetDefaultResponse.cs | 14 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 157 +++-- .../src/Org.OpenAPITools/Model/Fruit.cs | 1 + .../src/Org.OpenAPITools/Model/FruitReq.cs | 1 + .../src/Org.OpenAPITools/Model/GmFruit.cs | 1 + .../Model/GrandparentAnimal.cs | 5 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 13 +- .../Model/HealthCheckResult.cs | 9 +- .../Model/IsoscelesTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/List.cs | 14 +- .../Model/LiteralStringClass.cs | 31 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 1 + .../src/Org.OpenAPITools/Model/MapTest.cs | 47 +- .../src/Org.OpenAPITools/Model/MixLog.cs | 273 +++++--- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 14 +- .../Model/MixedAnyOfContent.cs | 1 + .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 14 +- .../Model/MixedOneOfContent.cs | 1 + ...dPropertiesAndAdditionalPropertiesClass.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 14 +- .../Model/Model200Response.cs | 21 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 14 +- .../src/Org.OpenAPITools/Model/Name.cs | 28 +- ...cationtestGetElementsV1ResponseMPayload.cs | 7 +- .../Org.OpenAPITools/Model/NullableClass.cs | 85 +-- .../Model/NullableGuidClass.cs | 9 +- .../Org.OpenAPITools/Model/NullableShape.cs | 1 + .../src/Org.OpenAPITools/Model/NumberOnly.cs | 10 +- .../Model/ObjectWithDeprecatedFields.cs | 43 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 1 + .../src/Org.OpenAPITools/Model/Order.cs | 51 +- .../Org.OpenAPITools/Model/OuterComposite.cs | 28 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 1 + .../Model/OuterEnumDefaultValue.cs | 1 + .../Model/OuterEnumInteger.cs | 1 + .../Model/OuterEnumIntegerDefaultValue.cs | 1 + .../Org.OpenAPITools/Model/OuterEnumTest.cs | 1 + .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 + .../src/Org.OpenAPITools/Model/Pet.cs | 51 +- .../src/Org.OpenAPITools/Model/Pig.cs | 1 + .../Model/PolymorphicProperty.cs | 1 + .../Org.OpenAPITools/Model/Quadrilateral.cs | 1 + .../Model/QuadrilateralInterface.cs | 5 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 20 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 260 ++++---- .../src/Org.OpenAPITools/Model/Return.cs | 30 +- .../Model/RolesReportsHash.cs | 25 +- .../Model/RolesReportsHashRole.cs | 14 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/Shape.cs | 1 + .../Org.OpenAPITools/Model/ShapeInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 1 + .../Model/SimpleQuadrilateral.cs | 11 +- .../Model/SpecialModelName.cs | 21 +- .../src/Org.OpenAPITools/Model/Tag.cs | 21 +- .../Model/TestCollectionEndingWithWordList.cs | 14 +- .../TestCollectionEndingWithWordListObject.cs | 14 +- ...lineFreeformAdditionalPropertiesRequest.cs | 14 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 1 + .../Model/TriangleInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/User.cs | 112 +++- .../src/Org.OpenAPITools/Model/Whale.cs | 23 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 16 +- .../Org.OpenAPITools/Model/ZeroBasedEnum.cs | 1 + .../Model/ZeroBasedEnumClass.cs | 10 +- .../.openapi-generator/FILES | 1 + .../src/Org.OpenAPITools/Api/PetApi.cs | 160 +++-- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 72 +-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 124 ++++ .../src/Org.OpenAPITools/Model/ApiResponse.cs | 32 +- .../src/Org.OpenAPITools/Model/Category.cs | 21 +- .../src/Org.OpenAPITools/Model/Order.cs | 51 +- .../src/Org.OpenAPITools/Model/Pet.cs | 51 +- .../src/Org.OpenAPITools/Model/Tag.cs | 21 +- .../src/Org.OpenAPITools/Model/User.cs | 83 ++- .../net4.7/Petstore/.openapi-generator/FILES | 1 + .../restsharp/net4.7/Petstore/docs/FakeApi.md | 62 +- .../net4.7/Petstore/docs/RequiredClass.md | 4 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 8 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 8 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 600 ++++++++++-------- .../Api/FakeClassnameTags123Api.cs | 8 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 200 +++--- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 72 +-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 124 ++++ .../src/Org.OpenAPITools/Model/Activity.cs | 14 +- .../ActivityOutputElementRepresentation.cs | 25 +- .../Model/AdditionalPropertiesClass.cs | 86 ++- .../src/Org.OpenAPITools/Model/Animal.cs | 21 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 32 +- .../src/Org.OpenAPITools/Model/Apple.cs | 36 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 14 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 14 +- .../Model/ArrayOfNumberOnly.cs | 14 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 36 +- .../src/Org.OpenAPITools/Model/Banana.cs | 10 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 10 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 5 +- .../Org.OpenAPITools/Model/Capitalization.cs | 69 +- .../src/Org.OpenAPITools/Model/Cat.cs | 10 +- .../src/Org.OpenAPITools/Model/Category.cs | 16 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 16 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 14 +- .../Model/ComplexQuadrilateral.cs | 11 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 5 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 14 +- .../Model/DeprecatedObject.cs | 14 +- .../src/Org.OpenAPITools/Model/Dog.cs | 14 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 37 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 21 +- .../src/Org.OpenAPITools/Model/EnumClass.cs | 1 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 61 +- .../Model/EquilateralTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/File.cs | 14 +- .../Model/FileSchemaTestClass.cs | 25 +- .../src/Org.OpenAPITools/Model/Foo.cs | 17 +- .../Model/FooGetDefaultResponse.cs | 14 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 157 +++-- .../src/Org.OpenAPITools/Model/Fruit.cs | 1 + .../src/Org.OpenAPITools/Model/FruitReq.cs | 1 + .../src/Org.OpenAPITools/Model/GmFruit.cs | 1 + .../Model/GrandparentAnimal.cs | 5 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 13 +- .../Model/HealthCheckResult.cs | 9 +- .../Model/IsoscelesTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/List.cs | 14 +- .../Model/LiteralStringClass.cs | 31 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 1 + .../src/Org.OpenAPITools/Model/MapTest.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 14 +- .../Model/MixedAnyOfContent.cs | 1 + .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 14 +- .../Model/MixedOneOfContent.cs | 1 + ...dPropertiesAndAdditionalPropertiesClass.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 14 +- .../Model/Model200Response.cs | 21 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 14 +- .../src/Org.OpenAPITools/Model/Name.cs | 28 +- ...cationtestGetElementsV1ResponseMPayload.cs | 7 +- .../Org.OpenAPITools/Model/NullableClass.cs | 85 +-- .../Model/NullableGuidClass.cs | 9 +- .../Org.OpenAPITools/Model/NullableShape.cs | 1 + .../src/Org.OpenAPITools/Model/NumberOnly.cs | 10 +- .../Model/ObjectWithDeprecatedFields.cs | 43 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 1 + .../src/Org.OpenAPITools/Model/Order.cs | 51 +- .../Org.OpenAPITools/Model/OuterComposite.cs | 28 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 1 + .../Model/OuterEnumDefaultValue.cs | 1 + .../Model/OuterEnumInteger.cs | 1 + .../Model/OuterEnumIntegerDefaultValue.cs | 1 + .../Org.OpenAPITools/Model/OuterEnumTest.cs | 1 + .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 + .../src/Org.OpenAPITools/Model/Pet.cs | 51 +- .../src/Org.OpenAPITools/Model/Pig.cs | 1 + .../Model/PolymorphicProperty.cs | 1 + .../Org.OpenAPITools/Model/Quadrilateral.cs | 1 + .../Model/QuadrilateralInterface.cs | 5 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 20 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 260 ++++---- .../src/Org.OpenAPITools/Model/Return.cs | 10 +- .../Model/RolesReportsHash.cs | 25 +- .../Model/RolesReportsHashRole.cs | 14 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/Shape.cs | 1 + .../Org.OpenAPITools/Model/ShapeInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 1 + .../Model/SimpleQuadrilateral.cs | 11 +- .../Model/SpecialModelName.cs | 21 +- .../src/Org.OpenAPITools/Model/Tag.cs | 21 +- .../Model/TestCollectionEndingWithWordList.cs | 14 +- .../TestCollectionEndingWithWordListObject.cs | 14 +- ...lineFreeformAdditionalPropertiesRequest.cs | 14 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 1 + .../Model/TriangleInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/User.cs | 112 +++- .../src/Org.OpenAPITools/Model/Whale.cs | 23 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 16 +- .../Org.OpenAPITools/Model/ZeroBasedEnum.cs | 1 + .../Model/ZeroBasedEnumClass.cs | 10 +- .../net4.8/Petstore/.openapi-generator/FILES | 1 + .../restsharp/net4.8/Petstore/docs/FakeApi.md | 62 +- .../net4.8/Petstore/docs/RequiredClass.md | 4 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 8 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 8 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 600 ++++++++++-------- .../Api/FakeClassnameTags123Api.cs | 8 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 200 +++--- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 72 +-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 124 ++++ .../src/Org.OpenAPITools/Model/Activity.cs | 14 +- .../ActivityOutputElementRepresentation.cs | 25 +- .../Model/AdditionalPropertiesClass.cs | 86 ++- .../src/Org.OpenAPITools/Model/Animal.cs | 21 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 32 +- .../src/Org.OpenAPITools/Model/Apple.cs | 36 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 14 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 14 +- .../Model/ArrayOfNumberOnly.cs | 14 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 36 +- .../src/Org.OpenAPITools/Model/Banana.cs | 10 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 10 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 5 +- .../Org.OpenAPITools/Model/Capitalization.cs | 69 +- .../src/Org.OpenAPITools/Model/Cat.cs | 10 +- .../src/Org.OpenAPITools/Model/Category.cs | 16 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 16 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 14 +- .../Model/ComplexQuadrilateral.cs | 11 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 5 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 14 +- .../Model/DeprecatedObject.cs | 14 +- .../src/Org.OpenAPITools/Model/Dog.cs | 14 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 37 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 21 +- .../src/Org.OpenAPITools/Model/EnumClass.cs | 1 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 61 +- .../Model/EquilateralTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/File.cs | 14 +- .../Model/FileSchemaTestClass.cs | 25 +- .../src/Org.OpenAPITools/Model/Foo.cs | 17 +- .../Model/FooGetDefaultResponse.cs | 14 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 157 +++-- .../src/Org.OpenAPITools/Model/Fruit.cs | 1 + .../src/Org.OpenAPITools/Model/FruitReq.cs | 1 + .../src/Org.OpenAPITools/Model/GmFruit.cs | 1 + .../Model/GrandparentAnimal.cs | 5 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 13 +- .../Model/HealthCheckResult.cs | 9 +- .../Model/IsoscelesTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/List.cs | 14 +- .../Model/LiteralStringClass.cs | 31 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 1 + .../src/Org.OpenAPITools/Model/MapTest.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 14 +- .../Model/MixedAnyOfContent.cs | 1 + .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 14 +- .../Model/MixedOneOfContent.cs | 1 + ...dPropertiesAndAdditionalPropertiesClass.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 14 +- .../Model/Model200Response.cs | 21 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 14 +- .../src/Org.OpenAPITools/Model/Name.cs | 28 +- ...cationtestGetElementsV1ResponseMPayload.cs | 7 +- .../Org.OpenAPITools/Model/NullableClass.cs | 85 +-- .../Model/NullableGuidClass.cs | 9 +- .../Org.OpenAPITools/Model/NullableShape.cs | 1 + .../src/Org.OpenAPITools/Model/NumberOnly.cs | 10 +- .../Model/ObjectWithDeprecatedFields.cs | 43 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 1 + .../src/Org.OpenAPITools/Model/Order.cs | 51 +- .../Org.OpenAPITools/Model/OuterComposite.cs | 28 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 1 + .../Model/OuterEnumDefaultValue.cs | 1 + .../Model/OuterEnumInteger.cs | 1 + .../Model/OuterEnumIntegerDefaultValue.cs | 1 + .../Org.OpenAPITools/Model/OuterEnumTest.cs | 1 + .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 + .../src/Org.OpenAPITools/Model/Pet.cs | 51 +- .../src/Org.OpenAPITools/Model/Pig.cs | 1 + .../Model/PolymorphicProperty.cs | 1 + .../Org.OpenAPITools/Model/Quadrilateral.cs | 1 + .../Model/QuadrilateralInterface.cs | 5 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 20 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 260 ++++---- .../src/Org.OpenAPITools/Model/Return.cs | 10 +- .../Model/RolesReportsHash.cs | 25 +- .../Model/RolesReportsHashRole.cs | 14 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/Shape.cs | 1 + .../Org.OpenAPITools/Model/ShapeInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 1 + .../Model/SimpleQuadrilateral.cs | 11 +- .../Model/SpecialModelName.cs | 21 +- .../src/Org.OpenAPITools/Model/Tag.cs | 21 +- .../Model/TestCollectionEndingWithWordList.cs | 14 +- .../TestCollectionEndingWithWordListObject.cs | 14 +- ...lineFreeformAdditionalPropertiesRequest.cs | 14 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 1 + .../Model/TriangleInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/User.cs | 112 +++- .../src/Org.OpenAPITools/Model/Whale.cs | 23 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 16 +- .../Org.OpenAPITools/Model/ZeroBasedEnum.cs | 1 + .../Model/ZeroBasedEnumClass.cs | 10 +- .../.openapi-generator/FILES | 1 + .../src/Org.OpenAPITools/Api/FakeApi.cs | 24 +- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 126 ++++ .../src/Org.OpenAPITools/Model/Env.cs | 19 +- .../Model/PropertyNameMapping.cs | 67 +- .../EnumMappings/.openapi-generator/FILES | 1 + .../docs/AdditionalPropertiesClass.md | 2 +- .../net7/EnumMappings/docs/EnumTest.md | 2 +- .../net7/EnumMappings/docs/FakeApi.md | 124 ++-- .../EnumMappings/docs/HealthCheckResult.md | 2 +- .../net7/EnumMappings/docs/NullableClass.md | 16 +- .../net7/EnumMappings/docs/PetApi.md | 32 +- .../net7/EnumMappings/docs/RequiredClass.md | 20 +- .../restsharp/net7/EnumMappings/docs/User.md | 6 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 8 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 8 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 600 ++++++++++-------- .../Api/FakeClassnameTags123Api.cs | 8 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 200 +++--- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 72 +-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 126 ++++ .../src/Org.OpenAPITools/Model/Activity.cs | 14 +- .../ActivityOutputElementRepresentation.cs | 25 +- .../Model/AdditionalPropertiesClass.cs | 86 ++- .../src/Org.OpenAPITools/Model/Animal.cs | 21 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 32 +- .../src/Org.OpenAPITools/Model/Apple.cs | 36 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 14 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 14 +- .../Model/ArrayOfNumberOnly.cs | 14 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 36 +- .../src/Org.OpenAPITools/Model/Banana.cs | 10 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 10 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 5 +- .../Org.OpenAPITools/Model/Capitalization.cs | 69 +- .../src/Org.OpenAPITools/Model/Cat.cs | 10 +- .../src/Org.OpenAPITools/Model/Category.cs | 16 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 16 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 14 +- .../Model/ComplexQuadrilateral.cs | 11 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 5 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 14 +- .../Model/DeprecatedObject.cs | 14 +- .../src/Org.OpenAPITools/Model/Dog.cs | 14 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 37 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 21 +- .../src/Org.OpenAPITools/Model/EnumClass.cs | 1 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 61 +- .../Model/EquilateralTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/File.cs | 14 +- .../Model/FileSchemaTestClass.cs | 25 +- .../src/Org.OpenAPITools/Model/Foo.cs | 17 +- .../Model/FooGetDefaultResponse.cs | 14 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 156 +++-- .../src/Org.OpenAPITools/Model/Fruit.cs | 1 + .../src/Org.OpenAPITools/Model/FruitReq.cs | 1 + .../src/Org.OpenAPITools/Model/GmFruit.cs | 1 + .../Model/GrandparentAnimal.cs | 5 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 13 +- .../Model/HealthCheckResult.cs | 9 +- .../Model/IsoscelesTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/List.cs | 14 +- .../Model/LiteralStringClass.cs | 31 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 1 + .../src/Org.OpenAPITools/Model/MapTest.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 14 +- .../Model/MixedAnyOfContent.cs | 1 + .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 14 +- .../Model/MixedOneOfContent.cs | 1 + ...dPropertiesAndAdditionalPropertiesClass.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 14 +- .../Model/Model200Response.cs | 21 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 14 +- .../src/Org.OpenAPITools/Model/Name.cs | 28 +- ...cationtestGetElementsV1ResponseMPayload.cs | 7 +- .../Org.OpenAPITools/Model/NullableClass.cs | 85 +-- .../Model/NullableGuidClass.cs | 9 +- .../Org.OpenAPITools/Model/NullableShape.cs | 1 + .../src/Org.OpenAPITools/Model/NumberOnly.cs | 10 +- .../Model/ObjectWithDeprecatedFields.cs | 43 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 1 + .../src/Org.OpenAPITools/Model/Order.cs | 51 +- .../Org.OpenAPITools/Model/OuterComposite.cs | 28 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 1 + .../Model/OuterEnumDefaultValue.cs | 1 + .../Model/OuterEnumInteger.cs | 1 + .../Model/OuterEnumIntegerDefaultValue.cs | 1 + .../Org.OpenAPITools/Model/OuterEnumTest.cs | 1 + .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 + .../src/Org.OpenAPITools/Model/Pet.cs | 51 +- .../src/Org.OpenAPITools/Model/Pig.cs | 1 + .../Model/PolymorphicProperty.cs | 1 + .../Org.OpenAPITools/Model/Quadrilateral.cs | 1 + .../Model/QuadrilateralInterface.cs | 5 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 20 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 271 ++++---- .../src/Org.OpenAPITools/Model/Return.cs | 10 +- .../Model/RolesReportsHash.cs | 25 +- .../Model/RolesReportsHashRole.cs | 14 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/Shape.cs | 1 + .../Org.OpenAPITools/Model/ShapeInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 1 + .../Model/SimpleQuadrilateral.cs | 11 +- .../Model/SpecialModelName.cs | 21 +- .../src/Org.OpenAPITools/Model/Tag.cs | 21 +- .../Model/TestCollectionEndingWithWordList.cs | 14 +- .../TestCollectionEndingWithWordListObject.cs | 14 +- ...lineFreeformAdditionalPropertiesRequest.cs | 14 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 1 + .../Model/TriangleInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/User.cs | 112 +++- .../src/Org.OpenAPITools/Model/Whale.cs | 23 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 16 +- .../Org.OpenAPITools/Model/ZeroBasedEnum.cs | 1 + .../Model/ZeroBasedEnumClass.cs | 10 +- .../net7/Petstore/.openapi-generator/FILES | 1 + .../docs/AdditionalPropertiesClass.md | 2 +- .../restsharp/net7/Petstore/docs/EnumTest.md | 2 +- .../restsharp/net7/Petstore/docs/FakeApi.md | 124 ++-- .../net7/Petstore/docs/HealthCheckResult.md | 2 +- .../restsharp/net7/Petstore/docs/MixLog.md | 2 +- .../net7/Petstore/docs/NullableClass.md | 16 +- .../restsharp/net7/Petstore/docs/PetApi.md | 32 +- .../net7/Petstore/docs/RequiredClass.md | 20 +- .../restsharp/net7/Petstore/docs/Return.md | 2 +- .../restsharp/net7/Petstore/docs/User.md | 6 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 8 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 8 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 600 ++++++++++-------- .../Api/FakeClassnameTags123Api.cs | 8 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 200 +++--- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 72 +-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 126 ++++ .../src/Org.OpenAPITools/Model/Activity.cs | 14 +- .../ActivityOutputElementRepresentation.cs | 25 +- .../Model/AdditionalPropertiesClass.cs | 86 ++- .../src/Org.OpenAPITools/Model/Animal.cs | 21 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 32 +- .../src/Org.OpenAPITools/Model/Apple.cs | 36 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 14 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 14 +- .../Model/ArrayOfNumberOnly.cs | 14 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 36 +- .../src/Org.OpenAPITools/Model/Banana.cs | 10 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 10 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 5 +- .../Org.OpenAPITools/Model/Capitalization.cs | 69 +- .../src/Org.OpenAPITools/Model/Cat.cs | 10 +- .../src/Org.OpenAPITools/Model/Category.cs | 16 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 16 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 14 +- .../Model/ComplexQuadrilateral.cs | 11 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 5 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 14 +- .../Model/DeprecatedObject.cs | 14 +- .../src/Org.OpenAPITools/Model/Dog.cs | 14 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 37 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 21 +- .../src/Org.OpenAPITools/Model/EnumClass.cs | 1 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 61 +- .../Model/EquilateralTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/File.cs | 14 +- .../Model/FileSchemaTestClass.cs | 25 +- .../src/Org.OpenAPITools/Model/Foo.cs | 17 +- .../Model/FooGetDefaultResponse.cs | 14 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 156 +++-- .../src/Org.OpenAPITools/Model/Fruit.cs | 1 + .../src/Org.OpenAPITools/Model/FruitReq.cs | 1 + .../src/Org.OpenAPITools/Model/GmFruit.cs | 1 + .../Model/GrandparentAnimal.cs | 5 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 13 +- .../Model/HealthCheckResult.cs | 9 +- .../Model/IsoscelesTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/List.cs | 14 +- .../Model/LiteralStringClass.cs | 31 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 1 + .../src/Org.OpenAPITools/Model/MapTest.cs | 47 +- .../src/Org.OpenAPITools/Model/MixLog.cs | 273 +++++--- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 14 +- .../Model/MixedAnyOfContent.cs | 1 + .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 14 +- .../Model/MixedOneOfContent.cs | 1 + ...dPropertiesAndAdditionalPropertiesClass.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 14 +- .../Model/Model200Response.cs | 21 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 14 +- .../src/Org.OpenAPITools/Model/Name.cs | 28 +- ...cationtestGetElementsV1ResponseMPayload.cs | 7 +- .../Org.OpenAPITools/Model/NullableClass.cs | 85 +-- .../Model/NullableGuidClass.cs | 9 +- .../Org.OpenAPITools/Model/NullableShape.cs | 1 + .../src/Org.OpenAPITools/Model/NumberOnly.cs | 10 +- .../Model/ObjectWithDeprecatedFields.cs | 43 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 1 + .../src/Org.OpenAPITools/Model/Order.cs | 51 +- .../Org.OpenAPITools/Model/OuterComposite.cs | 28 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 1 + .../Model/OuterEnumDefaultValue.cs | 1 + .../Model/OuterEnumInteger.cs | 1 + .../Model/OuterEnumIntegerDefaultValue.cs | 1 + .../Org.OpenAPITools/Model/OuterEnumTest.cs | 1 + .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 + .../src/Org.OpenAPITools/Model/Pet.cs | 51 +- .../src/Org.OpenAPITools/Model/Pig.cs | 1 + .../Model/PolymorphicProperty.cs | 1 + .../Org.OpenAPITools/Model/Quadrilateral.cs | 1 + .../Model/QuadrilateralInterface.cs | 5 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 20 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 271 ++++---- .../src/Org.OpenAPITools/Model/Return.cs | 32 +- .../Model/RolesReportsHash.cs | 25 +- .../Model/RolesReportsHashRole.cs | 14 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/Shape.cs | 1 + .../Org.OpenAPITools/Model/ShapeInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 1 + .../Model/SimpleQuadrilateral.cs | 11 +- .../Model/SpecialModelName.cs | 21 +- .../src/Org.OpenAPITools/Model/Tag.cs | 21 +- .../Model/TestCollectionEndingWithWordList.cs | 14 +- .../TestCollectionEndingWithWordListObject.cs | 14 +- ...lineFreeformAdditionalPropertiesRequest.cs | 14 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 1 + .../Model/TriangleInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/User.cs | 112 +++- .../src/Org.OpenAPITools/Model/Whale.cs | 23 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 16 +- .../Org.OpenAPITools/Model/ZeroBasedEnum.cs | 1 + .../Model/ZeroBasedEnumClass.cs | 10 +- .../.openapi-generator/FILES | 1 + .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 106 ++++ .../Model/NowGet200Response.cs | 17 +- .../.openapi-generator/FILES | 1 + .../ConditionalSerialization/docs/FakeApi.md | 62 +- .../docs/RequiredClass.md | 4 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 8 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 8 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 600 ++++++++++-------- .../Api/FakeClassnameTags123Api.cs | 8 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 200 +++--- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 72 +-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 124 ++++ .../src/Org.OpenAPITools/Model/Activity.cs | 18 +- .../ActivityOutputElementRepresentation.cs | 33 +- .../Model/AdditionalPropertiesClass.cs | 118 ++-- .../src/Org.OpenAPITools/Model/Animal.cs | 22 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 44 +- .../src/Org.OpenAPITools/Model/Apple.cs | 48 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 19 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 18 +- .../Model/ArrayOfNumberOnly.cs | 18 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 48 +- .../src/Org.OpenAPITools/Model/Banana.cs | 14 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 15 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 6 +- .../Org.OpenAPITools/Model/Capitalization.cs | 93 ++- .../src/Org.OpenAPITools/Model/Cat.cs | 14 +- .../src/Org.OpenAPITools/Model/Category.cs | 21 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 21 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 18 +- .../Model/ComplexQuadrilateral.cs | 13 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 6 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 18 +- .../Model/DeprecatedObject.cs | 18 +- .../src/Org.OpenAPITools/Model/Dog.cs | 18 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 53 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 29 +- .../src/Org.OpenAPITools/Model/EnumClass.cs | 1 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 94 ++- .../Model/EquilateralTriangle.cs | 13 +- .../src/Org.OpenAPITools/Model/File.cs | 18 +- .../Model/FileSchemaTestClass.cs | 33 +- .../src/Org.OpenAPITools/Model/Foo.cs | 17 +- .../Model/FooGetDefaultResponse.cs | 18 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 221 ++++--- .../src/Org.OpenAPITools/Model/Fruit.cs | 1 + .../src/Org.OpenAPITools/Model/FruitReq.cs | 1 + .../src/Org.OpenAPITools/Model/GmFruit.cs | 1 + .../Model/GrandparentAnimal.cs | 6 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 13 +- .../Model/HealthCheckResult.cs | 13 +- .../Model/IsoscelesTriangle.cs | 13 +- .../src/Org.OpenAPITools/Model/List.cs | 18 +- .../Model/LiteralStringClass.cs | 31 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 1 + .../src/Org.OpenAPITools/Model/MapTest.cs | 63 +- .../src/Org.OpenAPITools/Model/MixLog.cs | 383 +++++++---- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 18 +- .../Model/MixedAnyOfContent.cs | 1 + .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 18 +- .../Model/MixedOneOfContent.cs | 1 + ...dPropertiesAndAdditionalPropertiesClass.cs | 63 +- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 18 +- .../Model/Model200Response.cs | 29 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 18 +- .../src/Org.OpenAPITools/Model/Name.cs | 33 +- ...cationtestGetElementsV1ResponseMPayload.cs | 9 +- .../Org.OpenAPITools/Model/NullableClass.cs | 133 ++-- .../Model/NullableGuidClass.cs | 13 +- .../Org.OpenAPITools/Model/NullableShape.cs | 1 + .../src/Org.OpenAPITools/Model/NumberOnly.cs | 14 +- .../Model/ObjectWithDeprecatedFields.cs | 59 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 1 + .../src/Org.OpenAPITools/Model/Order.cs | 72 ++- .../Org.OpenAPITools/Model/OuterComposite.cs | 40 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 1 + .../Model/OuterEnumDefaultValue.cs | 1 + .../Model/OuterEnumInteger.cs | 1 + .../Model/OuterEnumIntegerDefaultValue.cs | 1 + .../Org.OpenAPITools/Model/OuterEnumTest.cs | 1 + .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 + .../src/Org.OpenAPITools/Model/Pet.cs | 69 +- .../src/Org.OpenAPITools/Model/Pig.cs | 1 + .../Model/PolymorphicProperty.cs | 1 + .../Org.OpenAPITools/Model/Quadrilateral.cs | 1 + .../Model/QuadrilateralInterface.cs | 6 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 24 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 376 ++++++----- .../src/Org.OpenAPITools/Model/Return.cs | 40 +- .../Model/RolesReportsHash.cs | 33 +- .../Model/RolesReportsHashRole.cs | 18 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 13 +- .../src/Org.OpenAPITools/Model/Shape.cs | 1 + .../Org.OpenAPITools/Model/ShapeInterface.cs | 6 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 1 + .../Model/SimpleQuadrilateral.cs | 13 +- .../Model/SpecialModelName.cs | 29 +- .../src/Org.OpenAPITools/Model/Tag.cs | 29 +- .../Model/TestCollectionEndingWithWordList.cs | 18 +- .../TestCollectionEndingWithWordListObject.cs | 18 +- ...lineFreeformAdditionalPropertiesRequest.cs | 18 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 1 + .../Model/TriangleInterface.cs | 6 +- .../src/Org.OpenAPITools/Model/User.cs | 160 +++-- .../src/Org.OpenAPITools/Model/Whale.cs | 32 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 21 +- .../Org.OpenAPITools/Model/ZeroBasedEnum.cs | 1 + .../Model/ZeroBasedEnumClass.cs | 14 +- .../Petstore/.openapi-generator/FILES | 1 + .../standard2.0/Petstore/docs/FakeApi.md | 62 +- .../Petstore/docs/RequiredClass.md | 4 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 8 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 8 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 600 ++++++++++-------- .../Api/FakeClassnameTags123Api.cs | 8 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 200 +++--- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 72 +-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 124 ++++ .../src/Org.OpenAPITools/Model/Activity.cs | 14 +- .../ActivityOutputElementRepresentation.cs | 25 +- .../Model/AdditionalPropertiesClass.cs | 86 ++- .../src/Org.OpenAPITools/Model/Animal.cs | 21 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 32 +- .../src/Org.OpenAPITools/Model/Apple.cs | 36 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 14 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 14 +- .../Model/ArrayOfNumberOnly.cs | 14 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 36 +- .../src/Org.OpenAPITools/Model/Banana.cs | 10 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 10 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 5 +- .../Org.OpenAPITools/Model/Capitalization.cs | 69 +- .../src/Org.OpenAPITools/Model/Cat.cs | 10 +- .../src/Org.OpenAPITools/Model/Category.cs | 16 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 16 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 14 +- .../Model/ComplexQuadrilateral.cs | 11 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 5 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 14 +- .../Model/DeprecatedObject.cs | 14 +- .../src/Org.OpenAPITools/Model/Dog.cs | 14 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 37 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 21 +- .../src/Org.OpenAPITools/Model/EnumClass.cs | 1 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 61 +- .../Model/EquilateralTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/File.cs | 14 +- .../Model/FileSchemaTestClass.cs | 25 +- .../src/Org.OpenAPITools/Model/Foo.cs | 17 +- .../Model/FooGetDefaultResponse.cs | 14 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 157 +++-- .../src/Org.OpenAPITools/Model/Fruit.cs | 1 + .../src/Org.OpenAPITools/Model/FruitReq.cs | 1 + .../src/Org.OpenAPITools/Model/GmFruit.cs | 1 + .../Model/GrandparentAnimal.cs | 5 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 13 +- .../Model/HealthCheckResult.cs | 9 +- .../Model/IsoscelesTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/List.cs | 14 +- .../Model/LiteralStringClass.cs | 31 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 1 + .../src/Org.OpenAPITools/Model/MapTest.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 14 +- .../Model/MixedAnyOfContent.cs | 1 + .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 14 +- .../Model/MixedOneOfContent.cs | 1 + ...dPropertiesAndAdditionalPropertiesClass.cs | 47 +- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 14 +- .../Model/Model200Response.cs | 21 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 14 +- .../src/Org.OpenAPITools/Model/Name.cs | 28 +- ...cationtestGetElementsV1ResponseMPayload.cs | 7 +- .../Org.OpenAPITools/Model/NullableClass.cs | 85 +-- .../Model/NullableGuidClass.cs | 9 +- .../Org.OpenAPITools/Model/NullableShape.cs | 1 + .../src/Org.OpenAPITools/Model/NumberOnly.cs | 10 +- .../Model/ObjectWithDeprecatedFields.cs | 43 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 1 + .../src/Org.OpenAPITools/Model/Order.cs | 51 +- .../Org.OpenAPITools/Model/OuterComposite.cs | 28 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 1 + .../Model/OuterEnumDefaultValue.cs | 1 + .../Model/OuterEnumInteger.cs | 1 + .../Model/OuterEnumIntegerDefaultValue.cs | 1 + .../Org.OpenAPITools/Model/OuterEnumTest.cs | 1 + .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 + .../src/Org.OpenAPITools/Model/Pet.cs | 51 +- .../src/Org.OpenAPITools/Model/Pig.cs | 1 + .../Model/PolymorphicProperty.cs | 1 + .../Org.OpenAPITools/Model/Quadrilateral.cs | 1 + .../Model/QuadrilateralInterface.cs | 5 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 20 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 260 ++++---- .../src/Org.OpenAPITools/Model/Return.cs | 10 +- .../Model/RolesReportsHash.cs | 25 +- .../Model/RolesReportsHashRole.cs | 14 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/Shape.cs | 1 + .../Org.OpenAPITools/Model/ShapeInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 1 + .../Model/SimpleQuadrilateral.cs | 11 +- .../Model/SpecialModelName.cs | 21 +- .../src/Org.OpenAPITools/Model/Tag.cs | 21 +- .../Model/TestCollectionEndingWithWordList.cs | 14 +- .../TestCollectionEndingWithWordListObject.cs | 14 +- ...lineFreeformAdditionalPropertiesRequest.cs | 14 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 1 + .../Model/TriangleInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/User.cs | 112 +++- .../src/Org.OpenAPITools/Model/Whale.cs | 23 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 16 +- .../Org.OpenAPITools/Model/ZeroBasedEnum.cs | 1 + .../Model/ZeroBasedEnumClass.cs | 10 +- .../Petstore/.openapi-generator/FILES | 1 + .../standard2.0/Petstore/docs/FakeApi.md | 62 +- .../Petstore/docs/RequiredClass.md | 4 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 4 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 520 +++++++++------ .../Api/FakeClassnameTags123Api.cs | 4 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 176 +++-- .../src/Org.OpenAPITools/Api/StoreApi.cs | 8 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 36 +- .../src/Org.OpenAPITools/Client/ApiClient.cs | 7 +- .../src/Org.OpenAPITools/Client/Option.cs | 124 ++++ .../src/Org.OpenAPITools/Model/Activity.cs | 22 +- .../ActivityOutputElementRepresentation.cs | 35 +- .../Model/AdditionalPropertiesClass.cs | 138 ++-- .../src/Org.OpenAPITools/Model/Animal.cs | 26 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 43 +- .../src/Org.OpenAPITools/Model/Apple.cs | 51 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 15 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 22 +- .../Model/ArrayOfNumberOnly.cs | 22 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 60 +- .../src/Org.OpenAPITools/Model/Banana.cs | 11 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 11 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 5 +- .../Org.OpenAPITools/Model/Capitalization.cs | 99 +-- .../src/Org.OpenAPITools/Model/Cat.cs | 11 +- .../src/Org.OpenAPITools/Model/Category.cs | 17 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 21 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 19 +- .../Model/ComplexQuadrilateral.cs | 11 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 5 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 19 +- .../Model/DeprecatedObject.cs | 19 +- .../src/Org.OpenAPITools/Model/Dog.cs | 19 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 60 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 30 +- .../src/Org.OpenAPITools/Model/EnumClass.cs | 1 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 69 +- .../Model/EquilateralTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/File.cs | 19 +- .../Model/FileSchemaTestClass.cs | 38 +- .../src/Org.OpenAPITools/Model/Foo.cs | 22 +- .../Model/FooGetDefaultResponse.cs | 19 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 200 +++--- .../src/Org.OpenAPITools/Model/Fruit.cs | 1 + .../src/Org.OpenAPITools/Model/FruitReq.cs | 1 + .../src/Org.OpenAPITools/Model/GmFruit.cs | 1 + .../Model/GrandparentAnimal.cs | 5 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 23 +- .../Model/HealthCheckResult.cs | 14 +- .../Model/IsoscelesTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/List.cs | 19 +- .../Model/LiteralStringClass.cs | 41 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 1 + .../src/Org.OpenAPITools/Model/MapTest.cs | 79 ++- .../src/Org.OpenAPITools/Model/MixLog.cs | 387 ++++++----- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 19 +- .../Model/MixedAnyOfContent.cs | 1 + .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 19 +- .../Model/MixedOneOfContent.cs | 1 + ...dPropertiesAndAdditionalPropertiesClass.cs | 70 +- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 19 +- .../Model/Model200Response.cs | 27 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 19 +- .../src/Org.OpenAPITools/Model/Name.cs | 35 +- ...cationtestGetElementsV1ResponseMPayload.cs | 9 +- .../Org.OpenAPITools/Model/NullableClass.cs | 160 ++--- .../Model/NullableGuidClass.cs | 14 +- .../Org.OpenAPITools/Model/NullableShape.cs | 1 + .../src/Org.OpenAPITools/Model/NumberOnly.cs | 11 +- .../Model/ObjectWithDeprecatedFields.cs | 62 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 1 + .../src/Org.OpenAPITools/Model/Order.cs | 61 +- .../Org.OpenAPITools/Model/OuterComposite.cs | 35 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 1 + .../Model/OuterEnumDefaultValue.cs | 1 + .../Model/OuterEnumInteger.cs | 1 + .../Model/OuterEnumIntegerDefaultValue.cs | 1 + .../Org.OpenAPITools/Model/OuterEnumTest.cs | 1 + .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 + .../src/Org.OpenAPITools/Model/Pet.cs | 68 +- .../src/Org.OpenAPITools/Model/Pig.cs | 1 + .../Model/PolymorphicProperty.cs | 1 + .../Org.OpenAPITools/Model/Quadrilateral.cs | 1 + .../Model/QuadrilateralInterface.cs | 5 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 30 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 344 +++++----- .../src/Org.OpenAPITools/Model/Return.cs | 36 +- .../Model/RolesReportsHash.cs | 35 +- .../Model/RolesReportsHashRole.cs | 19 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 11 +- .../src/Org.OpenAPITools/Model/Shape.cs | 1 + .../Org.OpenAPITools/Model/ShapeInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 1 + .../Model/SimpleQuadrilateral.cs | 11 +- .../Model/SpecialModelName.cs | 27 +- .../src/Org.OpenAPITools/Model/Tag.cs | 27 +- .../Model/TestCollectionEndingWithWordList.cs | 19 +- .../TestCollectionEndingWithWordListObject.cs | 22 +- ...lineFreeformAdditionalPropertiesRequest.cs | 19 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 1 + .../Model/TriangleInterface.cs | 5 +- .../src/Org.OpenAPITools/Model/User.cs | 164 +++-- .../src/Org.OpenAPITools/Model/Whale.cs | 25 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 17 +- .../Org.OpenAPITools/Model/ZeroBasedEnum.cs | 1 + .../Model/ZeroBasedEnumClass.cs | 11 +- 930 files changed, 19971 insertions(+), 11286 deletions(-) create mode 100644 samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs create mode 100644 samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs diff --git a/samples/client/echo_api/csharp-restsharp/.openapi-generator/FILES b/samples/client/echo_api/csharp-restsharp/.openapi-generator/FILES index 04ec2fd0c625..3cc5bdbdaae0 100644 --- a/samples/client/echo_api/csharp-restsharp/.openapi-generator/FILES +++ b/samples/client/echo_api/csharp-restsharp/.openapi-generator/FILES @@ -43,6 +43,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md b/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md index d7228b424444..aa757ab96397 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md @@ -103,7 +103,7 @@ No authorization required # **TestBodyApplicationOctetstreamBinary** -> string TestBodyApplicationOctetstreamBinary (System.IO.Stream? body = null) +> string TestBodyApplicationOctetstreamBinary (System.IO.Stream body = null) Test body parameter(s) @@ -126,7 +126,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new BodyApi(config); - var body = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | (optional) + var body = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | (optional) try { @@ -169,7 +169,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **System.IO.Stream?****System.IO.Stream?** | | [optional] | +| **body** | **System.IO.Stream****System.IO.Stream** | | [optional] | ### Return type @@ -285,7 +285,7 @@ No authorization required # **TestBodyMultipartFormdataSingleBinary** -> string TestBodyMultipartFormdataSingleBinary (System.IO.Stream? myFile = null) +> string TestBodyMultipartFormdataSingleBinary (System.IO.Stream myFile = null) Test single binary in multipart mime @@ -308,7 +308,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new BodyApi(config); - var myFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | (optional) + var myFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | (optional) try { @@ -351,7 +351,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **myFile** | **System.IO.Stream?****System.IO.Stream?** | | [optional] | +| **myFile** | **System.IO.Stream****System.IO.Stream** | | [optional] | ### Return type @@ -376,7 +376,7 @@ No authorization required # **TestEchoBodyAllOfPet** -> Pet TestEchoBodyAllOfPet (Pet? pet = null) +> Pet TestEchoBodyAllOfPet (Pet pet = null) Test body parameter(s) @@ -399,7 +399,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new BodyApi(config); - var pet = new Pet?(); // Pet? | Pet object that needs to be added to the store (optional) + var pet = new Pet(); // Pet | Pet object that needs to be added to the store (optional) try { @@ -442,7 +442,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pet** | [**Pet?**](Pet?.md) | Pet object that needs to be added to the store | [optional] | +| **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [optional] | ### Return type @@ -467,7 +467,7 @@ No authorization required # **TestEchoBodyFreeFormObjectResponseString** -> string TestEchoBodyFreeFormObjectResponseString (Object? body = null) +> string TestEchoBodyFreeFormObjectResponseString (Object body = null) Test free form object @@ -490,7 +490,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new BodyApi(config); - var body = null; // Object? | Free form object (optional) + var body = null; // Object | Free form object (optional) try { @@ -533,7 +533,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **Object?** | Free form object | [optional] | +| **body** | **Object** | Free form object | [optional] | ### Return type @@ -558,7 +558,7 @@ No authorization required # **TestEchoBodyPet** -> Pet TestEchoBodyPet (Pet? pet = null) +> Pet TestEchoBodyPet (Pet pet = null) Test body parameter(s) @@ -581,7 +581,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new BodyApi(config); - var pet = new Pet?(); // Pet? | Pet object that needs to be added to the store (optional) + var pet = new Pet(); // Pet | Pet object that needs to be added to the store (optional) try { @@ -624,7 +624,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pet** | [**Pet?**](Pet?.md) | Pet object that needs to be added to the store | [optional] | +| **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [optional] | ### Return type @@ -649,7 +649,7 @@ No authorization required # **TestEchoBodyPetResponseString** -> string TestEchoBodyPetResponseString (Pet? pet = null) +> string TestEchoBodyPetResponseString (Pet pet = null) Test empty response body @@ -672,7 +672,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new BodyApi(config); - var pet = new Pet?(); // Pet? | Pet object that needs to be added to the store (optional) + var pet = new Pet(); // Pet | Pet object that needs to be added to the store (optional) try { @@ -715,7 +715,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pet** | [**Pet?**](Pet?.md) | Pet object that needs to be added to the store | [optional] | +| **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [optional] | ### Return type @@ -740,7 +740,7 @@ No authorization required # **TestEchoBodyStringEnum** -> StringEnumRef TestEchoBodyStringEnum (string? body = null) +> StringEnumRef TestEchoBodyStringEnum (string body = null) Test string enum response body @@ -763,7 +763,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new BodyApi(config); - var body = null; // string? | String enum (optional) + var body = null; // string | String enum (optional) try { @@ -806,7 +806,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **string?** | String enum | [optional] | +| **body** | **string** | String enum | [optional] | ### Return type @@ -831,7 +831,7 @@ No authorization required # **TestEchoBodyTagResponseString** -> string TestEchoBodyTagResponseString (Tag? tag = null) +> string TestEchoBodyTagResponseString (Tag tag = null) Test empty json (request body) @@ -854,7 +854,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new BodyApi(config); - var tag = new Tag?(); // Tag? | Tag object (optional) + var tag = new Tag(); // Tag | Tag object (optional) try { @@ -897,7 +897,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **tag** | [**Tag?**](Tag?.md) | Tag object | [optional] | +| **tag** | [**Tag**](Tag.md) | Tag object | [optional] | ### Return type diff --git a/samples/client/echo_api/csharp-restsharp/docs/DefaultValue.md b/samples/client/echo_api/csharp-restsharp/docs/DefaultValue.md index 981eda3340e0..f15c2cfcfc52 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/DefaultValue.md +++ b/samples/client/echo_api/csharp-restsharp/docs/DefaultValue.md @@ -10,9 +10,9 @@ Name | Type | Description | Notes **ArrayStringDefault** | **List<string>** | | [optional] **ArrayIntegerDefault** | **List<int>** | | [optional] **ArrayString** | **List<string>** | | [optional] -**ArrayStringNullable** | **List<string>** | | [optional] -**ArrayStringExtensionNullable** | **List<string>** | | [optional] -**StringNullable** | **string** | | [optional] +**ArrayStringNullable** | **List<string>?** | | [optional] +**ArrayStringExtensionNullable** | **List<string>?** | | [optional] +**StringNullable** | **string?** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/csharp-restsharp/docs/FormApi.md b/samples/client/echo_api/csharp-restsharp/docs/FormApi.md index 34f1f1d017f8..a652ec70ae96 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/FormApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/FormApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://localhost:3000* # **TestFormIntegerBooleanString** -> string TestFormIntegerBooleanString (int? integerForm = null, bool? booleanForm = null, string? stringForm = null) +> string TestFormIntegerBooleanString (int integerForm = null, bool booleanForm = null, string stringForm = null) Test form parameter(s) @@ -33,9 +33,9 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new FormApi(config); - var integerForm = 56; // int? | (optional) - var booleanForm = true; // bool? | (optional) - var stringForm = "stringForm_example"; // string? | (optional) + var integerForm = 56; // int | (optional) + var booleanForm = true; // bool | (optional) + var stringForm = "stringForm_example"; // string | (optional) try { @@ -78,9 +78,9 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **integerForm** | **int?** | | [optional] | -| **booleanForm** | **bool?** | | [optional] | -| **stringForm** | **string?** | | [optional] | +| **integerForm** | **int** | | [optional] | +| **booleanForm** | **bool** | | [optional] | +| **stringForm** | **string** | | [optional] | ### Return type @@ -196,7 +196,7 @@ No authorization required # **TestFormOneof** -> string TestFormOneof (string? form1 = null, int? form2 = null, string? form3 = null, bool? form4 = null, long? id = null, string? name = null) +> string TestFormOneof (string form1 = null, int form2 = null, string form3 = null, bool form4 = null, long id = null, string name = null) Test form parameter(s) for oneOf schema @@ -219,12 +219,12 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new FormApi(config); - var form1 = "form1_example"; // string? | (optional) - var form2 = 56; // int? | (optional) - var form3 = "form3_example"; // string? | (optional) - var form4 = true; // bool? | (optional) - var id = 789L; // long? | (optional) - var name = "name_example"; // string? | (optional) + var form1 = "form1_example"; // string | (optional) + var form2 = 56; // int | (optional) + var form3 = "form3_example"; // string | (optional) + var form4 = true; // bool | (optional) + var id = 789L; // long | (optional) + var name = "name_example"; // string | (optional) try { @@ -267,12 +267,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **form1** | **string?** | | [optional] | -| **form2** | **int?** | | [optional] | -| **form3** | **string?** | | [optional] | -| **form4** | **bool?** | | [optional] | -| **id** | **long?** | | [optional] | -| **name** | **string?** | | [optional] | +| **form1** | **string** | | [optional] | +| **form2** | **int** | | [optional] | +| **form3** | **string** | | [optional] | +| **form4** | **bool** | | [optional] | +| **id** | **long** | | [optional] | +| **name** | **string** | | [optional] | ### Return type diff --git a/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md b/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md index 01783ad4a881..470386948bf7 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md @@ -8,7 +8,7 @@ All URIs are relative to *http://localhost:3000* # **TestHeaderIntegerBooleanStringEnums** -> string TestHeaderIntegerBooleanStringEnums (int? integerHeader = null, bool? booleanHeader = null, string? stringHeader = null, string? enumNonrefStringHeader = null, StringEnumRef? enumRefStringHeader = null) +> string TestHeaderIntegerBooleanStringEnums (int integerHeader = null, bool booleanHeader = null, string stringHeader = null, string enumNonrefStringHeader = null, StringEnumRef enumRefStringHeader = null) Test header parameter(s) @@ -31,11 +31,11 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new HeaderApi(config); - var integerHeader = 56; // int? | (optional) - var booleanHeader = true; // bool? | (optional) - var stringHeader = "stringHeader_example"; // string? | (optional) - var enumNonrefStringHeader = "success"; // string? | (optional) - var enumRefStringHeader = new StringEnumRef?(); // StringEnumRef? | (optional) + var integerHeader = 56; // int | (optional) + var booleanHeader = true; // bool | (optional) + var stringHeader = "stringHeader_example"; // string | (optional) + var enumNonrefStringHeader = "success"; // string | (optional) + var enumRefStringHeader = (StringEnumRef) "success"; // StringEnumRef | (optional) try { @@ -78,11 +78,11 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **integerHeader** | **int?** | | [optional] | -| **booleanHeader** | **bool?** | | [optional] | -| **stringHeader** | **string?** | | [optional] | -| **enumNonrefStringHeader** | **string?** | | [optional] | -| **enumRefStringHeader** | [**StringEnumRef?**](StringEnumRef?.md) | | [optional] | +| **integerHeader** | **int** | | [optional] | +| **booleanHeader** | **bool** | | [optional] | +| **stringHeader** | **string** | | [optional] | +| **enumNonrefStringHeader** | **string** | | [optional] | +| **enumRefStringHeader** | **StringEnumRef** | | [optional] | ### Return type diff --git a/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md b/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md index c740ebd3c275..8dd2160afe18 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md @@ -17,7 +17,7 @@ All URIs are relative to *http://localhost:3000* # **TestEnumRefString** -> string TestEnumRefString (string? enumNonrefStringQuery = null, StringEnumRef? enumRefStringQuery = null) +> string TestEnumRefString (string enumNonrefStringQuery = null, StringEnumRef enumRefStringQuery = null) Test query parameter(s) @@ -40,8 +40,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var enumNonrefStringQuery = "success"; // string? | (optional) - var enumRefStringQuery = new StringEnumRef?(); // StringEnumRef? | (optional) + var enumNonrefStringQuery = "success"; // string | (optional) + var enumRefStringQuery = (StringEnumRef) "success"; // StringEnumRef | (optional) try { @@ -84,8 +84,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumNonrefStringQuery** | **string?** | | [optional] | -| **enumRefStringQuery** | [**StringEnumRef?**](StringEnumRef?.md) | | [optional] | +| **enumNonrefStringQuery** | **string** | | [optional] | +| **enumRefStringQuery** | **StringEnumRef** | | [optional] | ### Return type @@ -110,7 +110,7 @@ No authorization required # **TestQueryDatetimeDateString** -> string TestQueryDatetimeDateString (DateTime? datetimeQuery = null, DateOnly? dateQuery = null, string? stringQuery = null) +> string TestQueryDatetimeDateString (DateTime datetimeQuery = null, DateOnly dateQuery = null, string stringQuery = null) Test query parameter(s) @@ -133,9 +133,9 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var datetimeQuery = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | (optional) - var dateQuery = DateOnly.Parse("2013-10-20"); // DateOnly? | (optional) - var stringQuery = "stringQuery_example"; // string? | (optional) + var datetimeQuery = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime | (optional) + var dateQuery = DateOnly.Parse("2013-10-20"); // DateOnly | (optional) + var stringQuery = "stringQuery_example"; // string | (optional) try { @@ -178,9 +178,9 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **datetimeQuery** | **DateTime?** | | [optional] | -| **dateQuery** | **DateOnly?** | | [optional] | -| **stringQuery** | **string?** | | [optional] | +| **datetimeQuery** | **DateTime** | | [optional] | +| **dateQuery** | **DateOnly** | | [optional] | +| **stringQuery** | **string** | | [optional] | ### Return type @@ -205,7 +205,7 @@ No authorization required # **TestQueryIntegerBooleanString** -> string TestQueryIntegerBooleanString (int? integerQuery = null, bool? booleanQuery = null, string? stringQuery = null) +> string TestQueryIntegerBooleanString (int integerQuery = null, bool booleanQuery = null, string stringQuery = null) Test query parameter(s) @@ -228,9 +228,9 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var integerQuery = 56; // int? | (optional) - var booleanQuery = true; // bool? | (optional) - var stringQuery = "stringQuery_example"; // string? | (optional) + var integerQuery = 56; // int | (optional) + var booleanQuery = true; // bool | (optional) + var stringQuery = "stringQuery_example"; // string | (optional) try { @@ -273,9 +273,9 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **integerQuery** | **int?** | | [optional] | -| **booleanQuery** | **bool?** | | [optional] | -| **stringQuery** | **string?** | | [optional] | +| **integerQuery** | **int** | | [optional] | +| **booleanQuery** | **bool** | | [optional] | +| **stringQuery** | **string** | | [optional] | ### Return type @@ -300,7 +300,7 @@ No authorization required # **TestQueryStyleDeepObjectExplodeTrueObject** -> string TestQueryStyleDeepObjectExplodeTrueObject (Pet? queryObject = null) +> string TestQueryStyleDeepObjectExplodeTrueObject (Pet queryObject = null) Test query parameter(s) @@ -323,7 +323,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var queryObject = new Pet?(); // Pet? | (optional) + var queryObject = new Pet(); // Pet | (optional) try { @@ -366,7 +366,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **queryObject** | [**Pet?**](Pet?.md) | | [optional] | +| **queryObject** | [**Pet**](Pet.md) | | [optional] | ### Return type @@ -391,7 +391,7 @@ No authorization required # **TestQueryStyleDeepObjectExplodeTrueObjectAllOf** -> string TestQueryStyleDeepObjectExplodeTrueObjectAllOf (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = null) +> string TestQueryStyleDeepObjectExplodeTrueObjectAllOf (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = null) Test query parameter(s) @@ -414,7 +414,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?(); // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? | (optional) + var queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(); // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter | (optional) try { @@ -457,7 +457,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?**](TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?.md) | | [optional] | +| **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter**](TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md) | | [optional] | ### Return type @@ -482,7 +482,7 @@ No authorization required # **TestQueryStyleFormExplodeFalseArrayInteger** -> string TestQueryStyleFormExplodeFalseArrayInteger (List? queryObject = null) +> string TestQueryStyleFormExplodeFalseArrayInteger (List queryObject = null) Test query parameter(s) @@ -505,7 +505,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var queryObject = new List?(); // List? | (optional) + var queryObject = new List(); // List | (optional) try { @@ -548,7 +548,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **queryObject** | [**List<int>?**](int.md) | | [optional] | +| **queryObject** | [**List<int>**](int.md) | | [optional] | ### Return type @@ -573,7 +573,7 @@ No authorization required # **TestQueryStyleFormExplodeFalseArrayString** -> string TestQueryStyleFormExplodeFalseArrayString (List? queryObject = null) +> string TestQueryStyleFormExplodeFalseArrayString (List queryObject = null) Test query parameter(s) @@ -596,7 +596,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var queryObject = new List?(); // List? | (optional) + var queryObject = new List(); // List | (optional) try { @@ -639,7 +639,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **queryObject** | [**List<string>?**](string.md) | | [optional] | +| **queryObject** | [**List<string>**](string.md) | | [optional] | ### Return type @@ -664,7 +664,7 @@ No authorization required # **TestQueryStyleFormExplodeTrueArrayString** -> string TestQueryStyleFormExplodeTrueArrayString (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = null) +> string TestQueryStyleFormExplodeTrueArrayString (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = null) Test query parameter(s) @@ -687,7 +687,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var queryObject = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? | (optional) + var queryObject = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | (optional) try { @@ -730,7 +730,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?**](TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?.md) | | [optional] | +| **queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter**](TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md) | | [optional] | ### Return type @@ -755,7 +755,7 @@ No authorization required # **TestQueryStyleFormExplodeTrueObject** -> string TestQueryStyleFormExplodeTrueObject (Pet? queryObject = null) +> string TestQueryStyleFormExplodeTrueObject (Pet queryObject = null) Test query parameter(s) @@ -778,7 +778,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var queryObject = new Pet?(); // Pet? | (optional) + var queryObject = new Pet(); // Pet | (optional) try { @@ -821,7 +821,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **queryObject** | [**Pet?**](Pet?.md) | | [optional] | +| **queryObject** | [**Pet**](Pet.md) | | [optional] | ### Return type @@ -846,7 +846,7 @@ No authorization required # **TestQueryStyleFormExplodeTrueObjectAllOf** -> string TestQueryStyleFormExplodeTrueObjectAllOf (DataQuery? queryObject = null) +> string TestQueryStyleFormExplodeTrueObjectAllOf (DataQuery queryObject = null) Test query parameter(s) @@ -869,7 +869,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:3000"; var apiInstance = new QueryApi(config); - var queryObject = new DataQuery?(); // DataQuery? | (optional) + var queryObject = new DataQuery(); // DataQuery | (optional) try { @@ -912,7 +912,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **queryObject** | [**DataQuery?**](DataQuery?.md) | | [optional] | +| **queryObject** | [**DataQuery**](DataQuery.md) | | [optional] | ### Return type diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs index 89deceeb600e..c3e8c7332bf5 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs @@ -58,7 +58,7 @@ public interface IBodyApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestBodyApplicationOctetstreamBinary(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0); + string TestBodyApplicationOctetstreamBinary(Option body = default(Option), int operationIndex = 0); /// /// Test body parameter(s) @@ -70,7 +70,7 @@ public interface IBodyApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestBodyApplicationOctetstreamBinaryWithHttpInfo(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0); + ApiResponse TestBodyApplicationOctetstreamBinaryWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// Test array of binary in multipart mime /// @@ -104,7 +104,7 @@ public interface IBodyApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestBodyMultipartFormdataSingleBinary(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0); + string TestBodyMultipartFormdataSingleBinary(Option myFile = default(Option), int operationIndex = 0); /// /// Test single binary in multipart mime @@ -116,7 +116,7 @@ public interface IBodyApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestBodyMultipartFormdataSingleBinaryWithHttpInfo(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0); + ApiResponse TestBodyMultipartFormdataSingleBinaryWithHttpInfo(Option myFile = default(Option), int operationIndex = 0); /// /// Test body parameter(s) /// @@ -127,7 +127,7 @@ public interface IBodyApiSync : IApiAccessor /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// Pet - Pet TestEchoBodyAllOfPet(Pet? pet = default(Pet?), int operationIndex = 0); + Pet TestEchoBodyAllOfPet(Option pet = default(Option), int operationIndex = 0); /// /// Test body parameter(s) @@ -139,7 +139,7 @@ public interface IBodyApiSync : IApiAccessor /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse TestEchoBodyAllOfPetWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0); + ApiResponse TestEchoBodyAllOfPetWithHttpInfo(Option pet = default(Option), int operationIndex = 0); /// /// Test free form object /// @@ -150,7 +150,7 @@ public interface IBodyApiSync : IApiAccessor /// Free form object (optional) /// Index associated with the operation. /// string - string TestEchoBodyFreeFormObjectResponseString(Object? body = default(Object?), int operationIndex = 0); + string TestEchoBodyFreeFormObjectResponseString(Option body = default(Option), int operationIndex = 0); /// /// Test free form object @@ -162,7 +162,7 @@ public interface IBodyApiSync : IApiAccessor /// Free form object (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object? body = default(Object?), int operationIndex = 0); + ApiResponse TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// Test body parameter(s) /// @@ -173,7 +173,7 @@ public interface IBodyApiSync : IApiAccessor /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// Pet - Pet TestEchoBodyPet(Pet? pet = default(Pet?), int operationIndex = 0); + Pet TestEchoBodyPet(Option pet = default(Option), int operationIndex = 0); /// /// Test body parameter(s) @@ -185,7 +185,7 @@ public interface IBodyApiSync : IApiAccessor /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse TestEchoBodyPetWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0); + ApiResponse TestEchoBodyPetWithHttpInfo(Option pet = default(Option), int operationIndex = 0); /// /// Test empty response body /// @@ -196,7 +196,7 @@ public interface IBodyApiSync : IApiAccessor /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// string - string TestEchoBodyPetResponseString(Pet? pet = default(Pet?), int operationIndex = 0); + string TestEchoBodyPetResponseString(Option pet = default(Option), int operationIndex = 0); /// /// Test empty response body @@ -208,7 +208,7 @@ public interface IBodyApiSync : IApiAccessor /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestEchoBodyPetResponseStringWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0); + ApiResponse TestEchoBodyPetResponseStringWithHttpInfo(Option pet = default(Option), int operationIndex = 0); /// /// Test string enum response body /// @@ -219,7 +219,7 @@ public interface IBodyApiSync : IApiAccessor /// String enum (optional) /// Index associated with the operation. /// StringEnumRef - StringEnumRef TestEchoBodyStringEnum(string? body = default(string?), int operationIndex = 0); + StringEnumRef TestEchoBodyStringEnum(Option body = default(Option), int operationIndex = 0); /// /// Test string enum response body @@ -231,7 +231,7 @@ public interface IBodyApiSync : IApiAccessor /// String enum (optional) /// Index associated with the operation. /// ApiResponse of StringEnumRef - ApiResponse TestEchoBodyStringEnumWithHttpInfo(string? body = default(string?), int operationIndex = 0); + ApiResponse TestEchoBodyStringEnumWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// Test empty json (request body) /// @@ -242,7 +242,7 @@ public interface IBodyApiSync : IApiAccessor /// Tag object (optional) /// Index associated with the operation. /// string - string TestEchoBodyTagResponseString(Tag? tag = default(Tag?), int operationIndex = 0); + string TestEchoBodyTagResponseString(Option tag = default(Option), int operationIndex = 0); /// /// Test empty json (request body) @@ -254,7 +254,7 @@ public interface IBodyApiSync : IApiAccessor /// Tag object (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestEchoBodyTagResponseStringWithHttpInfo(Tag? tag = default(Tag?), int operationIndex = 0); + ApiResponse TestEchoBodyTagResponseStringWithHttpInfo(Option tag = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -298,7 +298,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestBodyApplicationOctetstreamBinaryAsync(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyApplicationOctetstreamBinaryAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test body parameter(s) @@ -311,7 +311,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestBodyApplicationOctetstreamBinaryWithHttpInfoAsync(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyApplicationOctetstreamBinaryWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test array of binary in multipart mime /// @@ -348,7 +348,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestBodyMultipartFormdataSingleBinaryAsync(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyMultipartFormdataSingleBinaryAsync(Option myFile = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test single binary in multipart mime @@ -361,7 +361,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestBodyMultipartFormdataSingleBinaryWithHttpInfoAsync(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyMultipartFormdataSingleBinaryWithHttpInfoAsync(Option myFile = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test body parameter(s) /// @@ -373,7 +373,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task TestEchoBodyAllOfPetAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEchoBodyAllOfPetAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test body parameter(s) @@ -386,7 +386,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> TestEchoBodyAllOfPetWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEchoBodyAllOfPetWithHttpInfoAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test free form object /// @@ -398,7 +398,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestEchoBodyFreeFormObjectResponseStringAsync(Object? body = default(Object?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEchoBodyFreeFormObjectResponseStringAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test free form object @@ -411,7 +411,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestEchoBodyFreeFormObjectResponseStringWithHttpInfoAsync(Object? body = default(Object?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEchoBodyFreeFormObjectResponseStringWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test body parameter(s) /// @@ -423,7 +423,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task TestEchoBodyPetAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEchoBodyPetAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test body parameter(s) @@ -436,7 +436,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> TestEchoBodyPetWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEchoBodyPetWithHttpInfoAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test empty response body /// @@ -448,7 +448,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestEchoBodyPetResponseStringAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEchoBodyPetResponseStringAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test empty response body @@ -461,7 +461,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestEchoBodyPetResponseStringWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEchoBodyPetResponseStringWithHttpInfoAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test string enum response body /// @@ -473,7 +473,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of StringEnumRef - System.Threading.Tasks.Task TestEchoBodyStringEnumAsync(string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEchoBodyStringEnumAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test string enum response body @@ -486,7 +486,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (StringEnumRef) - System.Threading.Tasks.Task> TestEchoBodyStringEnumWithHttpInfoAsync(string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEchoBodyStringEnumWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test empty json (request body) /// @@ -498,7 +498,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestEchoBodyTagResponseStringAsync(Tag? tag = default(Tag?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEchoBodyTagResponseStringAsync(Option tag = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test empty json (request body) @@ -511,7 +511,7 @@ public interface IBodyApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestEchoBodyTagResponseStringWithHttpInfoAsync(Tag? tag = default(Tag?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEchoBodyTagResponseStringWithHttpInfoAsync(Option tag = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -765,7 +765,7 @@ public System.IO.Stream TestBinaryGif(int operationIndex = 0) /// (optional) /// Index associated with the operation. /// string - public string TestBodyApplicationOctetstreamBinary(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0) + public string TestBodyApplicationOctetstreamBinary(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestBodyApplicationOctetstreamBinaryWithHttpInfo(body); return localVarResponse.Data; @@ -778,8 +778,12 @@ public System.IO.Stream TestBinaryGif(int operationIndex = 0) /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestBodyApplicationOctetstreamBinaryWithHttpInfo(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestBodyApplicationOctetstreamBinaryWithHttpInfo(Option body = default(Option), int operationIndex = 0) { + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling BodyApi->TestBodyApplicationOctetstreamBinary"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -831,7 +835,7 @@ public System.IO.Stream TestBinaryGif(int operationIndex = 0) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestBodyApplicationOctetstreamBinaryAsync(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyApplicationOctetstreamBinaryAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestBodyApplicationOctetstreamBinaryWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -845,8 +849,12 @@ public System.IO.Stream TestBinaryGif(int operationIndex = 0) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestBodyApplicationOctetstreamBinaryWithHttpInfoAsync(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyApplicationOctetstreamBinaryWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling BodyApi->TestBodyApplicationOctetstreamBinary"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -916,9 +924,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra { // verify the required parameter 'files' is set if (files == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'files' when calling BodyApi->TestBodyMultipartFormdataArrayOfBinary"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'files' when calling BodyApi->TestBodyMultipartFormdataArrayOfBinary"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -992,9 +998,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra { // verify the required parameter 'files' is set if (files == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'files' when calling BodyApi->TestBodyMultipartFormdataArrayOfBinary"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'files' when calling BodyApi->TestBodyMultipartFormdataArrayOfBinary"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1051,7 +1055,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// (optional) /// Index associated with the operation. /// string - public string TestBodyMultipartFormdataSingleBinary(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0) + public string TestBodyMultipartFormdataSingleBinary(Option myFile = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile); return localVarResponse.Data; @@ -1064,8 +1068,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataSingleBinaryWithHttpInfo(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataSingleBinaryWithHttpInfo(Option myFile = default(Option), int operationIndex = 0) { + // verify the required parameter 'myFile' is set + if (myFile.IsSet && myFile.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'myFile' when calling BodyApi->TestBodyMultipartFormdataSingleBinary"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1089,9 +1097,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (myFile != null) + if (myFile.IsSet) { - localVarRequestOptions.FileParameters.Add("my-file", myFile); + localVarRequestOptions.FileParameters.Add("my-file", myFile.Value); } localVarRequestOptions.Operation = "BodyApi.TestBodyMultipartFormdataSingleBinary"; @@ -1120,7 +1128,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestBodyMultipartFormdataSingleBinaryAsync(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyMultipartFormdataSingleBinaryAsync(Option myFile = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestBodyMultipartFormdataSingleBinaryWithHttpInfoAsync(myFile, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1134,8 +1142,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestBodyMultipartFormdataSingleBinaryWithHttpInfoAsync(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyMultipartFormdataSingleBinaryWithHttpInfoAsync(Option myFile = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'myFile' is set + if (myFile.IsSet && myFile.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'myFile' when calling BodyApi->TestBodyMultipartFormdataSingleBinary"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1160,9 +1172,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (myFile != null) + if (myFile.IsSet) { - localVarRequestOptions.FileParameters.Add("my-file", myFile); + localVarRequestOptions.FileParameters.Add("my-file", myFile.Value); } localVarRequestOptions.Operation = "BodyApi.TestBodyMultipartFormdataSingleBinary"; @@ -1191,7 +1203,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// Pet - public Pet TestEchoBodyAllOfPet(Pet? pet = default(Pet?), int operationIndex = 0) + public Pet TestEchoBodyAllOfPet(Option pet = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyAllOfPetWithHttpInfo(pet); return localVarResponse.Data; @@ -1204,8 +1216,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse TestEchoBodyAllOfPetWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEchoBodyAllOfPetWithHttpInfo(Option pet = default(Option), int operationIndex = 0) { + // verify the required parameter 'pet' is set + if (pet.IsSet && pet.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling BodyApi->TestEchoBodyAllOfPet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1257,7 +1273,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task TestEchoBodyAllOfPetAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEchoBodyAllOfPetAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyAllOfPetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1271,8 +1287,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> TestEchoBodyAllOfPetWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEchoBodyAllOfPetWithHttpInfoAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'pet' is set + if (pet.IsSet && pet.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling BodyApi->TestEchoBodyAllOfPet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,7 +1345,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Free form object (optional) /// Index associated with the operation. /// string - public string TestEchoBodyFreeFormObjectResponseString(Object? body = default(Object?), int operationIndex = 0) + public string TestEchoBodyFreeFormObjectResponseString(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(body); return localVarResponse.Data; @@ -1338,8 +1358,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Free form object (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object? body = default(Object?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(Option body = default(Option), int operationIndex = 0) { + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling BodyApi->TestEchoBodyFreeFormObjectResponseString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1391,7 +1415,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestEchoBodyFreeFormObjectResponseStringAsync(Object? body = default(Object?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEchoBodyFreeFormObjectResponseStringAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyFreeFormObjectResponseStringWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1405,8 +1429,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestEchoBodyFreeFormObjectResponseStringWithHttpInfoAsync(Object? body = default(Object?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEchoBodyFreeFormObjectResponseStringWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling BodyApi->TestEchoBodyFreeFormObjectResponseString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1459,7 +1487,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// Pet - public Pet TestEchoBodyPet(Pet? pet = default(Pet?), int operationIndex = 0) + public Pet TestEchoBodyPet(Option pet = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyPetWithHttpInfo(pet); return localVarResponse.Data; @@ -1472,8 +1500,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse TestEchoBodyPetWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEchoBodyPetWithHttpInfo(Option pet = default(Option), int operationIndex = 0) { + // verify the required parameter 'pet' is set + if (pet.IsSet && pet.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling BodyApi->TestEchoBodyPet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1525,7 +1557,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task TestEchoBodyPetAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEchoBodyPetAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyPetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1539,8 +1571,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> TestEchoBodyPetWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEchoBodyPetWithHttpInfoAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'pet' is set + if (pet.IsSet && pet.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling BodyApi->TestEchoBodyPet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1593,7 +1629,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// string - public string TestEchoBodyPetResponseString(Pet? pet = default(Pet?), int operationIndex = 0) + public string TestEchoBodyPetResponseString(Option pet = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyPetResponseStringWithHttpInfo(pet); return localVarResponse.Data; @@ -1606,8 +1642,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Pet object that needs to be added to the store (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestEchoBodyPetResponseStringWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEchoBodyPetResponseStringWithHttpInfo(Option pet = default(Option), int operationIndex = 0) { + // verify the required parameter 'pet' is set + if (pet.IsSet && pet.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling BodyApi->TestEchoBodyPetResponseString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1659,7 +1699,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestEchoBodyPetResponseStringAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEchoBodyPetResponseStringAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyPetResponseStringWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1673,8 +1713,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestEchoBodyPetResponseStringWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEchoBodyPetResponseStringWithHttpInfoAsync(Option pet = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'pet' is set + if (pet.IsSet && pet.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling BodyApi->TestEchoBodyPetResponseString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1727,7 +1771,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// String enum (optional) /// Index associated with the operation. /// StringEnumRef - public StringEnumRef TestEchoBodyStringEnum(string? body = default(string?), int operationIndex = 0) + public StringEnumRef TestEchoBodyStringEnum(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyStringEnumWithHttpInfo(body); return localVarResponse.Data; @@ -1740,8 +1784,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// String enum (optional) /// Index associated with the operation. /// ApiResponse of StringEnumRef - public Org.OpenAPITools.Client.ApiResponse TestEchoBodyStringEnumWithHttpInfo(string? body = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEchoBodyStringEnumWithHttpInfo(Option body = default(Option), int operationIndex = 0) { + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling BodyApi->TestEchoBodyStringEnum"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1793,7 +1841,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of StringEnumRef - public async System.Threading.Tasks.Task TestEchoBodyStringEnumAsync(string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEchoBodyStringEnumAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyStringEnumWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1807,8 +1855,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (StringEnumRef) - public async System.Threading.Tasks.Task> TestEchoBodyStringEnumWithHttpInfoAsync(string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEchoBodyStringEnumWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling BodyApi->TestEchoBodyStringEnum"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1861,7 +1913,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Tag object (optional) /// Index associated with the operation. /// string - public string TestEchoBodyTagResponseString(Tag? tag = default(Tag?), int operationIndex = 0) + public string TestEchoBodyTagResponseString(Option tag = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyTagResponseStringWithHttpInfo(tag); return localVarResponse.Data; @@ -1874,8 +1926,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Tag object (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestEchoBodyTagResponseStringWithHttpInfo(Tag? tag = default(Tag?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEchoBodyTagResponseStringWithHttpInfo(Option tag = default(Option), int operationIndex = 0) { + // verify the required parameter 'tag' is set + if (tag.IsSet && tag.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tag' when calling BodyApi->TestEchoBodyTagResponseString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1927,7 +1983,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestEchoBodyTagResponseStringAsync(Tag? tag = default(Tag?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEchoBodyTagResponseStringAsync(Option tag = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyTagResponseStringWithHttpInfoAsync(tag, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1941,8 +1997,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataArra /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestEchoBodyTagResponseStringWithHttpInfoAsync(Tag? tag = default(Tag?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEchoBodyTagResponseStringWithHttpInfoAsync(Option tag = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'tag' is set + if (tag.IsSet && tag.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tag' when calling BodyApi->TestEchoBodyTagResponseString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/FormApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/FormApi.cs index fdd57f84f989..afaae84cde71 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/FormApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/FormApi.cs @@ -39,7 +39,7 @@ public interface IFormApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestFormIntegerBooleanString(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0); + string TestFormIntegerBooleanString(Option integerForm = default(Option), Option booleanForm = default(Option), Option stringForm = default(Option), int operationIndex = 0); /// /// Test form parameter(s) @@ -53,7 +53,7 @@ public interface IFormApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestFormIntegerBooleanStringWithHttpInfo(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0); + ApiResponse TestFormIntegerBooleanStringWithHttpInfo(Option integerForm = default(Option), Option booleanForm = default(Option), Option stringForm = default(Option), int operationIndex = 0); /// /// Test form parameter(s) for multipart schema /// @@ -92,7 +92,7 @@ public interface IFormApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestFormOneof(string? form1 = default(string?), int? form2 = default(int?), string? form3 = default(string?), bool? form4 = default(bool?), long? id = default(long?), string? name = default(string?), int operationIndex = 0); + string TestFormOneof(Option form1 = default(Option), Option form2 = default(Option), Option form3 = default(Option), Option form4 = default(Option), Option id = default(Option), Option name = default(Option), int operationIndex = 0); /// /// Test form parameter(s) for oneOf schema @@ -109,7 +109,7 @@ public interface IFormApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestFormOneofWithHttpInfo(string? form1 = default(string?), int? form2 = default(int?), string? form3 = default(string?), bool? form4 = default(bool?), long? id = default(long?), string? name = default(string?), int operationIndex = 0); + ApiResponse TestFormOneofWithHttpInfo(Option form1 = default(Option), Option form2 = default(Option), Option form3 = default(Option), Option form4 = default(Option), Option id = default(Option), Option name = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -132,7 +132,7 @@ public interface IFormApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestFormIntegerBooleanStringAsync(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestFormIntegerBooleanStringAsync(Option integerForm = default(Option), Option booleanForm = default(Option), Option stringForm = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test form parameter(s) @@ -147,7 +147,7 @@ public interface IFormApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestFormIntegerBooleanStringWithHttpInfoAsync(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestFormIntegerBooleanStringWithHttpInfoAsync(Option integerForm = default(Option), Option booleanForm = default(Option), Option stringForm = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test form parameter(s) for multipart schema /// @@ -189,7 +189,7 @@ public interface IFormApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestFormOneofAsync(string? form1 = default(string?), int? form2 = default(int?), string? form3 = default(string?), bool? form4 = default(bool?), long? id = default(long?), string? name = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestFormOneofAsync(Option form1 = default(Option), Option form2 = default(Option), Option form3 = default(Option), Option form4 = default(Option), Option id = default(Option), Option name = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test form parameter(s) for oneOf schema @@ -207,7 +207,7 @@ public interface IFormApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestFormOneofWithHttpInfoAsync(string? form1 = default(string?), int? form2 = default(int?), string? form3 = default(string?), bool? form4 = default(bool?), long? id = default(long?), string? name = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestFormOneofWithHttpInfoAsync(Option form1 = default(Option), Option form2 = default(Option), Option form3 = default(Option), Option form4 = default(Option), Option id = default(Option), Option name = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -337,7 +337,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestFormIntegerBooleanString(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0) + public string TestFormIntegerBooleanString(Option integerForm = default(Option), Option booleanForm = default(Option), Option stringForm = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestFormIntegerBooleanStringWithHttpInfo(integerForm, booleanForm, stringForm); return localVarResponse.Data; @@ -352,8 +352,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestFormIntegerBooleanStringWithHttpInfo(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestFormIntegerBooleanStringWithHttpInfo(Option integerForm = default(Option), Option booleanForm = default(Option), Option stringForm = default(Option), int operationIndex = 0) { + // verify the required parameter 'stringForm' is set + if (stringForm.IsSet && stringForm.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'stringForm' when calling FormApi->TestFormIntegerBooleanString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -377,17 +381,17 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integerForm != null) + if (integerForm.IsSet) { - localVarRequestOptions.FormParameters.Add("integer_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerForm)); // form parameter + localVarRequestOptions.FormParameters.Add("integer_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerForm.Value)); // form parameter } - if (booleanForm != null) + if (booleanForm.IsSet) { - localVarRequestOptions.FormParameters.Add("boolean_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanForm)); // form parameter + localVarRequestOptions.FormParameters.Add("boolean_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanForm.Value)); // form parameter } - if (stringForm != null) + if (stringForm.IsSet) { - localVarRequestOptions.FormParameters.Add("string_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringForm)); // form parameter + localVarRequestOptions.FormParameters.Add("string_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringForm.Value)); // form parameter } localVarRequestOptions.Operation = "FormApi.TestFormIntegerBooleanString"; @@ -418,7 +422,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestFormIntegerBooleanStringAsync(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestFormIntegerBooleanStringAsync(Option integerForm = default(Option), Option booleanForm = default(Option), Option stringForm = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestFormIntegerBooleanStringWithHttpInfoAsync(integerForm, booleanForm, stringForm, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -434,8 +438,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestFormIntegerBooleanStringWithHttpInfoAsync(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestFormIntegerBooleanStringWithHttpInfoAsync(Option integerForm = default(Option), Option booleanForm = default(Option), Option stringForm = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'stringForm' is set + if (stringForm.IsSet && stringForm.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'stringForm' when calling FormApi->TestFormIntegerBooleanString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -460,17 +468,17 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integerForm != null) + if (integerForm.IsSet) { - localVarRequestOptions.FormParameters.Add("integer_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerForm)); // form parameter + localVarRequestOptions.FormParameters.Add("integer_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerForm.Value)); // form parameter } - if (booleanForm != null) + if (booleanForm.IsSet) { - localVarRequestOptions.FormParameters.Add("boolean_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanForm)); // form parameter + localVarRequestOptions.FormParameters.Add("boolean_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanForm.Value)); // form parameter } - if (stringForm != null) + if (stringForm.IsSet) { - localVarRequestOptions.FormParameters.Add("string_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringForm)); // form parameter + localVarRequestOptions.FormParameters.Add("string_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringForm.Value)); // form parameter } localVarRequestOptions.Operation = "FormApi.TestFormIntegerBooleanString"; @@ -516,9 +524,7 @@ public Org.OpenAPITools.Client.ApiResponse TestFormObjectMultipartWithHt { // verify the required parameter 'marker' is set if (marker == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'marker' when calling FormApi->TestFormObjectMultipart"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'marker' when calling FormApi->TestFormObjectMultipart"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -589,9 +595,7 @@ public Org.OpenAPITools.Client.ApiResponse TestFormObjectMultipartWithHt { // verify the required parameter 'marker' is set if (marker == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'marker' when calling FormApi->TestFormObjectMultipart"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'marker' when calling FormApi->TestFormObjectMultipart"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -650,7 +654,7 @@ public Org.OpenAPITools.Client.ApiResponse TestFormObjectMultipartWithHt /// (optional) /// Index associated with the operation. /// string - public string TestFormOneof(string? form1 = default(string?), int? form2 = default(int?), string? form3 = default(string?), bool? form4 = default(bool?), long? id = default(long?), string? name = default(string?), int operationIndex = 0) + public string TestFormOneof(Option form1 = default(Option), Option form2 = default(Option), Option form3 = default(Option), Option form4 = default(Option), Option id = default(Option), Option name = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestFormOneofWithHttpInfo(form1, form2, form3, form4, id, name); return localVarResponse.Data; @@ -668,8 +672,20 @@ public Org.OpenAPITools.Client.ApiResponse TestFormObjectMultipartWithHt /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestFormOneofWithHttpInfo(string? form1 = default(string?), int? form2 = default(int?), string? form3 = default(string?), bool? form4 = default(bool?), long? id = default(long?), string? name = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestFormOneofWithHttpInfo(Option form1 = default(Option), Option form2 = default(Option), Option form3 = default(Option), Option form4 = default(Option), Option id = default(Option), Option name = default(Option), int operationIndex = 0) { + // verify the required parameter 'form1' is set + if (form1.IsSet && form1.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'form1' when calling FormApi->TestFormOneof"); + + // verify the required parameter 'form3' is set + if (form3.IsSet && form3.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'form3' when calling FormApi->TestFormOneof"); + + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling FormApi->TestFormOneof"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -693,29 +709,29 @@ public Org.OpenAPITools.Client.ApiResponse TestFormObjectMultipartWithHt localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (form1 != null) + if (form1.IsSet) { - localVarRequestOptions.FormParameters.Add("form1", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form1)); // form parameter + localVarRequestOptions.FormParameters.Add("form1", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form1.Value)); // form parameter } - if (form2 != null) + if (form2.IsSet) { - localVarRequestOptions.FormParameters.Add("form2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form2)); // form parameter + localVarRequestOptions.FormParameters.Add("form2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form2.Value)); // form parameter } - if (form3 != null) + if (form3.IsSet) { - localVarRequestOptions.FormParameters.Add("form3", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form3)); // form parameter + localVarRequestOptions.FormParameters.Add("form3", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form3.Value)); // form parameter } - if (form4 != null) + if (form4.IsSet) { - localVarRequestOptions.FormParameters.Add("form4", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form4)); // form parameter + localVarRequestOptions.FormParameters.Add("form4", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form4.Value)); // form parameter } - if (id != null) + if (id.IsSet) { - localVarRequestOptions.FormParameters.Add("id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(id)); // form parameter + localVarRequestOptions.FormParameters.Add("id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(id.Value)); // form parameter } - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } localVarRequestOptions.Operation = "FormApi.TestFormOneof"; @@ -749,7 +765,7 @@ public Org.OpenAPITools.Client.ApiResponse TestFormObjectMultipartWithHt /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestFormOneofAsync(string? form1 = default(string?), int? form2 = default(int?), string? form3 = default(string?), bool? form4 = default(bool?), long? id = default(long?), string? name = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestFormOneofAsync(Option form1 = default(Option), Option form2 = default(Option), Option form3 = default(Option), Option form4 = default(Option), Option id = default(Option), Option name = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestFormOneofWithHttpInfoAsync(form1, form2, form3, form4, id, name, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -768,8 +784,20 @@ public Org.OpenAPITools.Client.ApiResponse TestFormObjectMultipartWithHt /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestFormOneofWithHttpInfoAsync(string? form1 = default(string?), int? form2 = default(int?), string? form3 = default(string?), bool? form4 = default(bool?), long? id = default(long?), string? name = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestFormOneofWithHttpInfoAsync(Option form1 = default(Option), Option form2 = default(Option), Option form3 = default(Option), Option form4 = default(Option), Option id = default(Option), Option name = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'form1' is set + if (form1.IsSet && form1.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'form1' when calling FormApi->TestFormOneof"); + + // verify the required parameter 'form3' is set + if (form3.IsSet && form3.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'form3' when calling FormApi->TestFormOneof"); + + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling FormApi->TestFormOneof"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -794,29 +822,29 @@ public Org.OpenAPITools.Client.ApiResponse TestFormObjectMultipartWithHt localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (form1 != null) + if (form1.IsSet) { - localVarRequestOptions.FormParameters.Add("form1", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form1)); // form parameter + localVarRequestOptions.FormParameters.Add("form1", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form1.Value)); // form parameter } - if (form2 != null) + if (form2.IsSet) { - localVarRequestOptions.FormParameters.Add("form2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form2)); // form parameter + localVarRequestOptions.FormParameters.Add("form2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form2.Value)); // form parameter } - if (form3 != null) + if (form3.IsSet) { - localVarRequestOptions.FormParameters.Add("form3", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form3)); // form parameter + localVarRequestOptions.FormParameters.Add("form3", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form3.Value)); // form parameter } - if (form4 != null) + if (form4.IsSet) { - localVarRequestOptions.FormParameters.Add("form4", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form4)); // form parameter + localVarRequestOptions.FormParameters.Add("form4", Org.OpenAPITools.Client.ClientUtils.ParameterToString(form4.Value)); // form parameter } - if (id != null) + if (id.IsSet) { - localVarRequestOptions.FormParameters.Add("id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(id)); // form parameter + localVarRequestOptions.FormParameters.Add("id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(id.Value)); // form parameter } - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } localVarRequestOptions.Operation = "FormApi.TestFormOneof"; diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/HeaderApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/HeaderApi.cs index a25905f1883b..55320c3df32d 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/HeaderApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/HeaderApi.cs @@ -41,7 +41,7 @@ public interface IHeaderApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestHeaderIntegerBooleanStringEnums(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0); + string TestHeaderIntegerBooleanStringEnums(Option integerHeader = default(Option), Option booleanHeader = default(Option), Option stringHeader = default(Option), Option enumNonrefStringHeader = default(Option), Option enumRefStringHeader = default(Option), int operationIndex = 0); /// /// Test header parameter(s) @@ -57,7 +57,7 @@ public interface IHeaderApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestHeaderIntegerBooleanStringEnumsWithHttpInfo(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0); + ApiResponse TestHeaderIntegerBooleanStringEnumsWithHttpInfo(Option integerHeader = default(Option), Option booleanHeader = default(Option), Option stringHeader = default(Option), Option enumNonrefStringHeader = default(Option), Option enumRefStringHeader = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -82,7 +82,7 @@ public interface IHeaderApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestHeaderIntegerBooleanStringEnumsAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestHeaderIntegerBooleanStringEnumsAsync(Option integerHeader = default(Option), Option booleanHeader = default(Option), Option stringHeader = default(Option), Option enumNonrefStringHeader = default(Option), Option enumRefStringHeader = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test header parameter(s) @@ -99,7 +99,7 @@ public interface IHeaderApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestHeaderIntegerBooleanStringEnumsWithHttpInfoAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestHeaderIntegerBooleanStringEnumsWithHttpInfoAsync(Option integerHeader = default(Option), Option booleanHeader = default(Option), Option stringHeader = default(Option), Option enumNonrefStringHeader = default(Option), Option enumRefStringHeader = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -231,7 +231,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestHeaderIntegerBooleanStringEnums(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0) + public string TestHeaderIntegerBooleanStringEnums(Option integerHeader = default(Option), Option booleanHeader = default(Option), Option stringHeader = default(Option), Option enumNonrefStringHeader = default(Option), Option enumRefStringHeader = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader); return localVarResponse.Data; @@ -248,8 +248,16 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestHeaderIntegerBooleanStringEnumsWithHttpInfo(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestHeaderIntegerBooleanStringEnumsWithHttpInfo(Option integerHeader = default(Option), Option booleanHeader = default(Option), Option stringHeader = default(Option), Option enumNonrefStringHeader = default(Option), Option enumRefStringHeader = default(Option), int operationIndex = 0) { + // verify the required parameter 'stringHeader' is set + if (stringHeader.IsSet && stringHeader.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'stringHeader' when calling HeaderApi->TestHeaderIntegerBooleanStringEnums"); + + // verify the required parameter 'enumNonrefStringHeader' is set + if (enumNonrefStringHeader.IsSet && enumNonrefStringHeader.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumNonrefStringHeader' when calling HeaderApi->TestHeaderIntegerBooleanStringEnums"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -272,25 +280,25 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integerHeader != null) + if (integerHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("integer_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("integer_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerHeader.Value)); // header parameter } - if (booleanHeader != null) + if (booleanHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanHeader.Value)); // header parameter } - if (stringHeader != null) + if (stringHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringHeader.Value)); // header parameter } - if (enumNonrefStringHeader != null) + if (enumNonrefStringHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_nonref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumNonrefStringHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_nonref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumNonrefStringHeader.Value)); // header parameter } - if (enumRefStringHeader != null) + if (enumRefStringHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_ref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumRefStringHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_ref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumRefStringHeader.Value)); // header parameter } localVarRequestOptions.Operation = "HeaderApi.TestHeaderIntegerBooleanStringEnums"; @@ -323,7 +331,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestHeaderIntegerBooleanStringEnumsAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestHeaderIntegerBooleanStringEnumsAsync(Option integerHeader = default(Option), Option booleanHeader = default(Option), Option stringHeader = default(Option), Option enumNonrefStringHeader = default(Option), Option enumRefStringHeader = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestHeaderIntegerBooleanStringEnumsWithHttpInfoAsync(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -341,8 +349,16 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestHeaderIntegerBooleanStringEnumsWithHttpInfoAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestHeaderIntegerBooleanStringEnumsWithHttpInfoAsync(Option integerHeader = default(Option), Option booleanHeader = default(Option), Option stringHeader = default(Option), Option enumNonrefStringHeader = default(Option), Option enumRefStringHeader = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'stringHeader' is set + if (stringHeader.IsSet && stringHeader.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'stringHeader' when calling HeaderApi->TestHeaderIntegerBooleanStringEnums"); + + // verify the required parameter 'enumNonrefStringHeader' is set + if (enumNonrefStringHeader.IsSet && enumNonrefStringHeader.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumNonrefStringHeader' when calling HeaderApi->TestHeaderIntegerBooleanStringEnums"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -366,25 +382,25 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integerHeader != null) + if (integerHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("integer_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("integer_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerHeader.Value)); // header parameter } - if (booleanHeader != null) + if (booleanHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanHeader.Value)); // header parameter } - if (stringHeader != null) + if (stringHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringHeader.Value)); // header parameter } - if (enumNonrefStringHeader != null) + if (enumNonrefStringHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_nonref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumNonrefStringHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_nonref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumNonrefStringHeader.Value)); // header parameter } - if (enumRefStringHeader != null) + if (enumRefStringHeader.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_ref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumRefStringHeader)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_ref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumRefStringHeader.Value)); // header parameter } localVarRequestOptions.Operation = "HeaderApi.TestHeaderIntegerBooleanStringEnums"; diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/PathApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/PathApi.cs index 9fc7b35620ec..75a3da5926fd 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/PathApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/PathApi.cs @@ -246,15 +246,11 @@ public Org.OpenAPITools.Client.ApiResponse TestsPathStringPathStringInte { // verify the required parameter 'pathString' is set if (pathString == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); // verify the required parameter 'enumNonrefStringPath' is set if (enumNonrefStringPath == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'enumNonrefStringPath' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumNonrefStringPath' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -333,15 +329,11 @@ public Org.OpenAPITools.Client.ApiResponse TestsPathStringPathStringInte { // verify the required parameter 'pathString' is set if (pathString == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); // verify the required parameter 'enumNonrefStringPath' is set if (enumNonrefStringPath == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'enumNonrefStringPath' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumNonrefStringPath' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs index 4765c77171ca..df9e174fb097 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs @@ -38,7 +38,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestEnumRefString(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0); + string TestEnumRefString(Option enumNonrefStringQuery = default(Option), Option enumRefStringQuery = default(Option), int operationIndex = 0); /// /// Test query parameter(s) @@ -51,7 +51,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestEnumRefStringWithHttpInfo(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0); + ApiResponse TestEnumRefStringWithHttpInfo(Option enumNonrefStringQuery = default(Option), Option enumRefStringQuery = default(Option), int operationIndex = 0); /// /// Test query parameter(s) /// @@ -64,7 +64,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestQueryDatetimeDateString(DateTime? datetimeQuery = default(DateTime?), DateOnly? dateQuery = default(DateOnly?), string? stringQuery = default(string?), int operationIndex = 0); + string TestQueryDatetimeDateString(Option datetimeQuery = default(Option), Option dateQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0); /// /// Test query parameter(s) @@ -78,7 +78,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestQueryDatetimeDateStringWithHttpInfo(DateTime? datetimeQuery = default(DateTime?), DateOnly? dateQuery = default(DateOnly?), string? stringQuery = default(string?), int operationIndex = 0); + ApiResponse TestQueryDatetimeDateStringWithHttpInfo(Option datetimeQuery = default(Option), Option dateQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0); /// /// Test query parameter(s) /// @@ -91,7 +91,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestQueryIntegerBooleanString(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0); + string TestQueryIntegerBooleanString(Option integerQuery = default(Option), Option booleanQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0); /// /// Test query parameter(s) @@ -105,7 +105,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestQueryIntegerBooleanStringWithHttpInfo(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0); + ApiResponse TestQueryIntegerBooleanStringWithHttpInfo(Option integerQuery = default(Option), Option booleanQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0); /// /// Test query parameter(s) /// @@ -116,7 +116,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestQueryStyleDeepObjectExplodeTrueObject(Pet? queryObject = default(Pet?), int operationIndex = 0); + string TestQueryStyleDeepObjectExplodeTrueObject(Option queryObject = default(Option), int operationIndex = 0); /// /// Test query parameter(s) @@ -128,7 +128,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(Pet? queryObject = default(Pet?), int operationIndex = 0); + ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0); /// /// Test query parameter(s) /// @@ -139,7 +139,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0); + string TestQueryStyleDeepObjectExplodeTrueObjectAllOf(Option queryObject = default(Option), int operationIndex = 0); /// /// Test query parameter(s) @@ -151,7 +151,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0); + ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0); /// /// Test query parameter(s) /// @@ -162,7 +162,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestQueryStyleFormExplodeFalseArrayInteger(List? queryObject = default(List?), int operationIndex = 0); + string TestQueryStyleFormExplodeFalseArrayInteger(Option> queryObject = default(Option>), int operationIndex = 0); /// /// Test query parameter(s) @@ -174,7 +174,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(List? queryObject = default(List?), int operationIndex = 0); + ApiResponse TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(Option> queryObject = default(Option>), int operationIndex = 0); /// /// Test query parameter(s) /// @@ -185,7 +185,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestQueryStyleFormExplodeFalseArrayString(List? queryObject = default(List?), int operationIndex = 0); + string TestQueryStyleFormExplodeFalseArrayString(Option> queryObject = default(Option>), int operationIndex = 0); /// /// Test query parameter(s) @@ -197,7 +197,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo(List? queryObject = default(List?), int operationIndex = 0); + ApiResponse TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo(Option> queryObject = default(Option>), int operationIndex = 0); /// /// Test query parameter(s) /// @@ -208,7 +208,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0); + string TestQueryStyleFormExplodeTrueArrayString(Option queryObject = default(Option), int operationIndex = 0); /// /// Test query parameter(s) @@ -220,7 +220,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0); + ApiResponse TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0); /// /// Test query parameter(s) /// @@ -231,7 +231,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestQueryStyleFormExplodeTrueObject(Pet? queryObject = default(Pet?), int operationIndex = 0); + string TestQueryStyleFormExplodeTrueObject(Option queryObject = default(Option), int operationIndex = 0); /// /// Test query parameter(s) @@ -243,7 +243,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestQueryStyleFormExplodeTrueObjectWithHttpInfo(Pet? queryObject = default(Pet?), int operationIndex = 0); + ApiResponse TestQueryStyleFormExplodeTrueObjectWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0); /// /// Test query parameter(s) /// @@ -254,7 +254,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// string - string TestQueryStyleFormExplodeTrueObjectAllOf(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0); + string TestQueryStyleFormExplodeTrueObjectAllOf(Option queryObject = default(Option), int operationIndex = 0); /// /// Test query parameter(s) @@ -266,7 +266,7 @@ public interface IQueryApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0); + ApiResponse TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -288,7 +288,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestEnumRefStringAsync(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumRefStringAsync(Option enumNonrefStringQuery = default(Option), Option enumRefStringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -302,7 +302,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestEnumRefStringWithHttpInfoAsync(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumRefStringWithHttpInfoAsync(Option enumNonrefStringQuery = default(Option), Option enumRefStringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) /// @@ -316,7 +316,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestQueryDatetimeDateStringAsync(DateTime? datetimeQuery = default(DateTime?), DateOnly? dateQuery = default(DateOnly?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryDatetimeDateStringAsync(Option datetimeQuery = default(Option), Option dateQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -331,7 +331,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestQueryDatetimeDateStringWithHttpInfoAsync(DateTime? datetimeQuery = default(DateTime?), DateOnly? dateQuery = default(DateOnly?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryDatetimeDateStringWithHttpInfoAsync(Option datetimeQuery = default(Option), Option dateQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) /// @@ -345,7 +345,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestQueryIntegerBooleanStringAsync(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryIntegerBooleanStringAsync(Option integerQuery = default(Option), Option booleanQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -360,7 +360,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestQueryIntegerBooleanStringWithHttpInfoAsync(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryIntegerBooleanStringWithHttpInfoAsync(Option integerQuery = default(Option), Option booleanQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) /// @@ -372,7 +372,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -385,7 +385,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfoAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) /// @@ -397,7 +397,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAllOfAsync(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAllOfAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -410,7 +410,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfoAsync(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) /// @@ -422,7 +422,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestQueryStyleFormExplodeFalseArrayIntegerAsync(List? queryObject = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryStyleFormExplodeFalseArrayIntegerAsync(Option> queryObject = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -435,7 +435,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfoAsync(List? queryObject = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfoAsync(Option> queryObject = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) /// @@ -447,7 +447,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestQueryStyleFormExplodeFalseArrayStringAsync(List? queryObject = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryStyleFormExplodeFalseArrayStringAsync(Option> queryObject = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -460,7 +460,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestQueryStyleFormExplodeFalseArrayStringWithHttpInfoAsync(List? queryObject = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryStyleFormExplodeFalseArrayStringWithHttpInfoAsync(Option> queryObject = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) /// @@ -472,7 +472,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueArrayStringAsync(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueArrayStringAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -485,7 +485,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueArrayStringWithHttpInfoAsync(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueArrayStringWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) /// @@ -497,7 +497,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -510,7 +510,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectWithHttpInfoAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) /// @@ -522,7 +522,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAllOfAsync(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAllOfAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Test query parameter(s) @@ -535,7 +535,7 @@ public interface IQueryApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfoAsync(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -664,7 +664,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestEnumRefString(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0) + public string TestEnumRefString(Option enumNonrefStringQuery = default(Option), Option enumRefStringQuery = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEnumRefStringWithHttpInfo(enumNonrefStringQuery, enumRefStringQuery); return localVarResponse.Data; @@ -678,8 +678,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestEnumRefStringWithHttpInfo(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEnumRefStringWithHttpInfo(Option enumNonrefStringQuery = default(Option), Option enumRefStringQuery = default(Option), int operationIndex = 0) { + // verify the required parameter 'enumNonrefStringQuery' is set + if (enumNonrefStringQuery.IsSet && enumNonrefStringQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumNonrefStringQuery' when calling QueryApi->TestEnumRefString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -702,13 +706,13 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumNonrefStringQuery != null) + if (enumNonrefStringQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_nonref_string_query", enumNonrefStringQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_nonref_string_query", enumNonrefStringQuery.Value)); } - if (enumRefStringQuery != null) + if (enumRefStringQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_ref_string_query", enumRefStringQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_ref_string_query", enumRefStringQuery.Value)); } localVarRequestOptions.Operation = "QueryApi.TestEnumRefString"; @@ -738,7 +742,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestEnumRefStringAsync(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumRefStringAsync(Option enumNonrefStringQuery = default(Option), Option enumRefStringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEnumRefStringWithHttpInfoAsync(enumNonrefStringQuery, enumRefStringQuery, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -753,8 +757,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestEnumRefStringWithHttpInfoAsync(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumRefStringWithHttpInfoAsync(Option enumNonrefStringQuery = default(Option), Option enumRefStringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'enumNonrefStringQuery' is set + if (enumNonrefStringQuery.IsSet && enumNonrefStringQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumNonrefStringQuery' when calling QueryApi->TestEnumRefString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -778,13 +786,13 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumNonrefStringQuery != null) + if (enumNonrefStringQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_nonref_string_query", enumNonrefStringQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_nonref_string_query", enumNonrefStringQuery.Value)); } - if (enumRefStringQuery != null) + if (enumRefStringQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_ref_string_query", enumRefStringQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_ref_string_query", enumRefStringQuery.Value)); } localVarRequestOptions.Operation = "QueryApi.TestEnumRefString"; @@ -815,7 +823,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestQueryDatetimeDateString(DateTime? datetimeQuery = default(DateTime?), DateOnly? dateQuery = default(DateOnly?), string? stringQuery = default(string?), int operationIndex = 0) + public string TestQueryDatetimeDateString(Option datetimeQuery = default(Option), Option dateQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryDatetimeDateStringWithHttpInfo(datetimeQuery, dateQuery, stringQuery); return localVarResponse.Data; @@ -830,8 +838,20 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestQueryDatetimeDateStringWithHttpInfo(DateTime? datetimeQuery = default(DateTime?), DateOnly? dateQuery = default(DateOnly?), string? stringQuery = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryDatetimeDateStringWithHttpInfo(Option datetimeQuery = default(Option), Option dateQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0) { + // verify the required parameter 'datetimeQuery' is set + if (datetimeQuery.IsSet && datetimeQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'datetimeQuery' when calling QueryApi->TestQueryDatetimeDateString"); + + // verify the required parameter 'dateQuery' is set + if (dateQuery.IsSet && dateQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateQuery' when calling QueryApi->TestQueryDatetimeDateString"); + + // verify the required parameter 'stringQuery' is set + if (stringQuery.IsSet && stringQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'stringQuery' when calling QueryApi->TestQueryDatetimeDateString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -854,17 +874,17 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (datetimeQuery != null) + if (datetimeQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "datetime_query", datetimeQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "datetime_query", datetimeQuery.Value)); } - if (dateQuery != null) + if (dateQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "date_query", dateQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "date_query", dateQuery.Value)); } - if (stringQuery != null) + if (stringQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryDatetimeDateString"; @@ -895,7 +915,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestQueryDatetimeDateStringAsync(DateTime? datetimeQuery = default(DateTime?), DateOnly? dateQuery = default(DateOnly?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryDatetimeDateStringAsync(Option datetimeQuery = default(Option), Option dateQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryDatetimeDateStringWithHttpInfoAsync(datetimeQuery, dateQuery, stringQuery, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -911,8 +931,20 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestQueryDatetimeDateStringWithHttpInfoAsync(DateTime? datetimeQuery = default(DateTime?), DateOnly? dateQuery = default(DateOnly?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryDatetimeDateStringWithHttpInfoAsync(Option datetimeQuery = default(Option), Option dateQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'datetimeQuery' is set + if (datetimeQuery.IsSet && datetimeQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'datetimeQuery' when calling QueryApi->TestQueryDatetimeDateString"); + + // verify the required parameter 'dateQuery' is set + if (dateQuery.IsSet && dateQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateQuery' when calling QueryApi->TestQueryDatetimeDateString"); + + // verify the required parameter 'stringQuery' is set + if (stringQuery.IsSet && stringQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'stringQuery' when calling QueryApi->TestQueryDatetimeDateString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -936,17 +968,17 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (datetimeQuery != null) + if (datetimeQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "datetime_query", datetimeQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "datetime_query", datetimeQuery.Value)); } - if (dateQuery != null) + if (dateQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "date_query", dateQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "date_query", dateQuery.Value)); } - if (stringQuery != null) + if (stringQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryDatetimeDateString"; @@ -977,7 +1009,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestQueryIntegerBooleanString(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0) + public string TestQueryIntegerBooleanString(Option integerQuery = default(Option), Option booleanQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery); return localVarResponse.Data; @@ -992,8 +1024,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestQueryIntegerBooleanStringWithHttpInfo(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryIntegerBooleanStringWithHttpInfo(Option integerQuery = default(Option), Option booleanQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0) { + // verify the required parameter 'stringQuery' is set + if (stringQuery.IsSet && stringQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'stringQuery' when calling QueryApi->TestQueryIntegerBooleanString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1016,17 +1052,17 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integerQuery != null) + if (integerQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "integer_query", integerQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "integer_query", integerQuery.Value)); } - if (booleanQuery != null) + if (booleanQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "boolean_query", booleanQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "boolean_query", booleanQuery.Value)); } - if (stringQuery != null) + if (stringQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryIntegerBooleanString"; @@ -1057,7 +1093,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestQueryIntegerBooleanStringAsync(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryIntegerBooleanStringAsync(Option integerQuery = default(Option), Option booleanQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryIntegerBooleanStringWithHttpInfoAsync(integerQuery, booleanQuery, stringQuery, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1073,8 +1109,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestQueryIntegerBooleanStringWithHttpInfoAsync(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryIntegerBooleanStringWithHttpInfoAsync(Option integerQuery = default(Option), Option booleanQuery = default(Option), Option stringQuery = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'stringQuery' is set + if (stringQuery.IsSet && stringQuery.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'stringQuery' when calling QueryApi->TestQueryIntegerBooleanString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1098,17 +1138,17 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integerQuery != null) + if (integerQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "integer_query", integerQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "integer_query", integerQuery.Value)); } - if (booleanQuery != null) + if (booleanQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "boolean_query", booleanQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "boolean_query", booleanQuery.Value)); } - if (stringQuery != null) + if (stringQuery.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryIntegerBooleanString"; @@ -1137,7 +1177,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestQueryStyleDeepObjectExplodeTrueObject(Pet? queryObject = default(Pet?), int operationIndex = 0) + public string TestQueryStyleDeepObjectExplodeTrueObject(Option queryObject = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject); return localVarResponse.Data; @@ -1150,8 +1190,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(Pet? queryObject = default(Pet?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleDeepObjectExplodeTrueObject"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1174,31 +1218,31 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - if (queryObject.Id != null) + if (queryObject.Value.Id != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Id)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Value.Id)); } - if (queryObject.Name != null) + if (queryObject.Value.Name != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Name)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Value.Name)); } - if (queryObject.Category != null) + if (queryObject.Value.Category != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Category)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Value.Category)); } - if (queryObject.PhotoUrls != null) + if (queryObject.Value.PhotoUrls != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.PhotoUrls)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.Value.PhotoUrls)); } - if (queryObject.Tags != null) + if (queryObject.Value.Tags != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Tags)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Value.Tags)); } - if (queryObject.Status != null) + if (queryObject.Value.Status != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Status)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Value.Status)); } } @@ -1228,7 +1272,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1242,8 +1286,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfoAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleDeepObjectExplodeTrueObject"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1267,31 +1315,31 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - if (queryObject.Id != null) + if (queryObject.Value.Id != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Id)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Value.Id)); } - if (queryObject.Name != null) + if (queryObject.Value.Name != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Name)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Value.Name)); } - if (queryObject.Category != null) + if (queryObject.Value.Category != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Category)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Value.Category)); } - if (queryObject.PhotoUrls != null) + if (queryObject.Value.PhotoUrls != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.PhotoUrls)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.Value.PhotoUrls)); } - if (queryObject.Tags != null) + if (queryObject.Value.Tags != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Tags)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Value.Tags)); } - if (queryObject.Status != null) + if (queryObject.Value.Status != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Status)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Value.Status)); } } @@ -1321,7 +1369,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0) + public string TestQueryStyleDeepObjectExplodeTrueObjectAllOf(Option queryObject = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject); return localVarResponse.Data; @@ -1334,8 +1382,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleDeepObjectExplodeTrueObjectAllOf"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1358,7 +1410,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { } @@ -1388,7 +1440,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAllOfAsync(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAllOfAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1402,8 +1454,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfoAsync(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleDeepObjectExplodeTrueObjectAllOf"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1427,7 +1483,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { } @@ -1457,7 +1513,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestQueryStyleFormExplodeFalseArrayInteger(List? queryObject = default(List?), int operationIndex = 0) + public string TestQueryStyleFormExplodeFalseArrayInteger(Option> queryObject = default(Option>), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(queryObject); return localVarResponse.Data; @@ -1470,8 +1526,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(List? queryObject = default(List?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(Option> queryObject = default(Option>), int operationIndex = 0) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeFalseArrayInteger"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1494,9 +1554,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeFalseArrayInteger"; @@ -1525,7 +1585,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestQueryStyleFormExplodeFalseArrayIntegerAsync(List? queryObject = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryStyleFormExplodeFalseArrayIntegerAsync(Option> queryObject = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1539,8 +1599,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfoAsync(List? queryObject = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfoAsync(Option> queryObject = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeFalseArrayInteger"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1564,9 +1628,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeFalseArrayInteger"; @@ -1595,7 +1659,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestQueryStyleFormExplodeFalseArrayString(List? queryObject = default(List?), int operationIndex = 0) + public string TestQueryStyleFormExplodeFalseArrayString(Option> queryObject = default(Option>), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo(queryObject); return localVarResponse.Data; @@ -1608,8 +1672,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo(List? queryObject = default(List?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo(Option> queryObject = default(Option>), int operationIndex = 0) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeFalseArrayString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1632,9 +1700,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeFalseArrayString"; @@ -1663,7 +1731,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestQueryStyleFormExplodeFalseArrayStringAsync(List? queryObject = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryStyleFormExplodeFalseArrayStringAsync(Option> queryObject = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleFormExplodeFalseArrayStringWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1677,8 +1745,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeFalseArrayStringWithHttpInfoAsync(List? queryObject = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeFalseArrayStringWithHttpInfoAsync(Option> queryObject = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeFalseArrayString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1702,9 +1774,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeFalseArrayString"; @@ -1733,7 +1805,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0) + public string TestQueryStyleFormExplodeTrueArrayString(Option queryObject = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject); return localVarResponse.Data; @@ -1746,8 +1818,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeTrueArrayString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1770,9 +1846,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueArrayString"; @@ -1801,7 +1877,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueArrayStringAsync(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueArrayStringAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleFormExplodeTrueArrayStringWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1815,8 +1891,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueArrayStringWithHttpInfoAsync(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueArrayStringWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeTrueArrayString"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1840,9 +1920,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueArrayString"; @@ -1871,7 +1951,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestQueryStyleFormExplodeTrueObject(Pet? queryObject = default(Pet?), int operationIndex = 0) + public string TestQueryStyleFormExplodeTrueObject(Option queryObject = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject); return localVarResponse.Data; @@ -1884,8 +1964,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeTrueObjectWithHttpInfo(Pet? queryObject = default(Pet?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeTrueObjectWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeTrueObject"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1908,9 +1992,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueObject"; @@ -1939,7 +2023,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleFormExplodeTrueObjectWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1953,8 +2037,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectWithHttpInfoAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeTrueObject"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1978,9 +2066,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueObject"; @@ -2009,7 +2097,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// string - public string TestQueryStyleFormExplodeTrueObjectAllOf(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0) + public string TestQueryStyleFormExplodeTrueObjectAllOf(Option queryObject = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(queryObject); return localVarResponse.Data; @@ -2022,8 +2110,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(Option queryObject = default(Option), int operationIndex = 0) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeTrueObjectAllOf"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2046,9 +2138,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueObjectAllOf"; @@ -2077,7 +2169,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAllOfAsync(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAllOfAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2091,8 +2183,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfoAsync(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfoAsync(Option queryObject = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'queryObject' is set + if (queryObject.IsSet && queryObject.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'queryObject' when calling QueryApi->TestQueryStyleFormExplodeTrueObjectAllOf"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2116,9 +2212,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (queryObject != null) + if (queryObject.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject.Value)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueObjectAllOf"; diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/ApiClient.cs index 1f3056ed28e2..ac810f2126dd 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/ApiClient.cs @@ -31,6 +31,7 @@ using FileIO = System.IO.File; using Polly; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -50,7 +51,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -184,7 +186,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/Option.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..1200ba44bc8e --- /dev/null +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,127 @@ +// +/* + * Echo Server API + * + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + +#nullable enable + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + Type innerType = value?.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType)!; + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Bird.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Bird.cs index e87aec99cc66..69841b4f36c6 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Bird.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Bird.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class Bird : IEquatable, IValidatableObject /// /// size. /// color. - public Bird(string size = default(string), string color = default(string)) + public Bird(Option size = default(Option), Option color = default(Option)) { + // to ensure "size" (not nullable) is not null + if (size.IsSet && size.Value == null) + { + throw new ArgumentNullException("size isn't a nullable property for Bird and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for Bird and cannot be null"); + } this.Size = size; this.Color = color; } @@ -47,13 +58,13 @@ public partial class Bird : IEquatable, IValidatableObject /// Gets or Sets Size /// [DataMember(Name = "size", EmitDefaultValue = false)] - public string Size { get; set; } + public Option Size { get; set; } /// /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Returns the string presentation of the object @@ -101,14 +112,12 @@ public bool Equals(Bird input) } return ( - this.Size == input.Size || - (this.Size != null && - this.Size.Equals(input.Size)) + + this.Size.Equals(input.Size) ) && ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) + + this.Color.Equals(input.Color) ); } @@ -121,13 +130,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Size != null) + if (this.Size.IsSet && this.Size.Value != null) { - hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.Value.GetHashCode(); } - if (this.Color != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Category.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Category.cs index 4c59b1d4f010..c80014c96cc5 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Category.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Category : IEquatable, IValidatableObject /// /// id. /// name. - public Category(long id = default(long), string name = default(string)) + public Category(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); + } this.Id = id; this.Name = name; } @@ -48,14 +54,14 @@ public partial class Category : IEquatable, IValidatableObject /// /// 1 [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// /// Dogs [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -103,13 +109,11 @@ public bool Equals(Category input) } return ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) + + this.Name.Equals(input.Name) ); } @@ -122,10 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DataQuery.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DataQuery.cs index 92ba2761b5c6..63014fc0a1b7 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DataQuery.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DataQuery.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -40,8 +41,23 @@ public partial class DataQuery : Query, IEquatable, IValidatableObjec /// A date. /// Query. /// outcomes. - public DataQuery(string suffix = default(string), string text = default(string), DateTime date = default(DateTime), long id = default(long), List outcomes = default(List)) : base(id, outcomes) + public DataQuery(Option suffix = default(Option), Option text = default(Option), Option date = default(Option), Option id = default(Option), Option> outcomes = default(Option>)) : base(id, outcomes) { + // to ensure "suffix" (not nullable) is not null + if (suffix.IsSet && suffix.Value == null) + { + throw new ArgumentNullException("suffix isn't a nullable property for DataQuery and cannot be null"); + } + // to ensure "text" (not nullable) is not null + if (text.IsSet && text.Value == null) + { + throw new ArgumentNullException("text isn't a nullable property for DataQuery and cannot be null"); + } + // to ensure "date" (not nullable) is not null + if (date.IsSet && date.Value == null) + { + throw new ArgumentNullException("date isn't a nullable property for DataQuery and cannot be null"); + } this.Suffix = suffix; this.Text = text; this.Date = date; @@ -52,7 +68,7 @@ public partial class DataQuery : Query, IEquatable, IValidatableObjec /// /// test suffix [DataMember(Name = "suffix", EmitDefaultValue = false)] - public string Suffix { get; set; } + public Option Suffix { get; set; } /// /// Some text containing white spaces @@ -60,14 +76,14 @@ public partial class DataQuery : Query, IEquatable, IValidatableObjec /// Some text containing white spaces /// Some text [DataMember(Name = "text", EmitDefaultValue = false)] - public string Text { get; set; } + public Option Text { get; set; } /// /// A date /// /// A date [DataMember(Name = "date", EmitDefaultValue = false)] - public DateTime Date { get; set; } + public Option Date { get; set; } /// /// Returns the string presentation of the object @@ -117,19 +133,16 @@ public bool Equals(DataQuery input) } return base.Equals(input) && ( - this.Suffix == input.Suffix || - (this.Suffix != null && - this.Suffix.Equals(input.Suffix)) + + this.Suffix.Equals(input.Suffix) ) && base.Equals(input) && ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) + + this.Text.Equals(input.Text) ) && base.Equals(input) && ( - this.Date == input.Date || - (this.Date != null && - this.Date.Equals(input.Date)) + + this.Date.Equals(input.Date) ); } @@ -142,17 +155,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Suffix != null) + if (this.Suffix.IsSet && this.Suffix.Value != null) { - hashCode = (hashCode * 59) + this.Suffix.GetHashCode(); + hashCode = (hashCode * 59) + this.Suffix.Value.GetHashCode(); } - if (this.Text != null) + if (this.Text.IsSet && this.Text.Value != null) { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); + hashCode = (hashCode * 59) + this.Text.Value.GetHashCode(); } - if (this.Date != null) + if (this.Date.IsSet && this.Date.Value != null) { - hashCode = (hashCode * 59) + this.Date.GetHashCode(); + hashCode = (hashCode * 59) + this.Date.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DefaultValue.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DefaultValue.cs index 3a0530813ead..c8252bbec94a 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DefaultValue.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DefaultValue.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -68,8 +69,33 @@ public enum ArrayStringEnumDefaultEnum /// arrayStringNullable. /// arrayStringExtensionNullable. /// stringNullable. - public DefaultValue(List arrayStringEnumRefDefault = default(List), List arrayStringEnumDefault = default(List), List arrayStringDefault = default(List), List arrayIntegerDefault = default(List), List arrayString = default(List), List arrayStringNullable = default(List), List arrayStringExtensionNullable = default(List), string stringNullable = default(string)) + public DefaultValue(Option> arrayStringEnumRefDefault = default(Option>), Option> arrayStringEnumDefault = default(Option>), Option> arrayStringDefault = default(Option>), Option> arrayIntegerDefault = default(Option>), Option> arrayString = default(Option>), Option?> arrayStringNullable = default(Option?>), Option?> arrayStringExtensionNullable = default(Option?>), Option stringNullable = default(Option)) { + // to ensure "arrayStringEnumRefDefault" (not nullable) is not null + if (arrayStringEnumRefDefault.IsSet && arrayStringEnumRefDefault.Value == null) + { + throw new ArgumentNullException("arrayStringEnumRefDefault isn't a nullable property for DefaultValue and cannot be null"); + } + // to ensure "arrayStringEnumDefault" (not nullable) is not null + if (arrayStringEnumDefault.IsSet && arrayStringEnumDefault.Value == null) + { + throw new ArgumentNullException("arrayStringEnumDefault isn't a nullable property for DefaultValue and cannot be null"); + } + // to ensure "arrayStringDefault" (not nullable) is not null + if (arrayStringDefault.IsSet && arrayStringDefault.Value == null) + { + throw new ArgumentNullException("arrayStringDefault isn't a nullable property for DefaultValue and cannot be null"); + } + // to ensure "arrayIntegerDefault" (not nullable) is not null + if (arrayIntegerDefault.IsSet && arrayIntegerDefault.Value == null) + { + throw new ArgumentNullException("arrayIntegerDefault isn't a nullable property for DefaultValue and cannot be null"); + } + // to ensure "arrayString" (not nullable) is not null + if (arrayString.IsSet && arrayString.Value == null) + { + throw new ArgumentNullException("arrayString isn't a nullable property for DefaultValue and cannot be null"); + } this.ArrayStringEnumRefDefault = arrayStringEnumRefDefault; this.ArrayStringEnumDefault = arrayStringEnumDefault; this.ArrayStringDefault = arrayStringDefault; @@ -84,49 +110,49 @@ public enum ArrayStringEnumDefaultEnum /// Gets or Sets ArrayStringEnumRefDefault /// [DataMember(Name = "array_string_enum_ref_default", EmitDefaultValue = false)] - public List ArrayStringEnumRefDefault { get; set; } + public Option> ArrayStringEnumRefDefault { get; set; } /// /// Gets or Sets ArrayStringEnumDefault /// [DataMember(Name = "array_string_enum_default", EmitDefaultValue = false)] - public List ArrayStringEnumDefault { get; set; } + public Option> ArrayStringEnumDefault { get; set; } /// /// Gets or Sets ArrayStringDefault /// [DataMember(Name = "array_string_default", EmitDefaultValue = false)] - public List ArrayStringDefault { get; set; } + public Option> ArrayStringDefault { get; set; } /// /// Gets or Sets ArrayIntegerDefault /// [DataMember(Name = "array_integer_default", EmitDefaultValue = false)] - public List ArrayIntegerDefault { get; set; } + public Option> ArrayIntegerDefault { get; set; } /// /// Gets or Sets ArrayString /// [DataMember(Name = "array_string", EmitDefaultValue = false)] - public List ArrayString { get; set; } + public Option> ArrayString { get; set; } /// /// Gets or Sets ArrayStringNullable /// [DataMember(Name = "array_string_nullable", EmitDefaultValue = true)] - public List ArrayStringNullable { get; set; } + public Option?> ArrayStringNullable { get; set; } /// /// Gets or Sets ArrayStringExtensionNullable /// [DataMember(Name = "array_string_extension_nullable", EmitDefaultValue = true)] - public List ArrayStringExtensionNullable { get; set; } + public Option?> ArrayStringExtensionNullable { get; set; } /// /// Gets or Sets StringNullable /// [DataMember(Name = "string_nullable", EmitDefaultValue = true)] - public string StringNullable { get; set; } + public Option StringNullable { get; set; } /// /// Returns the string presentation of the object @@ -180,51 +206,50 @@ public bool Equals(DefaultValue input) } return ( - this.ArrayStringEnumRefDefault == input.ArrayStringEnumRefDefault || - this.ArrayStringEnumRefDefault != null && - input.ArrayStringEnumRefDefault != null && - this.ArrayStringEnumRefDefault.SequenceEqual(input.ArrayStringEnumRefDefault) + + this.ArrayStringEnumRefDefault.IsSet && this.ArrayStringEnumRefDefault.Value != null && + input.ArrayStringEnumRefDefault.IsSet && input.ArrayStringEnumRefDefault.Value != null && + this.ArrayStringEnumRefDefault.Value.SequenceEqual(input.ArrayStringEnumRefDefault.Value) ) && ( - this.ArrayStringEnumDefault == input.ArrayStringEnumDefault || - this.ArrayStringEnumDefault != null && - input.ArrayStringEnumDefault != null && - this.ArrayStringEnumDefault.SequenceEqual(input.ArrayStringEnumDefault) + + this.ArrayStringEnumDefault.IsSet && this.ArrayStringEnumDefault.Value != null && + input.ArrayStringEnumDefault.IsSet && input.ArrayStringEnumDefault.Value != null && + this.ArrayStringEnumDefault.Value.SequenceEqual(input.ArrayStringEnumDefault.Value) ) && ( - this.ArrayStringDefault == input.ArrayStringDefault || - this.ArrayStringDefault != null && - input.ArrayStringDefault != null && - this.ArrayStringDefault.SequenceEqual(input.ArrayStringDefault) + + this.ArrayStringDefault.IsSet && this.ArrayStringDefault.Value != null && + input.ArrayStringDefault.IsSet && input.ArrayStringDefault.Value != null && + this.ArrayStringDefault.Value.SequenceEqual(input.ArrayStringDefault.Value) ) && ( - this.ArrayIntegerDefault == input.ArrayIntegerDefault || - this.ArrayIntegerDefault != null && - input.ArrayIntegerDefault != null && - this.ArrayIntegerDefault.SequenceEqual(input.ArrayIntegerDefault) + + this.ArrayIntegerDefault.IsSet && this.ArrayIntegerDefault.Value != null && + input.ArrayIntegerDefault.IsSet && input.ArrayIntegerDefault.Value != null && + this.ArrayIntegerDefault.Value.SequenceEqual(input.ArrayIntegerDefault.Value) ) && ( - this.ArrayString == input.ArrayString || - this.ArrayString != null && - input.ArrayString != null && - this.ArrayString.SequenceEqual(input.ArrayString) + + this.ArrayString.IsSet && this.ArrayString.Value != null && + input.ArrayString.IsSet && input.ArrayString.Value != null && + this.ArrayString.Value.SequenceEqual(input.ArrayString.Value) ) && ( - this.ArrayStringNullable == input.ArrayStringNullable || - this.ArrayStringNullable != null && - input.ArrayStringNullable != null && - this.ArrayStringNullable.SequenceEqual(input.ArrayStringNullable) + + this.ArrayStringNullable.IsSet && this.ArrayStringNullable.Value != null && + input.ArrayStringNullable.IsSet && input.ArrayStringNullable.Value != null && + this.ArrayStringNullable.Value.SequenceEqual(input.ArrayStringNullable.Value) ) && ( - this.ArrayStringExtensionNullable == input.ArrayStringExtensionNullable || - this.ArrayStringExtensionNullable != null && - input.ArrayStringExtensionNullable != null && - this.ArrayStringExtensionNullable.SequenceEqual(input.ArrayStringExtensionNullable) + + this.ArrayStringExtensionNullable.IsSet && this.ArrayStringExtensionNullable.Value != null && + input.ArrayStringExtensionNullable.IsSet && input.ArrayStringExtensionNullable.Value != null && + this.ArrayStringExtensionNullable.Value.SequenceEqual(input.ArrayStringExtensionNullable.Value) ) && ( - this.StringNullable == input.StringNullable || - (this.StringNullable != null && - this.StringNullable.Equals(input.StringNullable)) + + this.StringNullable.Equals(input.StringNullable) ); } @@ -237,37 +262,37 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayStringEnumRefDefault != null) + if (this.ArrayStringEnumRefDefault.IsSet && this.ArrayStringEnumRefDefault.Value != null) { - hashCode = (hashCode * 59) + this.ArrayStringEnumRefDefault.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayStringEnumRefDefault.Value.GetHashCode(); } - if (this.ArrayStringEnumDefault != null) + if (this.ArrayStringEnumDefault.IsSet && this.ArrayStringEnumDefault.Value != null) { - hashCode = (hashCode * 59) + this.ArrayStringEnumDefault.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayStringEnumDefault.Value.GetHashCode(); } - if (this.ArrayStringDefault != null) + if (this.ArrayStringDefault.IsSet && this.ArrayStringDefault.Value != null) { - hashCode = (hashCode * 59) + this.ArrayStringDefault.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayStringDefault.Value.GetHashCode(); } - if (this.ArrayIntegerDefault != null) + if (this.ArrayIntegerDefault.IsSet && this.ArrayIntegerDefault.Value != null) { - hashCode = (hashCode * 59) + this.ArrayIntegerDefault.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayIntegerDefault.Value.GetHashCode(); } - if (this.ArrayString != null) + if (this.ArrayString.IsSet && this.ArrayString.Value != null) { - hashCode = (hashCode * 59) + this.ArrayString.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayString.Value.GetHashCode(); } - if (this.ArrayStringNullable != null) + if (this.ArrayStringNullable.IsSet && this.ArrayStringNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayStringNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayStringNullable.Value.GetHashCode(); } - if (this.ArrayStringExtensionNullable != null) + if (this.ArrayStringExtensionNullable.IsSet && this.ArrayStringExtensionNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayStringExtensionNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayStringExtensionNullable.Value.GetHashCode(); } - if (this.StringNullable != null) + if (this.StringNullable.IsSet && this.StringNullable.Value != null) { - hashCode = (hashCode * 59) + this.StringNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.StringNullable.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs index ccf8e681847c..a352684830ec 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,7 +39,7 @@ public partial class NumberPropertiesOnly : IEquatable, IV /// number. /// varFloat. /// varDouble. - public NumberPropertiesOnly(decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double)) + public NumberPropertiesOnly(Option number = default(Option), Option varFloat = default(Option), Option varDouble = default(Option)) { this.Number = number; this.Float = varFloat; @@ -49,19 +50,19 @@ public partial class NumberPropertiesOnly : IEquatable, IV /// Gets or Sets Number /// [DataMember(Name = "number", EmitDefaultValue = false)] - public decimal Number { get; set; } + public Option Number { get; set; } /// /// Gets or Sets Float /// [DataMember(Name = "float", EmitDefaultValue = false)] - public float Float { get; set; } + public Option Float { get; set; } /// /// Gets or Sets Double /// [DataMember(Name = "double", EmitDefaultValue = false)] - public double Double { get; set; } + public Option Double { get; set; } /// /// Returns the string presentation of the object @@ -110,15 +111,12 @@ public bool Equals(NumberPropertiesOnly input) } return ( - this.Number == input.Number || this.Number.Equals(input.Number) ) && ( - this.Float == input.Float || this.Float.Equals(input.Float) ) && ( - this.Double == input.Double || this.Double.Equals(input.Double) ); } @@ -132,9 +130,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); + if (this.Number.IsSet) + { + hashCode = (hashCode * 59) + this.Number.Value.GetHashCode(); + } + if (this.Float.IsSet) + { + hashCode = (hashCode * 59) + this.Float.Value.GetHashCode(); + } + if (this.Double.IsSet) + { + hashCode = (hashCode * 59) + this.Double.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Pet.cs index e3a45973d8b5..123941d17dc0 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Pet.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -79,22 +80,32 @@ protected Pet() { } /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), string name = default(string), Category category = default(Category), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), string name = default(string), Option category = default(Option), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this.Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this.PhotoUrls = photoUrls; this.Id = id; + this.Name = name; this.Category = category; + this.PhotoUrls = photoUrls; this.Tags = tags; this.Status = status; } @@ -104,7 +115,7 @@ protected Pet() { } /// /// 10 [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name @@ -117,7 +128,7 @@ protected Pet() { } /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category { get; set; } + public Option Category { get; set; } /// /// Gets or Sets PhotoUrls @@ -129,7 +140,7 @@ protected Pet() { } /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags { get; set; } + public Option> Tags { get; set; } /// /// Returns the string presentation of the object @@ -181,7 +192,6 @@ public bool Equals(Pet input) } return ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( @@ -190,24 +200,22 @@ public bool Equals(Pet input) this.Name.Equals(input.Name)) ) && ( - this.Category == input.Category || - (this.Category != null && - this.Category.Equals(input.Category)) + + this.Category.Equals(input.Category) ) && ( - this.PhotoUrls == input.PhotoUrls || + this.PhotoUrls == input.PhotoUrls || this.PhotoUrls != null && input.PhotoUrls != null && this.PhotoUrls.SequenceEqual(input.PhotoUrls) ) && ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) + + this.Tags.IsSet && this.Tags.Value != null && + input.Tags.IsSet && input.Tags.Value != null && + this.Tags.Value.SequenceEqual(input.Tags.Value) ) && ( - this.Status == input.Status || this.Status.Equals(input.Status) ); } @@ -221,24 +229,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); } - if (this.Category != null) + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.PhotoUrls != null) { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); return hashCode; } } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Query.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Query.cs index 0ff925611a5b..95ef01233e10 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Query.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Query.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,8 +63,13 @@ public enum OutcomesEnum /// /// Query. /// outcomes. - public Query(long id = default(long), List outcomes = default(List)) + public Query(Option id = default(Option), Option> outcomes = default(Option>)) { + // to ensure "outcomes" (not nullable) is not null + if (outcomes.IsSet && outcomes.Value == null) + { + throw new ArgumentNullException("outcomes isn't a nullable property for Query and cannot be null"); + } this.Id = id; this.Outcomes = outcomes; } @@ -73,13 +79,13 @@ public enum OutcomesEnum /// /// Query [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Outcomes /// [DataMember(Name = "outcomes", EmitDefaultValue = false)] - public List Outcomes { get; set; } + public Option> Outcomes { get; set; } /// /// Returns the string presentation of the object @@ -127,14 +133,13 @@ public bool Equals(Query input) } return ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( - this.Outcomes == input.Outcomes || - this.Outcomes != null && - input.Outcomes != null && - this.Outcomes.SequenceEqual(input.Outcomes) + + this.Outcomes.IsSet && this.Outcomes.Value != null && + input.Outcomes.IsSet && input.Outcomes.Value != null && + this.Outcomes.Value.SequenceEqual(input.Outcomes.Value) ); } @@ -147,10 +152,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Outcomes != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Outcomes.IsSet && this.Outcomes.Value != null) { - hashCode = (hashCode * 59) + this.Outcomes.GetHashCode(); + hashCode = (hashCode * 59) + this.Outcomes.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/StringEnumRef.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/StringEnumRef.cs index 47142c2bf31f..6ddf14051fc9 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/StringEnumRef.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/StringEnumRef.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Tag.cs index 66eab762090b..854d42511554 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Tag.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Tag : IEquatable, IValidatableObject /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this.Id = id; this.Name = name; } @@ -47,13 +53,13 @@ public partial class Tag : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -101,13 +107,11 @@ public bool Equals(Tag input) } return ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) + + this.Name.Equals(input.Name) ); } @@ -120,10 +124,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestFormObjectMultipartRequestMarker.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestFormObjectMultipartRequestMarker.cs index d38d85da5203..3e7afe6f7fad 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestFormObjectMultipartRequestMarker.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestFormObjectMultipartRequestMarker.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestFormObjectMultipartRequestMarker : IEquatable class. /// /// name. - public TestFormObjectMultipartRequestMarker(string name = default(string)) + public TestFormObjectMultipartRequestMarker(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for TestFormObjectMultipartRequestMarker and cannot be null"); + } this.Name = name; } @@ -45,7 +51,7 @@ public partial class TestFormObjectMultipartRequestMarker : IEquatable [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -92,9 +98,8 @@ public bool Equals(TestFormObjectMultipartRequestMarker input) } return ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) + + this.Name.Equals(input.Name) ); } @@ -107,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.cs index 42b8e674635a..52edfd298888 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,23 @@ public partial class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectPa /// color. /// id. /// name. - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(string size = default(string), string color = default(string), long id = default(long), string name = default(string)) + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(Option size = default(Option), Option color = default(Option), Option id = default(Option), Option name = default(Option)) { + // to ensure "size" (not nullable) is not null + if (size.IsSet && size.Value == null) + { + throw new ArgumentNullException("size isn't a nullable property for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter and cannot be null"); + } + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter and cannot be null"); + } this.Size = size; this.Color = color; this.Id = id; @@ -51,27 +67,27 @@ public partial class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectPa /// Gets or Sets Size /// [DataMember(Name = "size", EmitDefaultValue = false)] - public string Size { get; set; } + public Option Size { get; set; } /// /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Gets or Sets Id /// /// 1 [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// /// Dogs [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -121,23 +137,19 @@ public bool Equals(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectPara } return ( - this.Size == input.Size || - (this.Size != null && - this.Size.Equals(input.Size)) + + this.Size.Equals(input.Size) ) && ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) + + this.Color.Equals(input.Color) ) && ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) + + this.Name.Equals(input.Name) ); } @@ -150,18 +162,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Size != null) + if (this.Size.IsSet && this.Size.Value != null) + { + hashCode = (hashCode * 59) + this.Size.Value.GetHashCode(); + } + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } - if (this.Color != null) + if (this.Id.IsSet) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.cs index a6cad9859cf1..36561a9f9449 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.cs @@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParamete /// Initializes a new instance of the class. /// /// values. - public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(List values = default(List)) + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(Option> values = default(Option>)) { + // to ensure "values" (not nullable) is not null + if (values.IsSet && values.Value == null) + { + throw new ArgumentNullException("values isn't a nullable property for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter and cannot be null"); + } this.Values = values; } @@ -45,7 +51,7 @@ public partial class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParamete /// Gets or Sets Values /// [DataMember(Name = "values", EmitDefaultValue = false)] - public List Values { get; set; } + public Option> Values { get; set; } /// /// Returns the string presentation of the object @@ -92,10 +98,10 @@ public bool Equals(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter } return ( - this.Values == input.Values || - this.Values != null && - input.Values != null && - this.Values.SequenceEqual(input.Values) + + this.Values.IsSet && this.Values.Value != null && + input.Values.IsSet && input.Values.Value != null && + this.Values.Value.SequenceEqual(input.Values.Value) ); } @@ -108,9 +114,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Values != null) + if (this.Values.IsSet && this.Values.Value != null) { - hashCode = (hashCode * 59) + this.Values.GetHashCode(); + hashCode = (hashCode * 59) + this.Values.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/others/csharp-complex-files/.openapi-generator/FILES b/samples/client/others/csharp-complex-files/.openapi-generator/FILES index fb5f0b603c31..462bbf4a7f4d 100644 --- a/samples/client/others/csharp-complex-files/.openapi-generator/FILES +++ b/samples/client/others/csharp-complex-files/.openapi-generator/FILES @@ -26,6 +26,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs index cdb39df52075..af1e761647dc 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs @@ -36,7 +36,7 @@ public interface IMultipartApiSync : IApiAccessor /// Many files (optional) /// Index associated with the operation. /// - void MultipartArray(List files = default(List), int operationIndex = 0); + void MultipartArray(Option> files = default(Option>), int operationIndex = 0); /// /// @@ -48,7 +48,7 @@ public interface IMultipartApiSync : IApiAccessor /// Many files (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse MultipartArrayWithHttpInfo(List files = default(List), int operationIndex = 0); + ApiResponse MultipartArrayWithHttpInfo(Option> files = default(Option>), int operationIndex = 0); /// /// /// @@ -62,7 +62,7 @@ public interface IMultipartApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void MultipartMixed(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = default(MultipartMixedRequestMarker), List statusArray = default(List), int operationIndex = 0); + void MultipartMixed(MultipartMixedStatus status, System.IO.Stream file, Option marker = default(Option), Option> statusArray = default(Option>), int operationIndex = 0); /// /// @@ -77,7 +77,7 @@ public interface IMultipartApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse MultipartMixedWithHttpInfo(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = default(MultipartMixedRequestMarker), List statusArray = default(List), int operationIndex = 0); + ApiResponse MultipartMixedWithHttpInfo(MultipartMixedStatus status, System.IO.Stream file, Option marker = default(Option), Option> statusArray = default(Option>), int operationIndex = 0); /// /// /// @@ -88,7 +88,7 @@ public interface IMultipartApiSync : IApiAccessor /// One file (optional) /// Index associated with the operation. /// - void MultipartSingle(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + void MultipartSingle(Option file = default(Option), int operationIndex = 0); /// /// @@ -100,7 +100,7 @@ public interface IMultipartApiSync : IApiAccessor /// One file (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse MultipartSingleWithHttpInfo(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse MultipartSingleWithHttpInfo(Option file = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -121,7 +121,7 @@ public interface IMultipartApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task MultipartArrayAsync(List files = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task MultipartArrayAsync(Option> files = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -134,7 +134,7 @@ public interface IMultipartApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> MultipartArrayWithHttpInfoAsync(List files = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> MultipartArrayWithHttpInfoAsync(Option> files = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -149,7 +149,7 @@ public interface IMultipartApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task MultipartMixedAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = default(MultipartMixedRequestMarker), List statusArray = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task MultipartMixedAsync(MultipartMixedStatus status, System.IO.Stream file, Option marker = default(Option), Option> statusArray = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -165,7 +165,7 @@ public interface IMultipartApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> MultipartMixedWithHttpInfoAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = default(MultipartMixedRequestMarker), List statusArray = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> MultipartMixedWithHttpInfoAsync(MultipartMixedStatus status, System.IO.Stream file, Option marker = default(Option), Option> statusArray = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -177,7 +177,7 @@ public interface IMultipartApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task MultipartSingleAsync(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task MultipartSingleAsync(Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -190,7 +190,7 @@ public interface IMultipartApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> MultipartSingleWithHttpInfoAsync(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> MultipartSingleWithHttpInfoAsync(Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -318,7 +318,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Many files (optional) /// Index associated with the operation. /// - public void MultipartArray(List files = default(List), int operationIndex = 0) + public void MultipartArray(Option> files = default(Option>), int operationIndex = 0) { MultipartArrayWithHttpInfo(files); } @@ -330,8 +330,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Many files (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse MultipartArrayWithHttpInfo(List files = default(List), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse MultipartArrayWithHttpInfo(Option> files = default(Option>), int operationIndex = 0) { + // verify the required parameter 'files' is set + if (files.IsSet && files.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'files' when calling MultipartApi->MultipartArray"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -354,9 +358,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (files != null) + if (files.IsSet) { - foreach (var file in files) + foreach (var file in files.Value) { localVarRequestOptions.FileParameters.Add("files", file); } @@ -388,7 +392,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task MultipartArrayAsync(List files = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task MultipartArrayAsync(Option> files = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await MultipartArrayWithHttpInfoAsync(files, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -401,8 +405,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> MultipartArrayWithHttpInfoAsync(List files = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> MultipartArrayWithHttpInfoAsync(Option> files = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'files' is set + if (files.IsSet && files.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'files' when calling MultipartApi->MultipartArray"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -426,9 +434,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (files != null) + if (files.IsSet) { - foreach (var file in files) + foreach (var file in files.Value) { localVarRequestOptions.FileParameters.Add("files", file); } @@ -463,7 +471,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// - public void MultipartMixed(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = default(MultipartMixedRequestMarker), List statusArray = default(List), int operationIndex = 0) + public void MultipartMixed(MultipartMixedStatus status, System.IO.Stream file, Option marker = default(Option), Option> statusArray = default(Option>), int operationIndex = 0) { MultipartMixedWithHttpInfo(status, file, marker, statusArray); } @@ -478,13 +486,19 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse MultipartMixedWithHttpInfo(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = default(MultipartMixedRequestMarker), List statusArray = default(List), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse MultipartMixedWithHttpInfo(MultipartMixedStatus status, System.IO.Stream file, Option marker = default(Option), Option> statusArray = default(Option>), int operationIndex = 0) { // verify the required parameter 'file' is set if (file == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'file' when calling MultipartApi->MultipartMixed"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling MultipartApi->MultipartMixed"); + + // verify the required parameter 'marker' is set + if (marker.IsSet && marker.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'marker' when calling MultipartApi->MultipartMixed"); + + // verify the required parameter 'statusArray' is set + if (statusArray.IsSet && statusArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'statusArray' when calling MultipartApi->MultipartMixed"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -509,14 +523,14 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory } localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter - if (marker != null) + if (marker.IsSet) { - localVarRequestOptions.FormParameters.Add("marker", Org.OpenAPITools.Client.ClientUtils.Serialize(marker)); // form parameter + localVarRequestOptions.FormParameters.Add("marker", Org.OpenAPITools.Client.ClientUtils.Serialize(marker.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("file", file); - if (statusArray != null) + if (statusArray.IsSet) { - localVarRequestOptions.FormParameters.Add("statusArray", Org.OpenAPITools.Client.ClientUtils.Serialize(statusArray)); // form parameter + localVarRequestOptions.FormParameters.Add("statusArray", Org.OpenAPITools.Client.ClientUtils.Serialize(statusArray.Value)); // form parameter } localVarRequestOptions.Operation = "MultipartApi.MultipartMixed"; @@ -548,7 +562,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task MultipartMixedAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = default(MultipartMixedRequestMarker), List statusArray = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task MultipartMixedAsync(MultipartMixedStatus status, System.IO.Stream file, Option marker = default(Option), Option> statusArray = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await MultipartMixedWithHttpInfoAsync(status, file, marker, statusArray, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -564,13 +578,19 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> MultipartMixedWithHttpInfoAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = default(MultipartMixedRequestMarker), List statusArray = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> MultipartMixedWithHttpInfoAsync(MultipartMixedStatus status, System.IO.Stream file, Option marker = default(Option), Option> statusArray = default(Option>), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'file' is set if (file == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'file' when calling MultipartApi->MultipartMixed"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling MultipartApi->MultipartMixed"); + + // verify the required parameter 'marker' is set + if (marker.IsSet && marker.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'marker' when calling MultipartApi->MultipartMixed"); + + // verify the required parameter 'statusArray' is set + if (statusArray.IsSet && statusArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'statusArray' when calling MultipartApi->MultipartMixed"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -596,14 +616,14 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory } localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter - if (marker != null) + if (marker.IsSet) { - localVarRequestOptions.FormParameters.Add("marker", Org.OpenAPITools.Client.ClientUtils.Serialize(marker)); // form parameter + localVarRequestOptions.FormParameters.Add("marker", Org.OpenAPITools.Client.ClientUtils.Serialize(marker.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("file", file); - if (statusArray != null) + if (statusArray.IsSet) { - localVarRequestOptions.FormParameters.Add("statusArray", Org.OpenAPITools.Client.ClientUtils.Serialize(statusArray)); // form parameter + localVarRequestOptions.FormParameters.Add("statusArray", Org.OpenAPITools.Client.ClientUtils.Serialize(statusArray.Value)); // form parameter } localVarRequestOptions.Operation = "MultipartApi.MultipartMixed"; @@ -632,7 +652,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// One file (optional) /// Index associated with the operation. /// - public void MultipartSingle(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public void MultipartSingle(Option file = default(Option), int operationIndex = 0) { MultipartSingleWithHttpInfo(file); } @@ -644,8 +664,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// One file (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse MultipartSingleWithHttpInfo(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse MultipartSingleWithHttpInfo(Option file = default(Option), int operationIndex = 0) { + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling MultipartApi->MultipartSingle"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -668,9 +692,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "MultipartApi.MultipartSingle"; @@ -699,7 +723,7 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task MultipartSingleAsync(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task MultipartSingleAsync(Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await MultipartSingleWithHttpInfoAsync(file, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -712,8 +736,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> MultipartSingleWithHttpInfoAsync(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> MultipartSingleWithHttpInfoAsync(Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling MultipartApi->MultipartSingle"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -737,9 +765,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "MultipartApi.MultipartSingle"; diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs index 789c14ac264c..73868472c23b 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs @@ -31,6 +31,7 @@ using FileIO = System.IO.File; using Polly; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -50,7 +51,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -184,7 +186,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/Option.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..e63322a5adca --- /dev/null +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,124 @@ +// +/* + * MultipartFile test + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + Type innerType = value.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartArrayRequest.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartArrayRequest.cs index a9568625dbce..05cd0feb87b6 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartArrayRequest.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartArrayRequest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MultipartArrayRequest : IEquatable, /// Initializes a new instance of the class. /// /// Many files. - public MultipartArrayRequest(List files = default(List)) + public MultipartArrayRequest(Option> files = default(Option>)) { + // to ensure "files" (not nullable) is not null + if (files.IsSet && files.Value == null) + { + throw new ArgumentNullException("files isn't a nullable property for MultipartArrayRequest and cannot be null"); + } this.Files = files; } @@ -46,7 +52,7 @@ public partial class MultipartArrayRequest : IEquatable, /// /// Many files [DataMember(Name = "files", EmitDefaultValue = false)] - public List Files { get; set; } + public Option> Files { get; set; } /// /// Returns the string presentation of the object @@ -99,9 +105,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Files != null) + if (this.Files.IsSet && this.Files.Value != null) { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); + hashCode = (hashCode * 59) + this.Files.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequest.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequest.cs index 5c75594cab70..501e342c69a6 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequest.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -50,16 +51,26 @@ protected MultipartMixedRequest() { } /// marker. /// a file (required). /// statusArray. - public MultipartMixedRequest(MultipartMixedStatus status = default(MultipartMixedStatus), MultipartMixedRequestMarker marker = default(MultipartMixedRequestMarker), System.IO.Stream file = default(System.IO.Stream), List statusArray = default(List)) + public MultipartMixedRequest(MultipartMixedStatus status = default(MultipartMixedStatus), Option marker = default(Option), System.IO.Stream file = default(System.IO.Stream), Option> statusArray = default(Option>)) { - this.Status = status; - // to ensure "file" is required (not null) + // to ensure "marker" (not nullable) is not null + if (marker.IsSet && marker.Value == null) + { + throw new ArgumentNullException("marker isn't a nullable property for MultipartMixedRequest and cannot be null"); + } + // to ensure "file" (not nullable) is not null if (file == null) { - throw new ArgumentNullException("file is a required property for MultipartMixedRequest and cannot be null"); + throw new ArgumentNullException("file isn't a nullable property for MultipartMixedRequest and cannot be null"); } - this.File = file; + // to ensure "statusArray" (not nullable) is not null + if (statusArray.IsSet && statusArray.Value == null) + { + throw new ArgumentNullException("statusArray isn't a nullable property for MultipartMixedRequest and cannot be null"); + } + this.Status = status; this.Marker = marker; + this.File = file; this.StatusArray = statusArray; } @@ -67,7 +78,7 @@ protected MultipartMixedRequest() { } /// Gets or Sets Marker /// [DataMember(Name = "marker", EmitDefaultValue = false)] - public MultipartMixedRequestMarker Marker { get; set; } + public Option Marker { get; set; } /// /// a file @@ -80,7 +91,7 @@ protected MultipartMixedRequest() { } /// Gets or Sets StatusArray /// [DataMember(Name = "statusArray", EmitDefaultValue = false)] - public List StatusArray { get; set; } + public Option> StatusArray { get; set; } /// /// Returns the string presentation of the object @@ -137,17 +148,17 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Marker != null) + if (this.Marker.IsSet && this.Marker.Value != null) { - hashCode = (hashCode * 59) + this.Marker.GetHashCode(); + hashCode = (hashCode * 59) + this.Marker.Value.GetHashCode(); } if (this.File != null) { hashCode = (hashCode * 59) + this.File.GetHashCode(); } - if (this.StatusArray != null) + if (this.StatusArray.IsSet && this.StatusArray.Value != null) { - hashCode = (hashCode * 59) + this.StatusArray.GetHashCode(); + hashCode = (hashCode * 59) + this.StatusArray.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequestMarker.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequestMarker.cs index 22c4d970da17..b766a497609b 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequestMarker.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequestMarker.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MultipartMixedRequestMarker : IEquatable class. /// /// name. - public MultipartMixedRequestMarker(string name = default(string)) + public MultipartMixedRequestMarker(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for MultipartMixedRequestMarker and cannot be null"); + } this.Name = name; } @@ -45,7 +51,7 @@ public partial class MultipartMixedRequestMarker : IEquatable [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedStatus.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedStatus.cs index 6f6e1c1faaee..5756d52b0007 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedStatus.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedStatus.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartSingleRequest.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartSingleRequest.cs index f3922222c8de..3621bdbaa41d 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartSingleRequest.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartSingleRequest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MultipartSingleRequest : IEquatable /// Initializes a new instance of the class. /// /// One file. - public MultipartSingleRequest(System.IO.Stream file = default(System.IO.Stream)) + public MultipartSingleRequest(Option file = default(Option)) { + // to ensure "file" (not nullable) is not null + if (file.IsSet && file.Value == null) + { + throw new ArgumentNullException("file isn't a nullable property for MultipartSingleRequest and cannot be null"); + } this.File = file; } @@ -46,7 +52,7 @@ public partial class MultipartSingleRequest : IEquatable /// /// One file [DataMember(Name = "file", EmitDefaultValue = false)] - public System.IO.Stream File { get; set; } + public Option File { get; set; } /// /// Returns the string presentation of the object @@ -99,9 +105,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.File != null) + if (this.File.IsSet && this.File.Value != null) { - hashCode = (hashCode * 59) + this.File.GetHashCode(); + hashCode = (hashCode * 59) + this.File.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/.openapi-generator/FILES index 8ad42be271f2..2e0bc38ad614 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/.openapi-generator/FILES @@ -129,6 +129,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Client/WebRequestPathBuilder.cs diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FakeApi.md index bedc98a6492a..d0443f10572c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FakeApi.md @@ -115,7 +115,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool? body = null) +> bool FakeOuterBooleanSerialize (bool body = null) @@ -142,7 +142,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var body = true; // bool? | Input boolean as post body (optional) + var body = true; // bool | Input boolean as post body (optional) try { @@ -183,7 +183,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **bool?** | Input boolean as post body | [optional] | +| **body** | **bool** | Input boolean as post body | [optional] | ### Return type @@ -301,7 +301,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal? body = null) +> decimal FakeOuterNumberSerialize (decimal body = null) @@ -328,7 +328,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var body = 8.14D; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal | Input number as post body (optional) try { @@ -369,7 +369,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **decimal?** | Input number as post body | [optional] | +| **body** | **decimal** | Input number as post body | [optional] | ### Return type @@ -1115,7 +1115,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string varString = null, FileParameter binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, FileParameter binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1150,14 +1150,14 @@ namespace Example var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789L; // long? | None (optional) - var varFloat = 3.4F; // float? | None (optional) + var integer = 56; // int | None (optional) + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var varFloat = 3.4F; // float | None (optional) var varString = "varString_example"; // string | None (optional) var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) @@ -1202,14 +1202,14 @@ catch (ApiException e) | **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int?** | None | [optional] | -| **int32** | **int?** | None | [optional] | -| **int64** | **long?** | None | [optional] | -| **varFloat** | **float?** | None | [optional] | +| **integer** | **int** | None | [optional] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **varFloat** | **float** | None | [optional] | | **varString** | **string** | None | [optional] | | **binary** | **FileParameter****FileParameter** | None | [optional] | -| **date** | **DateTime?** | None | [optional] | -| **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **date** | **DateTime** | None | [optional] | +| **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | | **password** | **string** | None | [optional] | | **callback** | **string** | None | [optional] | @@ -1237,7 +1237,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -1268,8 +1268,8 @@ namespace Example var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -1314,8 +1314,8 @@ catch (ApiException e) | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | -| **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | | **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | @@ -1343,7 +1343,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) Fake endpoint to test group parameters (optional) @@ -1376,9 +1376,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789L; // long? | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) + var booleanGroup = true; // bool | Boolean in group parameters (optional) + var int64Group = 789L; // long | Integer in group parameters (optional) try { @@ -1420,9 +1420,9 @@ catch (ApiException e) | **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | -| **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | -| **int64Group** | **long?** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | +| **booleanGroup** | **bool** | Boolean in group parameters | [optional] | +| **int64Group** | **long** | Integer in group parameters | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/RequiredClass.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/RequiredClass.md index 07b6f018f6c1..3400459756d2 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/RequiredClass.md +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/RequiredClass.md @@ -33,8 +33,8 @@ Name | Type | Description | Notes **NotrequiredNullableEnumIntegerOnly** | **int?** | | [optional] **NotrequiredNotnullableEnumIntegerOnly** | **int** | | [optional] **RequiredNotnullableEnumString** | **string** | | -**RequiredNullableEnumString** | **string** | | -**NotrequiredNullableEnumString** | **string** | | [optional] +**RequiredNullableEnumString** | **string?** | | +**NotrequiredNullableEnumString** | **string?** | | [optional] **NotrequiredNotnullableEnumString** | **string** | | [optional] **RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | **RequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 835d54e1263f..06caf0073e69 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -315,7 +315,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -373,7 +373,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs index b7a030d45d3e..2cd3e76140d2 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -563,7 +563,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -619,7 +619,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index 93f2fed80098..f340fb329304 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -52,7 +52,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?)); + bool FakeOuterBooleanSerialize(Option body = default(Option)); /// /// @@ -63,7 +63,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option)); /// /// /// @@ -73,7 +73,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)); + OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option)); /// /// @@ -84,7 +84,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option)); /// /// /// @@ -94,7 +94,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)); + decimal FakeOuterNumberSerialize(Option body = default(Option)); /// /// @@ -105,7 +105,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option)); /// /// /// @@ -116,7 +116,7 @@ public interface IFakeApiSync : IApiAccessor /// Required UUID String /// Input string as post body (optional) /// string - string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string)); + string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option)); /// /// @@ -128,7 +128,7 @@ public interface IFakeApiSync : IApiAccessor /// Required UUID String /// Input string as post body (optional) /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string)); + ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option)); /// /// Array of Enums /// @@ -279,7 +279,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// None (optional) /// - void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), FileParameter binary = default(FileParameter), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -303,7 +303,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), FileParameter binary = default(FileParameter), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)); /// /// To test enum parameters /// @@ -320,7 +320,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)); /// /// To test enum parameters @@ -338,7 +338,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)); /// /// Fake endpoint to test group parameters (optional) /// @@ -353,7 +353,7 @@ public interface IFakeApiSync : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)); /// /// Fake endpoint to test group parameters (optional) @@ -369,7 +369,7 @@ public interface IFakeApiSync : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)); /// /// test inline additionalProperties /// @@ -443,7 +443,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// (optional) /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string)); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)); /// /// @@ -462,7 +462,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// (optional) /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string)); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)); /// /// test referenced string map /// @@ -521,7 +521,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -533,7 +533,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -544,7 +544,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -556,7 +556,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -567,7 +567,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -579,7 +579,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -591,7 +591,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -604,7 +604,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -785,7 +785,7 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), FileParameter binary = default(FileParameter), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -810,7 +810,7 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), FileParameter binary = default(FileParameter), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -828,7 +828,7 @@ public interface IFakeApiAsync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -847,7 +847,7 @@ public interface IFakeApiAsync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -863,7 +863,7 @@ public interface IFakeApiAsync : IApiAccessor /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -880,7 +880,7 @@ public interface IFakeApiAsync : IApiAccessor /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -970,7 +970,7 @@ public interface IFakeApiAsync : IApiAccessor /// (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -990,7 +990,7 @@ public interface IFakeApiAsync : IApiAccessor /// (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test referenced string map /// @@ -1334,7 +1334,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?)) + public bool FakeOuterBooleanSerialize(Option body = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1346,7 +1346,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1387,7 +1387,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1400,7 +1400,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1443,7 +1443,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)) + public OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1455,8 +1455,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1496,7 +1500,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1509,8 +1513,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1552,7 +1560,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)) + public decimal FakeOuterNumberSerialize(Option body = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1564,7 +1572,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1605,7 +1613,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1618,7 +1626,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1662,7 +1670,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Required UUID String /// Input string as post body (optional) /// string - public string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string)) + public string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, body); return localVarResponse.Data; @@ -1675,8 +1683,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Required UUID String /// Input string as post body (optional) /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1718,7 +1734,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(requiredStringUuid, body, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1732,8 +1748,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2094,7 +2118,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2150,7 +2174,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2207,7 +2231,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2263,7 +2287,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2322,11 +2346,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2385,11 +2409,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2448,7 +2472,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2506,7 +2530,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2562,7 +2586,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// None (optional) /// - public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), FileParameter binary = default(FileParameter), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) { TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); } @@ -2586,15 +2610,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), FileParameter binary = default(FileParameter), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2612,49 +2660,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } // authentication (http_basic_test) required @@ -2696,7 +2744,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), FileParameter binary = default(FileParameter), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEndpointParametersWithHttpInfoAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); } @@ -2721,15 +2769,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), FileParameter binary = default(FileParameter), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2749,49 +2821,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } // authentication (http_basic_test) required @@ -2827,7 +2899,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2845,8 +2917,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2863,37 +2959,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } @@ -2923,7 +3019,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); } @@ -2942,8 +3038,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2962,37 +3082,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } @@ -3020,7 +3140,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -3036,7 +3156,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3055,18 +3175,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } // authentication (bearer_test) required @@ -3100,7 +3220,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); } @@ -3117,7 +3237,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3138,18 +3258,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } // authentication (bearer_test) required @@ -3193,7 +3313,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3249,7 +3369,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3306,7 +3426,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3362,7 +3482,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3421,11 +3541,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3484,11 +3604,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3539,7 +3659,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// (optional) /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string)) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } @@ -3558,35 +3678,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) { // verify the required parameter 'pipe' is set if (pipe == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3610,13 +3738,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } @@ -3647,7 +3775,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); } @@ -3667,35 +3795,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3721,13 +3857,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } @@ -3765,7 +3901,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3821,7 +3957,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 273c48438072..9552d858586f 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -315,7 +315,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -378,7 +378,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs index 2d6e56f65c73..fc8c15b6a09b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs @@ -52,7 +52,7 @@ public interface IPetApiSync : IApiAccessor /// Pet id to delete /// (optional) /// - void DeletePet(long petId, string apiKey = default(string)); + void DeletePet(long petId, Option apiKey = default(Option)); /// /// Deletes a pet @@ -64,7 +64,7 @@ public interface IPetApiSync : IApiAccessor /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)); + ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option)); /// /// Finds Pets by status /// @@ -156,7 +156,7 @@ public interface IPetApiSync : IApiAccessor /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)); + void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option)); /// /// Updates a pet in the store with form data @@ -169,7 +169,7 @@ public interface IPetApiSync : IApiAccessor /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option)); /// /// uploads an image /// @@ -178,7 +178,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), FileParameter file = default(FileParameter)); + ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option)); /// /// uploads an image @@ -191,7 +191,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), FileParameter file = default(FileParameter)); + ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option)); /// /// uploads an image (required) /// @@ -200,7 +200,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, FileParameter requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFile(long petId, FileParameter requiredFile, Option additionalMetadata = default(Option)); /// /// uploads an image (required) @@ -213,7 +213,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, FileParameter requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, FileParameter requiredFile, Option additionalMetadata = default(Option)); #endregion Synchronous Operations } @@ -257,7 +257,7 @@ public interface IPetApiAsync : IApiAccessor /// (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -270,7 +270,7 @@ public interface IPetApiAsync : IApiAccessor /// (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -377,7 +377,7 @@ public interface IPetApiAsync : IApiAccessor /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -391,7 +391,7 @@ public interface IPetApiAsync : IApiAccessor /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -404,7 +404,7 @@ public interface IPetApiAsync : IApiAccessor /// file to upload (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), FileParameter file = default(FileParameter), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -418,7 +418,7 @@ public interface IPetApiAsync : IApiAccessor /// file to upload (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), FileParameter file = default(FileParameter), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -431,7 +431,7 @@ public interface IPetApiAsync : IApiAccessor /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, FileParameter requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, FileParameter requiredFile, Option additionalMetadata = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -445,7 +445,7 @@ public interface IPetApiAsync : IApiAccessor /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, FileParameter requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, FileParameter requiredFile, Option additionalMetadata = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -680,7 +680,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) { // verify the required parameter 'pet' is set if (pet == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -759,7 +759,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) { // verify the required parameter 'pet' is set if (pet == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -825,7 +825,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Pet id to delete /// (optional) /// - public void DeletePet(long petId, string apiKey = default(string)) + public void DeletePet(long petId, Option apiKey = default(Option)) { DeletePetWithHttpInfo(petId, apiKey); } @@ -837,8 +837,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -855,9 +859,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } // authentication (petstore_auth) required @@ -887,7 +891,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); } @@ -900,8 +904,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -920,9 +928,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } // authentication (petstore_auth) required @@ -967,7 +975,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1047,7 +1055,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1130,7 +1138,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1212,7 +1220,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1421,7 +1429,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1500,7 +1508,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1567,7 +1575,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)) + public void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option)) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1580,8 +1588,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1599,13 +1615,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } // authentication (petstore_auth) required @@ -1636,7 +1652,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); } @@ -1650,8 +1666,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1671,13 +1695,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } // authentication (petstore_auth) required @@ -1708,7 +1732,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), FileParameter file = default(FileParameter)) + public ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1722,8 +1746,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), FileParameter file = default(FileParameter)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1742,13 +1774,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } // authentication (petstore_auth) required @@ -1779,7 +1811,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), FileParameter file = default(FileParameter), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1794,8 +1826,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), FileParameter file = default(FileParameter), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1816,13 +1856,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } // authentication (petstore_auth) required @@ -1853,7 +1893,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, FileParameter requiredFile, string additionalMetadata = default(string)) + public ApiResponse UploadFileWithRequiredFile(long petId, FileParameter requiredFile, Option additionalMetadata = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1867,11 +1907,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, FileParameter requiredFile, string additionalMetadata = default(string)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, FileParameter requiredFile, Option additionalMetadata = default(Option)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1892,9 +1936,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); @@ -1926,7 +1970,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, FileParameter requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, FileParameter requiredFile, Option additionalMetadata = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1941,11 +1985,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, FileParameter requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, FileParameter requiredFile, Option additionalMetadata = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1968,9 +2016,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs index c3378fb12aa2..46a1b174a340 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -439,7 +439,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -494,7 +494,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -771,7 +771,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -830,7 +830,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index 23a0e72b3a79..2940d7bf05e7 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -611,7 +611,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -667,7 +667,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -724,7 +724,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -780,7 +780,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -837,7 +837,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -893,7 +893,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -950,7 +950,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1005,7 +1005,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1062,7 +1062,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1120,7 +1120,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1181,11 +1181,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1246,11 +1246,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1408,11 +1408,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1471,11 +1471,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 8ab66c3d5f69..1b8422ea2bbf 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -28,6 +28,7 @@ using System.Net.Http; using System.Net.Http.Headers; using Polly; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -48,7 +49,8 @@ internal class CustomJsonCodec { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -214,7 +216,8 @@ public partial class ApiClient : IDisposable, ISynchronousClient, IAsynchronousC { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..722d06c6b323 --- /dev/null +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,124 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + Type innerType = value.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs index b56f68815057..21e1a3edeca3 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class Activity : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// activityOutputs. - public Activity(Dictionary> activityOutputs = default(Dictionary>)) + public Activity(Option>> activityOutputs = default(Option>>)) { + // to ensure "activityOutputs" (not nullable) is not null + if (activityOutputs.IsSet && activityOutputs.Value == null) + { + throw new ArgumentNullException("activityOutputs isn't a nullable property for Activity and cannot be null"); + } this.ActivityOutputs = activityOutputs; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class Activity : IEquatable, IValidatableObject /// Gets or Sets ActivityOutputs /// [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] - public Dictionary> ActivityOutputs { get; set; } + public Option>> ActivityOutputs { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActivityOutputs != null) + if (this.ActivityOutputs.IsSet && this.ActivityOutputs.Value != null) { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); + hashCode = (hashCode * 59) + this.ActivityOutputs.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index cf1bbf23cea8..2a44c55ee101 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -38,8 +39,18 @@ public partial class ActivityOutputElementRepresentation : IEquatable /// prop1. /// prop2. - public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + public ActivityOutputElementRepresentation(Option prop1 = default(Option), Option prop2 = default(Option)) { + // to ensure "prop1" (not nullable) is not null + if (prop1.IsSet && prop1.Value == null) + { + throw new ArgumentNullException("prop1 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } + // to ensure "prop2" (not nullable) is not null + if (prop2.IsSet && prop2.Value == null) + { + throw new ArgumentNullException("prop2 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } this.Prop1 = prop1; this.Prop2 = prop2; this.AdditionalProperties = new Dictionary(); @@ -49,13 +60,13 @@ public partial class ActivityOutputElementRepresentation : IEquatable [DataMember(Name = "prop1", EmitDefaultValue = false)] - public string Prop1 { get; set; } + public Option Prop1 { get; set; } /// /// Gets or Sets Prop2 /// [DataMember(Name = "prop2", EmitDefaultValue = false)] - public Object Prop2 { get; set; } + public Option Prop2 { get; set; } /// /// Gets or Sets additional properties @@ -116,13 +127,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Prop1 != null) + if (this.Prop1.IsSet && this.Prop1.Value != null) { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop1.Value.GetHashCode(); } - if (this.Prop2 != null) + if (this.Prop2.IsSet && this.Prop2.Value != null) { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop2.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 7db32a24579e..33ee65788e72 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -44,8 +45,43 @@ public partial class AdditionalPropertiesClass : IEquatablemapWithUndeclaredPropertiesAnytype3. /// an object with no declared properties and no undeclared properties, hence it's an empty map.. /// mapWithUndeclaredPropertiesString. - public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) + public AdditionalPropertiesClass(Option> mapProperty = default(Option>), Option>> mapOfMapProperty = default(Option>>), Option anytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype2 = default(Option), Option> mapWithUndeclaredPropertiesAnytype3 = default(Option>), Option emptyMap = default(Option), Option> mapWithUndeclaredPropertiesString = default(Option>)) { + // to ensure "mapProperty" (not nullable) is not null + if (mapProperty.IsSet && mapProperty.Value == null) + { + throw new ArgumentNullException("mapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapOfMapProperty" (not nullable) is not null + if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) + { + throw new ArgumentNullException("mapOfMapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype1" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype2" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype3" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "emptyMap" (not nullable) is not null + if (emptyMap.IsSet && emptyMap.Value == null) + { + throw new ArgumentNullException("emptyMap isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesString" (not nullable) is not null + if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesString isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } this.MapProperty = mapProperty; this.MapOfMapProperty = mapOfMapProperty; this.Anytype1 = anytype1; @@ -61,50 +97,50 @@ public partial class AdditionalPropertiesClass : IEquatable [DataMember(Name = "map_property", EmitDefaultValue = false)] - public Dictionary MapProperty { get; set; } + public Option> MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] - public Dictionary> MapOfMapProperty { get; set; } + public Option>> MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// [DataMember(Name = "anytype_1", EmitDefaultValue = true)] - public Object Anytype1 { get; set; } + public Option Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } + public Option> MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. [DataMember(Name = "empty_map", EmitDefaultValue = false)] - public Object EmptyMap { get; set; } + public Option EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesString { get; set; } + public Option> MapWithUndeclaredPropertiesString { get; set; } /// /// Gets or Sets additional properties @@ -171,37 +207,37 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapProperty != null) + if (this.MapProperty.IsSet && this.MapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapProperty.Value.GetHashCode(); } - if (this.MapOfMapProperty != null) + if (this.MapOfMapProperty.IsSet && this.MapOfMapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfMapProperty.Value.GetHashCode(); } - if (this.Anytype1 != null) + if (this.Anytype1.IsSet && this.Anytype1.Value != null) { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.Anytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) + if (this.MapWithUndeclaredPropertiesAnytype1.IsSet && this.MapWithUndeclaredPropertiesAnytype1.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) + if (this.MapWithUndeclaredPropertiesAnytype2.IsSet && this.MapWithUndeclaredPropertiesAnytype2.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) + if (this.MapWithUndeclaredPropertiesAnytype3.IsSet && this.MapWithUndeclaredPropertiesAnytype3.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.Value.GetHashCode(); } - if (this.EmptyMap != null) + if (this.EmptyMap.IsSet && this.EmptyMap.Value != null) { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); + hashCode = (hashCode * 59) + this.EmptyMap.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesString != null) + if (this.MapWithUndeclaredPropertiesString.IsSet && this.MapWithUndeclaredPropertiesString.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 80bf3adb7aa7..70168c265efe 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -50,16 +51,20 @@ protected Animal() /// /// className (required). /// color (default to "red"). - public Animal(string className = default(string), string color = @"red") + public Animal(string className = default(string), Option color = default(Option)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Animal and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for Animal and cannot be null"); } this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? @"red"; + this.Color = color.IsSet ? color : new Option(@"red"); this.AdditionalProperties = new Dictionary(); } @@ -73,7 +78,7 @@ protected Animal() /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Gets or Sets additional properties @@ -138,9 +143,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); } - if (this.Color != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 296753574edc..e4dbe59ef1ce 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -39,8 +40,18 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// code. /// type. /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) + public ApiResponse(Option code = default(Option), Option type = default(Option), Option message = default(Option)) { + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for ApiResponse and cannot be null"); + } + // to ensure "message" (not nullable) is not null + if (message.IsSet && message.Value == null) + { + throw new ArgumentNullException("message isn't a nullable property for ApiResponse and cannot be null"); + } this.Code = code; this.Type = type; this.Message = message; @@ -51,19 +62,19 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// Gets or Sets Code /// [DataMember(Name = "code", EmitDefaultValue = false)] - public int Code { get; set; } + public Option Code { get; set; } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + public Option Type { get; set; } /// /// Gets or Sets Message /// [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } + public Option Message { get; set; } /// /// Gets or Sets additional properties @@ -125,14 +136,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) + if (this.Code.IsSet) + { + hashCode = (hashCode * 59) + this.Code.Value.GetHashCode(); + } + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.Message != null) + if (this.Message.IsSet && this.Message.Value != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this.Message.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 546300d9857d..65628313bda5 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -39,8 +40,23 @@ public partial class Apple : IEquatable, IValidatableObject /// cultivar. /// origin. /// colorCode. - public Apple(string cultivar = default(string), string origin = default(string), string colorCode = default(string)) + public Apple(Option cultivar = default(Option), Option origin = default(Option), Option colorCode = default(Option)) { + // to ensure "cultivar" (not nullable) is not null + if (cultivar.IsSet && cultivar.Value == null) + { + throw new ArgumentNullException("cultivar isn't a nullable property for Apple and cannot be null"); + } + // to ensure "origin" (not nullable) is not null + if (origin.IsSet && origin.Value == null) + { + throw new ArgumentNullException("origin isn't a nullable property for Apple and cannot be null"); + } + // to ensure "colorCode" (not nullable) is not null + if (colorCode.IsSet && colorCode.Value == null) + { + throw new ArgumentNullException("colorCode isn't a nullable property for Apple and cannot be null"); + } this.Cultivar = cultivar; this.Origin = origin; this.ColorCode = colorCode; @@ -51,19 +67,19 @@ public partial class Apple : IEquatable, IValidatableObject /// Gets or Sets Cultivar /// [DataMember(Name = "cultivar", EmitDefaultValue = false)] - public string Cultivar { get; set; } + public Option Cultivar { get; set; } /// /// Gets or Sets Origin /// [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin { get; set; } + public Option Origin { get; set; } /// /// Gets or Sets ColorCode /// [DataMember(Name = "color_code", EmitDefaultValue = false)] - public string ColorCode { get; set; } + public Option ColorCode { get; set; } /// /// Gets or Sets additional properties @@ -125,17 +141,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Cultivar != null) + if (this.Cultivar.IsSet && this.Cultivar.Value != null) { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); + hashCode = (hashCode * 59) + this.Cultivar.Value.GetHashCode(); } - if (this.Origin != null) + if (this.Origin.IsSet && this.Origin.Value != null) { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); + hashCode = (hashCode * 59) + this.Origin.Value.GetHashCode(); } - if (this.ColorCode != null) + if (this.ColorCode.IsSet && this.ColorCode.Value != null) { - hashCode = (hashCode * 59) + this.ColorCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorCode.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index 85ba742ea8ed..7beec9499e2b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -43,12 +44,12 @@ protected AppleReq() { } /// /// cultivar (required). /// mealy. - public AppleReq(string cultivar = default(string), bool mealy = default(bool)) + public AppleReq(string cultivar = default(string), Option mealy = default(Option)) { - // to ensure "cultivar" is required (not null) + // to ensure "cultivar" (not nullable) is not null if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); + throw new ArgumentNullException("cultivar isn't a nullable property for AppleReq and cannot be null"); } this.Cultivar = cultivar; this.Mealy = mealy; @@ -64,7 +65,7 @@ protected AppleReq() { } /// Gets or Sets Mealy /// [DataMember(Name = "mealy", EmitDefaultValue = true)] - public bool Mealy { get; set; } + public Option Mealy { get; set; } /// /// Returns the string presentation of the object @@ -122,7 +123,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); + if (this.Mealy.IsSet) + { + hashCode = (hashCode * 59) + this.Mealy.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 158143cec188..d2718b042244 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable class. /// /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + public ArrayOfArrayOfNumberOnly(Option>> arrayArrayNumber = default(Option>>)) { + // to ensure "arrayArrayNumber" (not nullable) is not null + if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) + { + throw new ArgumentNullException("arrayArrayNumber isn't a nullable property for ArrayOfArrayOfNumberOnly and cannot be null"); + } this.ArrayArrayNumber = arrayArrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] - public List> ArrayArrayNumber { get; set; } + public Option>> ArrayArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayArrayNumber != null) + if (this.ArrayArrayNumber.IsSet && this.ArrayArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index a103c5b9f766..a9af5d6b8fc6 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Initializes a new instance of the class. /// /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) + public ArrayOfNumberOnly(Option> arrayNumber = default(Option>)) { + // to ensure "arrayNumber" (not nullable) is not null + if (arrayNumber.IsSet && arrayNumber.Value == null) + { + throw new ArgumentNullException("arrayNumber isn't a nullable property for ArrayOfNumberOnly and cannot be null"); + } this.ArrayNumber = arrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Gets or Sets ArrayNumber /// [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] - public List ArrayNumber { get; set; } + public Option> ArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayNumber != null) + if (this.ArrayNumber.IsSet && this.ArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 521f6e10d68d..00ca1c89ba2c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -39,8 +40,23 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// arrayOfString. /// arrayArrayOfInteger. /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + public ArrayTest(Option> arrayOfString = default(Option>), Option>> arrayArrayOfInteger = default(Option>>), Option>> arrayArrayOfModel = default(Option>>)) { + // to ensure "arrayOfString" (not nullable) is not null + if (arrayOfString.IsSet && arrayOfString.Value == null) + { + throw new ArgumentNullException("arrayOfString isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfInteger" (not nullable) is not null + if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) + { + throw new ArgumentNullException("arrayArrayOfInteger isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfModel" (not nullable) is not null + if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) + { + throw new ArgumentNullException("arrayArrayOfModel isn't a nullable property for ArrayTest and cannot be null"); + } this.ArrayOfString = arrayOfString; this.ArrayArrayOfInteger = arrayArrayOfInteger; this.ArrayArrayOfModel = arrayArrayOfModel; @@ -51,19 +67,19 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// Gets or Sets ArrayOfString /// [DataMember(Name = "array_of_string", EmitDefaultValue = false)] - public List ArrayOfString { get; set; } + public Option> ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] - public List> ArrayArrayOfInteger { get; set; } + public Option>> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] - public List> ArrayArrayOfModel { get; set; } + public Option>> ArrayArrayOfModel { get; set; } /// /// Gets or Sets additional properties @@ -125,17 +141,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayOfString != null) + if (this.ArrayOfString.IsSet && this.ArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayOfString.Value.GetHashCode(); } - if (this.ArrayArrayOfInteger != null) + if (this.ArrayArrayOfInteger.IsSet && this.ArrayArrayOfInteger.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.Value.GetHashCode(); } - if (this.ArrayArrayOfModel != null) + if (this.ArrayArrayOfModel.IsSet && this.ArrayArrayOfModel.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfModel.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 55a7b982dfdf..2c003d0c5da3 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,7 +38,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// lengthCm. - public Banana(decimal lengthCm = default(decimal)) + public Banana(Option lengthCm = default(Option)) { this.LengthCm = lengthCm; this.AdditionalProperties = new Dictionary(); @@ -47,7 +48,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Gets or Sets LengthCm /// [DataMember(Name = "lengthCm", EmitDefaultValue = false)] - public decimal LengthCm { get; set; } + public Option LengthCm { get; set; } /// /// Gets or Sets additional properties @@ -107,7 +108,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); + if (this.LengthCm.IsSet) + { + hashCode = (hashCode * 59) + this.LengthCm.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 7afbe08ac126..9e3512562751 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -43,7 +44,7 @@ protected BananaReq() { } /// /// lengthCm (required). /// sweet. - public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool)) + public BananaReq(decimal lengthCm = default(decimal), Option sweet = default(Option)) { this.LengthCm = lengthCm; this.Sweet = sweet; @@ -59,7 +60,7 @@ protected BananaReq() { } /// Gets or Sets Sweet /// [DataMember(Name = "sweet", EmitDefaultValue = true)] - public bool Sweet { get; set; } + public Option Sweet { get; set; } /// /// Returns the string presentation of the object @@ -114,7 +115,10 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); + if (this.Sweet.IsSet) + { + hashCode = (hashCode * 59) + this.Sweet.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index dd5b5d07b0a3..f330d5f7bf53 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -47,10 +48,10 @@ protected BasquePig() /// className (required). public BasquePig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for BasquePig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 10031dc7568d..6be7cc27e4a0 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -42,8 +43,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// capitalSnake. /// sCAETHFlowPoints. /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) + public Capitalization(Option smallCamel = default(Option), Option capitalCamel = default(Option), Option smallSnake = default(Option), Option capitalSnake = default(Option), Option sCAETHFlowPoints = default(Option), Option aTTNAME = default(Option)) { + // to ensure "smallCamel" (not nullable) is not null + if (smallCamel.IsSet && smallCamel.Value == null) + { + throw new ArgumentNullException("smallCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalCamel" (not nullable) is not null + if (capitalCamel.IsSet && capitalCamel.Value == null) + { + throw new ArgumentNullException("capitalCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "smallSnake" (not nullable) is not null + if (smallSnake.IsSet && smallSnake.Value == null) + { + throw new ArgumentNullException("smallSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalSnake" (not nullable) is not null + if (capitalSnake.IsSet && capitalSnake.Value == null) + { + throw new ArgumentNullException("capitalSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "sCAETHFlowPoints" (not nullable) is not null + if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) + { + throw new ArgumentNullException("sCAETHFlowPoints isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "aTTNAME" (not nullable) is not null + if (aTTNAME.IsSet && aTTNAME.Value == null) + { + throw new ArgumentNullException("aTTNAME isn't a nullable property for Capitalization and cannot be null"); + } this.SmallCamel = smallCamel; this.CapitalCamel = capitalCamel; this.SmallSnake = smallSnake; @@ -57,38 +88,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// Gets or Sets SmallCamel /// [DataMember(Name = "smallCamel", EmitDefaultValue = false)] - public string SmallCamel { get; set; } + public Option SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] - public string CapitalCamel { get; set; } + public Option CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// [DataMember(Name = "small_Snake", EmitDefaultValue = false)] - public string SmallSnake { get; set; } + public Option SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] - public string CapitalSnake { get; set; } + public Option CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] - public string SCAETHFlowPoints { get; set; } + public Option SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] - public string ATT_NAME { get; set; } + public Option ATT_NAME { get; set; } /// /// Gets or Sets additional properties @@ -153,29 +184,29 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SmallCamel != null) + if (this.SmallCamel.IsSet && this.SmallCamel.Value != null) { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallCamel.Value.GetHashCode(); } - if (this.CapitalCamel != null) + if (this.CapitalCamel.IsSet && this.CapitalCamel.Value != null) { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalCamel.Value.GetHashCode(); } - if (this.SmallSnake != null) + if (this.SmallSnake.IsSet && this.SmallSnake.Value != null) { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallSnake.Value.GetHashCode(); } - if (this.CapitalSnake != null) + if (this.CapitalSnake.IsSet && this.CapitalSnake.Value != null) { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalSnake.Value.GetHashCode(); } - if (this.SCAETHFlowPoints != null) + if (this.SCAETHFlowPoints.IsSet && this.SCAETHFlowPoints.Value != null) { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); + hashCode = (hashCode * 59) + this.SCAETHFlowPoints.Value.GetHashCode(); } - if (this.ATT_NAME != null) + if (this.ATT_NAME.IsSet && this.ATT_NAME.Value != null) { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); + hashCode = (hashCode * 59) + this.ATT_NAME.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs index cec47afe1f2a..6419e26ba728 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -49,7 +50,7 @@ protected Cat() /// declawed. /// className (required) (default to "Cat"). /// color (default to "red"). - public Cat(bool declawed = default(bool), string className = @"Cat", string color = @"red") : base(className, color) + public Cat(Option declawed = default(Option), string className = @"Cat", Option color = default(Option)) : base(className, color) { this.Declawed = declawed; this.AdditionalProperties = new Dictionary(); @@ -59,7 +60,7 @@ protected Cat() /// Gets or Sets Declawed /// [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed { get; set; } + public Option Declawed { get; set; } /// /// Gets or Sets additional properties @@ -120,7 +121,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); + if (this.Declawed.IsSet) + { + hashCode = (hashCode * 59) + this.Declawed.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs index 0057441d8857..6ef04a699c7e 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -46,15 +47,15 @@ protected Category() /// /// id. /// name (required) (default to "default-name"). - public Category(long id = default(long), string name = @"default-name") + public Category(Option id = default(Option), string name = @"default-name") { - // to ensure "name" is required (not null) + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); } - this.Name = name; this.Id = id; + this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -62,7 +63,7 @@ protected Category() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name @@ -129,7 +130,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index 96a00c78f2fa..c7e84090ff3a 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -67,10 +68,15 @@ protected ChildCat() /// /// name. /// petType (required) (default to PetTypeEnum.ChildCat). - public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() + public ChildCat(Option name = default(Option), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.PetType = petType; + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for ChildCat and cannot be null"); + } this.Name = name; + this.PetType = petType; this.AdditionalProperties = new Dictionary(); } @@ -78,7 +84,7 @@ protected ChildCat() /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -140,9 +146,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.PetType.GetHashCode(); if (this.AdditionalProperties != null) diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 36b14908818a..8a5ce853467c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClass. - public ClassModel(string varClass = default(string)) + public ClassModel(Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for ClassModel and cannot be null"); + } this.Class = varClass; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Gets or Sets Class /// [DataMember(Name = "_class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Class != null) + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 1cef53d2c8a9..76cf2df6e95c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -48,17 +49,17 @@ protected ComplexQuadrilateral() /// quadrilateralType (required). public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 5a777565eb38..16a54139b77e 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -47,10 +48,10 @@ protected DanishPig() /// className (required). public DanishPig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for DanishPig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 92a3adc8c27b..ece67e39338e 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// dateOnlyProperty. - public DateOnlyClass(DateTime dateOnlyProperty = default(DateTime)) + public DateOnlyClass(Option dateOnlyProperty = default(Option)) { + // to ensure "dateOnlyProperty" (not nullable) is not null + if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) + { + throw new ArgumentNullException("dateOnlyProperty isn't a nullable property for DateOnlyClass and cannot be null"); + } this.DateOnlyProperty = dateOnlyProperty; this.AdditionalProperties = new Dictionary(); } @@ -49,7 +55,7 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Fri Jul 21 00:00:00 UTC 2017 [DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOnlyProperty { get; set; } + public Option DateOnlyProperty { get; set; } /// /// Gets or Sets additional properties @@ -109,9 +115,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.DateOnlyProperty != null) + if (this.DateOnlyProperty.IsSet && this.DateOnlyProperty.Value != null) { - hashCode = (hashCode * 59) + this.DateOnlyProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.DateOnlyProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index e6791fbe07a8..cbe496c6f099 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Initializes a new instance of the class. /// /// name. - public DeprecatedObject(string name = default(string)) + public DeprecatedObject(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for DeprecatedObject and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs index ffd89a5334ec..a5f0743a89cb 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -49,8 +50,13 @@ protected Dog() /// breed. /// className (required) (default to "Dog"). /// color (default to "red"). - public Dog(string breed = default(string), string className = @"Dog", string color = @"red") : base(className, color) + public Dog(Option breed = default(Option), string className = @"Dog", Option color = default(Option)) : base(className, color) { + // to ensure "breed" (not nullable) is not null + if (breed.IsSet && breed.Value == null) + { + throw new ArgumentNullException("breed isn't a nullable property for Dog and cannot be null"); + } this.Breed = breed; this.AdditionalProperties = new Dictionary(); } @@ -59,7 +65,7 @@ protected Dog() /// Gets or Sets Breed /// [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed { get; set; } + public Option Breed { get; set; } /// /// Gets or Sets additional properties @@ -120,9 +126,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) + if (this.Breed.IsSet && this.Breed.Value != null) { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); + hashCode = (hashCode * 59) + this.Breed.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 73b84634c4dd..62e6c1f6c74d 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -40,8 +41,18 @@ public partial class Drawing : IEquatable, IValidatableObject /// shapeOrNull. /// nullableShape. /// shapes. - public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) + public Drawing(Option mainShape = default(Option), Option shapeOrNull = default(Option), Option nullableShape = default(Option), Option> shapes = default(Option>)) { + // to ensure "mainShape" (not nullable) is not null + if (mainShape.IsSet && mainShape.Value == null) + { + throw new ArgumentNullException("mainShape isn't a nullable property for Drawing and cannot be null"); + } + // to ensure "shapes" (not nullable) is not null + if (shapes.IsSet && shapes.Value == null) + { + throw new ArgumentNullException("shapes isn't a nullable property for Drawing and cannot be null"); + } this.MainShape = mainShape; this.ShapeOrNull = shapeOrNull; this.NullableShape = nullableShape; @@ -53,25 +64,25 @@ public partial class Drawing : IEquatable, IValidatableObject /// Gets or Sets MainShape /// [DataMember(Name = "mainShape", EmitDefaultValue = false)] - public Shape MainShape { get; set; } + public Option MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// [DataMember(Name = "shapeOrNull", EmitDefaultValue = true)] - public ShapeOrNull ShapeOrNull { get; set; } + public Option ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// [DataMember(Name = "nullableShape", EmitDefaultValue = true)] - public NullableShape NullableShape { get; set; } + public Option NullableShape { get; set; } /// /// Gets or Sets Shapes /// [DataMember(Name = "shapes", EmitDefaultValue = false)] - public List Shapes { get; set; } + public Option> Shapes { get; set; } /// /// Gets or Sets additional properties @@ -134,21 +145,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MainShape != null) + if (this.MainShape.IsSet && this.MainShape.Value != null) { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); + hashCode = (hashCode * 59) + this.MainShape.Value.GetHashCode(); } - if (this.ShapeOrNull != null) + if (this.ShapeOrNull.IsSet && this.ShapeOrNull.Value != null) { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); + hashCode = (hashCode * 59) + this.ShapeOrNull.Value.GetHashCode(); } - if (this.NullableShape != null) + if (this.NullableShape.IsSet && this.NullableShape.Value != null) { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableShape.Value.GetHashCode(); } - if (this.Shapes != null) + if (this.Shapes.IsSet && this.Shapes.Value != null) { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); + hashCode = (hashCode * 59) + this.Shapes.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index ad688b4d11b4..a6cf91979e14 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -57,7 +58,7 @@ public enum JustSymbolEnum /// Gets or Sets JustSymbol /// [DataMember(Name = "just_symbol", EmitDefaultValue = false)] - public JustSymbolEnum? JustSymbol { get; set; } + public Option JustSymbol { get; set; } /// /// Defines ArrayEnum /// @@ -82,8 +83,13 @@ public enum ArrayEnumEnum /// /// justSymbol. /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) + public EnumArrays(Option justSymbol = default(Option), Option> arrayEnum = default(Option>)) { + // to ensure "arrayEnum" (not nullable) is not null + if (arrayEnum.IsSet && arrayEnum.Value == null) + { + throw new ArgumentNullException("arrayEnum isn't a nullable property for EnumArrays and cannot be null"); + } this.JustSymbol = justSymbol; this.ArrayEnum = arrayEnum; this.AdditionalProperties = new Dictionary(); @@ -93,7 +99,7 @@ public enum ArrayEnumEnum /// Gets or Sets ArrayEnum /// [DataMember(Name = "array_enum", EmitDefaultValue = false)] - public List ArrayEnum { get; set; } + public Option> ArrayEnum { get; set; } /// /// Gets or Sets additional properties @@ -154,10 +160,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) + if (this.JustSymbol.IsSet) + { + hashCode = (hashCode * 59) + this.JustSymbol.Value.GetHashCode(); + } + if (this.ArrayEnum.IsSet && this.ArrayEnum.Value != null) { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayEnum.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs index 0c9ca5950153..c3eb9cf55517 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 3309623635ca..03facbc6e7a8 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -93,7 +94,7 @@ public enum EnumStringEnum /// Gets or Sets EnumString /// [DataMember(Name = "enum_string", EmitDefaultValue = false)] - public EnumStringEnum? EnumString { get; set; } + public Option EnumString { get; set; } /// /// Defines EnumStringRequired /// @@ -176,7 +177,7 @@ public enum EnumIntegerEnum /// Gets or Sets EnumInteger /// [DataMember(Name = "enum_integer", EmitDefaultValue = false)] - public EnumIntegerEnum? EnumInteger { get; set; } + public Option EnumInteger { get; set; } /// /// Defines EnumIntegerOnly /// @@ -198,7 +199,7 @@ public enum EnumIntegerOnlyEnum /// Gets or Sets EnumIntegerOnly /// [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] - public EnumIntegerOnlyEnum? EnumIntegerOnly { get; set; } + public Option EnumIntegerOnly { get; set; } /// /// Defines EnumNumber /// @@ -223,31 +224,31 @@ public enum EnumNumberEnum /// Gets or Sets EnumNumber /// [DataMember(Name = "enum_number", EmitDefaultValue = false)] - public EnumNumberEnum? EnumNumber { get; set; } + public Option EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// [DataMember(Name = "outerEnum", EmitDefaultValue = true)] - public OuterEnum? OuterEnum { get; set; } + public Option OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] - public OuterEnumInteger? OuterEnumInteger { get; set; } + public Option OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } + public Option OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } + public Option OuterEnumIntegerDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -268,10 +269,10 @@ protected EnumTest() /// outerEnumInteger. /// outerEnumDefaultValue. /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumIntegerOnlyEnum? enumIntegerOnly = default(EnumIntegerOnlyEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) + public EnumTest(Option enumString = default(Option), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), Option enumInteger = default(Option), Option enumIntegerOnly = default(Option), Option enumNumber = default(Option), Option outerEnum = default(Option), Option outerEnumInteger = default(Option), Option outerEnumDefaultValue = default(Option), Option outerEnumIntegerDefaultValue = default(Option)) { - this.EnumStringRequired = enumStringRequired; this.EnumString = enumString; + this.EnumStringRequired = enumStringRequired; this.EnumInteger = enumInteger; this.EnumIntegerOnly = enumIntegerOnly; this.EnumNumber = enumNumber; @@ -348,15 +349,39 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); + if (this.EnumString.IsSet) + { + hashCode = (hashCode * 59) + this.EnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); + if (this.EnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.EnumInteger.Value.GetHashCode(); + } + if (this.EnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.EnumIntegerOnly.Value.GetHashCode(); + } + if (this.EnumNumber.IsSet) + { + hashCode = (hashCode * 59) + this.EnumNumber.Value.GetHashCode(); + } + if (this.OuterEnum.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnum.Value.GetHashCode(); + } + if (this.OuterEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumInteger.Value.GetHashCode(); + } + if (this.OuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.OuterEnumIntegerDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 1972d8ba56b9..5832a57daf75 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -48,17 +49,17 @@ protected EquilateralTriangle() /// triangleType (required). public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for EquilateralTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for EquilateralTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs index ca5877d2f8ee..551ef61b5c4d 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class File : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// Test capitalization. - public File(string sourceURI = default(string)) + public File(Option sourceURI = default(Option)) { + // to ensure "sourceURI" (not nullable) is not null + if (sourceURI.IsSet && sourceURI.Value == null) + { + throw new ArgumentNullException("sourceURI isn't a nullable property for File and cannot be null"); + } this.SourceURI = sourceURI; this.AdditionalProperties = new Dictionary(); } @@ -48,7 +54,7 @@ public partial class File : IEquatable, IValidatableObject /// /// Test capitalization [DataMember(Name = "sourceURI", EmitDefaultValue = false)] - public string SourceURI { get; set; } + public Option SourceURI { get; set; } /// /// Gets or Sets additional properties @@ -108,9 +114,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SourceURI != null) + if (this.SourceURI.IsSet && this.SourceURI.Value != null) { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); + hashCode = (hashCode * 59) + this.SourceURI.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 2e37282c600b..4285a0634b0b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -38,8 +39,18 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// /// file. /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) + public FileSchemaTestClass(Option file = default(Option), Option> files = default(Option>)) { + // to ensure "file" (not nullable) is not null + if (file.IsSet && file.Value == null) + { + throw new ArgumentNullException("file isn't a nullable property for FileSchemaTestClass and cannot be null"); + } + // to ensure "files" (not nullable) is not null + if (files.IsSet && files.Value == null) + { + throw new ArgumentNullException("files isn't a nullable property for FileSchemaTestClass and cannot be null"); + } this.File = file; this.Files = files; this.AdditionalProperties = new Dictionary(); @@ -49,13 +60,13 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// Gets or Sets File /// [DataMember(Name = "file", EmitDefaultValue = false)] - public File File { get; set; } + public Option File { get; set; } /// /// Gets or Sets Files /// [DataMember(Name = "files", EmitDefaultValue = false)] - public List Files { get; set; } + public Option> Files { get; set; } /// /// Gets or Sets additional properties @@ -116,13 +127,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.File != null) + if (this.File.IsSet && this.File.Value != null) { - hashCode = (hashCode * 59) + this.File.GetHashCode(); + hashCode = (hashCode * 59) + this.File.Value.GetHashCode(); } - if (this.Files != null) + if (this.Files.IsSet && this.Files.Value != null) { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); + hashCode = (hashCode * 59) + this.Files.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 10c97e7ed29c..be7f7fce20d0 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,10 +38,14 @@ public partial class Foo : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// bar (default to "bar"). - public Foo(string bar = @"bar") + public Foo(Option bar = default(Option)) { - // use default value if no "bar" provided - this.Bar = bar ?? @"bar"; + // to ensure "bar" (not nullable) is not null + if (bar.IsSet && bar.Value == null) + { + throw new ArgumentNullException("bar isn't a nullable property for Foo and cannot be null"); + } + this.Bar = bar.IsSet ? bar : new Option(@"bar"); this.AdditionalProperties = new Dictionary(); } @@ -48,7 +53,7 @@ public Foo(string bar = @"bar") /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; set; } + public Option Bar { get; set; } /// /// Gets or Sets additional properties @@ -108,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 2619543bb533..fa6fb55aee55 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class FooGetDefaultResponse : IEquatable, /// Initializes a new instance of the class. /// /// varString. - public FooGetDefaultResponse(Foo varString = default(Foo)) + public FooGetDefaultResponse(Option varString = default(Option)) { + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FooGetDefaultResponse and cannot be null"); + } this.String = varString; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class FooGetDefaultResponse : IEquatable, /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public Foo String { get; set; } + public Option String { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.String != null) + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 5781be7cf5b4..bd0eaebd4a99 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -63,34 +64,74 @@ protected FormatTest() /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), FileParameter binary = default(FileParameter), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(Option integer = default(Option), Option int32 = default(Option), Option unsignedInteger = default(Option), Option int64 = default(Option), Option unsignedLong = default(Option), decimal number = default(decimal), Option varFloat = default(Option), Option varDouble = default(Option), Option varDecimal = default(Option), Option varString = default(Option), byte[] varByte = default(byte[]), Option binary = default(Option), DateTime date = default(DateTime), Option dateTime = default(Option), Option uuid = default(Option), string password = default(string), Option patternWithDigits = default(Option), Option patternWithDigitsAndDelimiter = default(Option), Option patternWithBackslash = default(Option)) { - this.Number = number; - // to ensure "varByte" is required (not null) + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "varByte" (not nullable) is not null if (varByte == null) { - throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("varByte isn't a nullable property for FormatTest and cannot be null"); } - this.Byte = varByte; - this.Date = date; - // to ensure "password" is required (not null) + // to ensure "binary" (not nullable) is not null + if (binary.IsSet && binary.Value == null) + { + throw new ArgumentNullException("binary isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "date" (not nullable) is not null + if (date == null) + { + throw new ArgumentNullException("date isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "password" (not nullable) is not null if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("password isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigits" (not nullable) is not null + if (patternWithDigits.IsSet && patternWithDigits.Value == null) + { + throw new ArgumentNullException("patternWithDigits isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigitsAndDelimiter" (not nullable) is not null + if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) + { + throw new ArgumentNullException("patternWithDigitsAndDelimiter isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithBackslash" (not nullable) is not null + if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) + { + throw new ArgumentNullException("patternWithBackslash isn't a nullable property for FormatTest and cannot be null"); } - this.Password = password; this.Integer = integer; this.Int32 = int32; this.UnsignedInteger = unsignedInteger; this.Int64 = int64; this.UnsignedLong = unsignedLong; + this.Number = number; this.Float = varFloat; this.Double = varDouble; this.Decimal = varDecimal; this.String = varString; + this.Byte = varByte; this.Binary = binary; + this.Date = date; this.DateTime = dateTime; this.Uuid = uuid; + this.Password = password; this.PatternWithDigits = patternWithDigits; this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; this.PatternWithBackslash = patternWithBackslash; @@ -101,31 +142,31 @@ protected FormatTest() /// Gets or Sets Integer /// [DataMember(Name = "integer", EmitDefaultValue = false)] - public int Integer { get; set; } + public Option Integer { get; set; } /// /// Gets or Sets Int32 /// [DataMember(Name = "int32", EmitDefaultValue = false)] - public int Int32 { get; set; } + public Option Int32 { get; set; } /// /// Gets or Sets UnsignedInteger /// [DataMember(Name = "unsigned_integer", EmitDefaultValue = false)] - public uint UnsignedInteger { get; set; } + public Option UnsignedInteger { get; set; } /// /// Gets or Sets Int64 /// [DataMember(Name = "int64", EmitDefaultValue = false)] - public long Int64 { get; set; } + public Option Int64 { get; set; } /// /// Gets or Sets UnsignedLong /// [DataMember(Name = "unsigned_long", EmitDefaultValue = false)] - public ulong UnsignedLong { get; set; } + public Option UnsignedLong { get; set; } /// /// Gets or Sets Number @@ -137,25 +178,25 @@ protected FormatTest() /// Gets or Sets Float /// [DataMember(Name = "float", EmitDefaultValue = false)] - public float Float { get; set; } + public Option Float { get; set; } /// /// Gets or Sets Double /// [DataMember(Name = "double", EmitDefaultValue = false)] - public double Double { get; set; } + public Option Double { get; set; } /// /// Gets or Sets Decimal /// [DataMember(Name = "decimal", EmitDefaultValue = false)] - public decimal Decimal { get; set; } + public Option Decimal { get; set; } /// /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public string String { get; set; } + public Option String { get; set; } /// /// Gets or Sets Byte @@ -167,7 +208,7 @@ protected FormatTest() /// Gets or Sets Binary /// [DataMember(Name = "binary", EmitDefaultValue = false)] - public FileParameter Binary { get; set; } + public Option Binary { get; set; } /// /// Gets or Sets Date @@ -182,14 +223,14 @@ protected FormatTest() /// /// 2007-12-03T10:15:30+01:00 [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Uuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Password @@ -202,21 +243,21 @@ protected FormatTest() /// /// A string that is a 10 digit number. Can have leading zeros. [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] - public string PatternWithDigits { get; set; } + public Option PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] - public string PatternWithDigitsAndDelimiter { get; set; } + public Option PatternWithDigitsAndDelimiter { get; set; } /// /// None /// /// None [DataMember(Name = "pattern_with_backslash", EmitDefaultValue = false)] - public string PatternWithBackslash { get; set; } + public Option PatternWithBackslash { get; set; } /// /// Gets or Sets additional properties @@ -294,54 +335,78 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode(); + if (this.Integer.IsSet) + { + hashCode = (hashCode * 59) + this.Integer.Value.GetHashCode(); + } + if (this.Int32.IsSet) + { + hashCode = (hashCode * 59) + this.Int32.Value.GetHashCode(); + } + if (this.UnsignedInteger.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedInteger.Value.GetHashCode(); + } + if (this.Int64.IsSet) + { + hashCode = (hashCode * 59) + this.Int64.Value.GetHashCode(); + } + if (this.UnsignedLong.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedLong.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.Number.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) + if (this.Float.IsSet) + { + hashCode = (hashCode * 59) + this.Float.Value.GetHashCode(); + } + if (this.Double.IsSet) + { + hashCode = (hashCode * 59) + this.Double.Value.GetHashCode(); + } + if (this.Decimal.IsSet) + { + hashCode = (hashCode * 59) + this.Decimal.Value.GetHashCode(); + } + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.Byte != null) { hashCode = (hashCode * 59) + this.Byte.GetHashCode(); } - if (this.Binary != null) + if (this.Binary.IsSet && this.Binary.Value != null) { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); + hashCode = (hashCode * 59) + this.Binary.Value.GetHashCode(); } if (this.Date != null) { hashCode = (hashCode * 59) + this.Date.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.Password != null) { hashCode = (hashCode * 59) + this.Password.GetHashCode(); } - if (this.PatternWithDigits != null) + if (this.PatternWithDigits.IsSet && this.PatternWithDigits.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigits.Value.GetHashCode(); } - if (this.PatternWithDigitsAndDelimiter != null) + if (this.PatternWithDigitsAndDelimiter.IsSet && this.PatternWithDigitsAndDelimiter.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.Value.GetHashCode(); } - if (this.PatternWithBackslash != null) + if (this.PatternWithBackslash.IsSet && this.PatternWithBackslash.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithBackslash.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithBackslash.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index 97f474eab713..c31e8b6e6707 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs index 20413cb2d867..74cdd00ce5cc 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index 737cd420ac32..20d0ac950e30 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index ff2b810c6443..0e6e2f72b8c0 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -51,10 +52,10 @@ protected GrandparentAnimal() /// petType (required). public GrandparentAnimal(string petType = default(string)) { - // to ensure "petType" is required (not null) + // to ensure "petType" (not nullable) is not null if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); + throw new ArgumentNullException("petType isn't a nullable property for GrandparentAnimal and cannot be null"); } this.PetType = petType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 8ac3489e8b7a..4188de16eb49 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -46,7 +47,7 @@ public HasOnlyReadOnly() /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -60,7 +61,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Foo /// [DataMember(Name = "foo", EmitDefaultValue = false)] - public string Foo { get; private set; } + public Option Foo { get; private set; } /// /// Returns false as Foo should not be serialized given that it's read-only. @@ -129,13 +130,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Foo != null) + if (this.Foo.IsSet && this.Foo.Value != null) { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); + hashCode = (hashCode * 59) + this.Foo.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index fc344e4373f9..4ef2968e6599 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,7 +38,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Initializes a new instance of the class. /// /// nullableMessage. - public HealthCheckResult(string nullableMessage = default(string)) + public HealthCheckResult(Option nullableMessage = default(Option)) { this.NullableMessage = nullableMessage; this.AdditionalProperties = new Dictionary(); @@ -47,7 +48,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Gets or Sets NullableMessage /// [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] - public string NullableMessage { get; set; } + public Option NullableMessage { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +108,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.NullableMessage != null) + if (this.NullableMessage.IsSet && this.NullableMessage.Value != null) { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableMessage.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 2bcb331dedda..60ba2de28f65 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -45,17 +46,17 @@ protected IsoscelesTriangle() { } /// triangleType (required). public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for IsoscelesTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for IsoscelesTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs index b84038f9fcf5..5817c1a866ee 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class List : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// var123List. - public List(string var123List = default(string)) + public List(Option var123List = default(Option)) { + // to ensure "var123List" (not nullable) is not null + if (var123List.IsSet && var123List.Value == null) + { + throw new ArgumentNullException("var123List isn't a nullable property for List and cannot be null"); + } this.Var123List = var123List; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class List : IEquatable, IValidatableObject /// Gets or Sets Var123List /// [DataMember(Name = "123-list", EmitDefaultValue = false)] - public string Var123List { get; set; } + public Option Var123List { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Var123List != null) + if (this.Var123List.IsSet && this.Var123List.Value != null) { - hashCode = (hashCode * 59) + this.Var123List.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123List.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index db0dc595908e..736cb4fa0011 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -38,12 +39,20 @@ public partial class LiteralStringClass : IEquatable, IValid /// /// escapedLiteralString (default to "C:\\Users\\username"). /// unescapedLiteralString (default to "C:\Users\username"). - public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", string unescapedLiteralString = @"C:\Users\username") + public LiteralStringClass(Option escapedLiteralString = default(Option), Option unescapedLiteralString = default(Option)) { - // use default value if no "escapedLiteralString" provided - this.EscapedLiteralString = escapedLiteralString ?? @"C:\\Users\\username"; - // use default value if no "unescapedLiteralString" provided - this.UnescapedLiteralString = unescapedLiteralString ?? @"C:\Users\username"; + // to ensure "escapedLiteralString" (not nullable) is not null + if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) + { + throw new ArgumentNullException("escapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + // to ensure "unescapedLiteralString" (not nullable) is not null + if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) + { + throw new ArgumentNullException("unescapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + this.EscapedLiteralString = escapedLiteralString.IsSet ? escapedLiteralString : new Option(@"C:\\Users\\username"); + this.UnescapedLiteralString = unescapedLiteralString.IsSet ? unescapedLiteralString : new Option(@"C:\Users\username"); this.AdditionalProperties = new Dictionary(); } @@ -51,13 +60,13 @@ public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", /// Gets or Sets EscapedLiteralString /// [DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)] - public string EscapedLiteralString { get; set; } + public Option EscapedLiteralString { get; set; } /// /// Gets or Sets UnescapedLiteralString /// [DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)] - public string UnescapedLiteralString { get; set; } + public Option UnescapedLiteralString { get; set; } /// /// Gets or Sets additional properties @@ -118,13 +127,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.EscapedLiteralString != null) + if (this.EscapedLiteralString.IsSet && this.EscapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.EscapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.EscapedLiteralString.Value.GetHashCode(); } - if (this.UnescapedLiteralString != null) + if (this.UnescapedLiteralString.IsSet && this.UnescapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.UnescapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.UnescapedLiteralString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 71ae8a22185b..ae880667e005 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 5255a249aba3..5ba2ac4869e9 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -59,8 +60,28 @@ public enum InnerEnum /// mapOfEnumString. /// directMap. /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + public MapTest(Option>> mapMapOfString = default(Option>>), Option> mapOfEnumString = default(Option>), Option> directMap = default(Option>), Option> indirectMap = default(Option>)) { + // to ensure "mapMapOfString" (not nullable) is not null + if (mapMapOfString.IsSet && mapMapOfString.Value == null) + { + throw new ArgumentNullException("mapMapOfString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "mapOfEnumString" (not nullable) is not null + if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) + { + throw new ArgumentNullException("mapOfEnumString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "directMap" (not nullable) is not null + if (directMap.IsSet && directMap.Value == null) + { + throw new ArgumentNullException("directMap isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "indirectMap" (not nullable) is not null + if (indirectMap.IsSet && indirectMap.Value == null) + { + throw new ArgumentNullException("indirectMap isn't a nullable property for MapTest and cannot be null"); + } this.MapMapOfString = mapMapOfString; this.MapOfEnumString = mapOfEnumString; this.DirectMap = directMap; @@ -72,25 +93,25 @@ public enum InnerEnum /// Gets or Sets MapMapOfString /// [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] - public Dictionary> MapMapOfString { get; set; } + public Option>> MapMapOfString { get; set; } /// /// Gets or Sets MapOfEnumString /// [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] - public Dictionary MapOfEnumString { get; set; } + public Option> MapOfEnumString { get; set; } /// /// Gets or Sets DirectMap /// [DataMember(Name = "direct_map", EmitDefaultValue = false)] - public Dictionary DirectMap { get; set; } + public Option> DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// [DataMember(Name = "indirect_map", EmitDefaultValue = false)] - public Dictionary IndirectMap { get; set; } + public Option> IndirectMap { get; set; } /// /// Gets or Sets additional properties @@ -153,21 +174,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapMapOfString != null) + if (this.MapMapOfString.IsSet && this.MapMapOfString.Value != null) { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapMapOfString.Value.GetHashCode(); } - if (this.MapOfEnumString != null) + if (this.MapOfEnumString.IsSet && this.MapOfEnumString.Value != null) { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfEnumString.Value.GetHashCode(); } - if (this.DirectMap != null) + if (this.DirectMap.IsSet && this.DirectMap.Value != null) { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.DirectMap.Value.GetHashCode(); } - if (this.IndirectMap != null) + if (this.IndirectMap.IsSet && this.IndirectMap.Value != null) { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.IndirectMap.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs index 31e0e4e46e3a..d0cbd2499eb2 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -76,23 +77,138 @@ protected MixLog() /// ProductId is only required for color mixes. /// ProductName is only required for color mixes. /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) + public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Option shopId = default(Option), Option totalPrice = default(Option), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), Option someCode = default(Option), Option batchNumber = default(Option), Option brandCode = default(Option), Option brandId = default(Option), Option brandName = default(Option), Option categoryCode = default(Option), Option color = default(Option), Option colorDescription = default(Option), Option comment = default(Option), Option commercialProductCode = default(Option), Option productLineCode = default(Option), Option country = default(Option), Option createdBy = default(Option), Option createdByFirstName = default(Option), Option createdByLastName = default(Option), Option deltaECalculationRepaired = default(Option), Option deltaECalculationSprayout = default(Option), Option ownColorVariantNumber = default(Option), Option primerProductId = default(Option), Option productId = default(Option), Option productName = default(Option), Option selectedVersionIndex = default(Option)) { - this.Id = id; - // to ensure "description" is required (not null) + // to ensure "id" (not nullable) is not null + if (id == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "description" (not nullable) is not null if (description == null) { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); + throw new ArgumentNullException("description isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "mixDate" (not nullable) is not null + if (mixDate == null) + { + throw new ArgumentNullException("mixDate isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "shopId" (not nullable) is not null + if (shopId.IsSet && shopId.Value == null) + { + throw new ArgumentNullException("shopId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "formulaVersionDate" (not nullable) is not null + if (formulaVersionDate == null) + { + throw new ArgumentNullException("formulaVersionDate isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "batchNumber" (not nullable) is not null + if (batchNumber.IsSet && batchNumber.Value == null) + { + throw new ArgumentNullException("batchNumber isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandCode" (not nullable) is not null + if (brandCode.IsSet && brandCode.Value == null) + { + throw new ArgumentNullException("brandCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandId" (not nullable) is not null + if (brandId.IsSet && brandId.Value == null) + { + throw new ArgumentNullException("brandId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandName" (not nullable) is not null + if (brandName.IsSet && brandName.Value == null) + { + throw new ArgumentNullException("brandName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "categoryCode" (not nullable) is not null + if (categoryCode.IsSet && categoryCode.Value == null) + { + throw new ArgumentNullException("categoryCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "colorDescription" (not nullable) is not null + if (colorDescription.IsSet && colorDescription.Value == null) + { + throw new ArgumentNullException("colorDescription isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "comment" (not nullable) is not null + if (comment.IsSet && comment.Value == null) + { + throw new ArgumentNullException("comment isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "commercialProductCode" (not nullable) is not null + if (commercialProductCode.IsSet && commercialProductCode.Value == null) + { + throw new ArgumentNullException("commercialProductCode isn't a nullable property for MixLog and cannot be null"); } + // to ensure "productLineCode" (not nullable) is not null + if (productLineCode.IsSet && productLineCode.Value == null) + { + throw new ArgumentNullException("productLineCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "country" (not nullable) is not null + if (country.IsSet && country.Value == null) + { + throw new ArgumentNullException("country isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdBy" (not nullable) is not null + if (createdBy.IsSet && createdBy.Value == null) + { + throw new ArgumentNullException("createdBy isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdByFirstName" (not nullable) is not null + if (createdByFirstName.IsSet && createdByFirstName.Value == null) + { + throw new ArgumentNullException("createdByFirstName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdByLastName" (not nullable) is not null + if (createdByLastName.IsSet && createdByLastName.Value == null) + { + throw new ArgumentNullException("createdByLastName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "deltaECalculationRepaired" (not nullable) is not null + if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) + { + throw new ArgumentNullException("deltaECalculationRepaired isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "deltaECalculationSprayout" (not nullable) is not null + if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) + { + throw new ArgumentNullException("deltaECalculationSprayout isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "primerProductId" (not nullable) is not null + if (primerProductId.IsSet && primerProductId.Value == null) + { + throw new ArgumentNullException("primerProductId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "productId" (not nullable) is not null + if (productId.IsSet && productId.Value == null) + { + throw new ArgumentNullException("productId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "productName" (not nullable) is not null + if (productName.IsSet && productName.Value == null) + { + throw new ArgumentNullException("productName isn't a nullable property for MixLog and cannot be null"); + } + this.Id = id; this.Description = description; this.MixDate = mixDate; + this.ShopId = shopId; + this.TotalPrice = totalPrice; this.TotalRecalculations = totalRecalculations; this.TotalOverPoors = totalOverPoors; this.TotalSkips = totalSkips; this.TotalUnderPours = totalUnderPours; this.FormulaVersionDate = formulaVersionDate; - this.ShopId = shopId; - this.TotalPrice = totalPrice; this.SomeCode = someCode; this.BatchNumber = batchNumber; this.BrandCode = brandCode; @@ -140,13 +256,13 @@ protected MixLog() /// Gets or Sets ShopId /// [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId { get; set; } + public Option ShopId { get; set; } /// /// Gets or Sets TotalPrice /// [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice { get; set; } + public Option TotalPrice { get; set; } /// /// Gets or Sets TotalRecalculations @@ -183,141 +299,141 @@ protected MixLog() /// /// SomeCode is only required for color mixes [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode { get; set; } + public Option SomeCode { get; set; } /// /// Gets or Sets BatchNumber /// [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber { get; set; } + public Option BatchNumber { get; set; } /// /// BrandCode is only required for non-color mixes /// /// BrandCode is only required for non-color mixes [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode { get; set; } + public Option BrandCode { get; set; } /// /// BrandId is only required for color mixes /// /// BrandId is only required for color mixes [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId { get; set; } + public Option BrandId { get; set; } /// /// BrandName is only required for color mixes /// /// BrandName is only required for color mixes [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName { get; set; } + public Option BrandName { get; set; } /// /// CategoryCode is not used anymore /// /// CategoryCode is not used anymore [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode { get; set; } + public Option CategoryCode { get; set; } /// /// Color is only required for color mixes /// /// Color is only required for color mixes [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Gets or Sets ColorDescription /// [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription { get; set; } + public Option ColorDescription { get; set; } /// /// Gets or Sets Comment /// [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment { get; set; } + public Option Comment { get; set; } /// /// Gets or Sets CommercialProductCode /// [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode { get; set; } + public Option CommercialProductCode { get; set; } /// /// ProductLineCode is only required for color mixes /// /// ProductLineCode is only required for color mixes [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode { get; set; } + public Option ProductLineCode { get; set; } /// /// Gets or Sets Country /// [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } + public Option Country { get; set; } /// /// Gets or Sets CreatedBy /// [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy { get; set; } + public Option CreatedBy { get; set; } /// /// Gets or Sets CreatedByFirstName /// [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName { get; set; } + public Option CreatedByFirstName { get; set; } /// /// Gets or Sets CreatedByLastName /// [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName { get; set; } + public Option CreatedByLastName { get; set; } /// /// Gets or Sets DeltaECalculationRepaired /// [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired { get; set; } + public Option DeltaECalculationRepaired { get; set; } /// /// Gets or Sets DeltaECalculationSprayout /// [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout { get; set; } + public Option DeltaECalculationSprayout { get; set; } /// /// Gets or Sets OwnColorVariantNumber /// [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber { get; set; } + public Option OwnColorVariantNumber { get; set; } /// /// Gets or Sets PrimerProductId /// [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId { get; set; } + public Option PrimerProductId { get; set; } /// /// ProductId is only required for color mixes /// /// ProductId is only required for color mixes [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId { get; set; } + public Option ProductId { get; set; } /// /// ProductName is only required for color mixes /// /// ProductName is only required for color mixes [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName { get; set; } + public Option ProductName { get; set; } /// /// Gets or Sets SelectedVersionIndex /// [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex { get; set; } + public Option SelectedVersionIndex { get; set; } /// /// Gets or Sets additional properties @@ -420,13 +536,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); } - if (this.ShopId != null) + if (this.ShopId.IsSet && this.ShopId.Value != null) { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); + hashCode = (hashCode * 59) + this.ShopId.Value.GetHashCode(); } - if (this.TotalPrice != null) + if (this.TotalPrice.IsSet) { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPrice.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); @@ -436,91 +552,94 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); } - if (this.SomeCode != null) + if (this.SomeCode.IsSet && this.SomeCode.Value != null) + { + hashCode = (hashCode * 59) + this.SomeCode.Value.GetHashCode(); + } + if (this.BatchNumber.IsSet && this.BatchNumber.Value != null) { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); + hashCode = (hashCode * 59) + this.BatchNumber.Value.GetHashCode(); } - if (this.BatchNumber != null) + if (this.BrandCode.IsSet && this.BrandCode.Value != null) { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandCode.Value.GetHashCode(); } - if (this.BrandCode != null) + if (this.BrandId.IsSet && this.BrandId.Value != null) { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandId.Value.GetHashCode(); } - if (this.BrandId != null) + if (this.BrandName.IsSet && this.BrandName.Value != null) { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandName.Value.GetHashCode(); } - if (this.BrandName != null) + if (this.CategoryCode.IsSet && this.CategoryCode.Value != null) { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); + hashCode = (hashCode * 59) + this.CategoryCode.Value.GetHashCode(); } - if (this.CategoryCode != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } - if (this.Color != null) + if (this.ColorDescription.IsSet && this.ColorDescription.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorDescription.Value.GetHashCode(); } - if (this.ColorDescription != null) + if (this.Comment.IsSet && this.Comment.Value != null) { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); + hashCode = (hashCode * 59) + this.Comment.Value.GetHashCode(); } - if (this.Comment != null) + if (this.CommercialProductCode.IsSet && this.CommercialProductCode.Value != null) { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); + hashCode = (hashCode * 59) + this.CommercialProductCode.Value.GetHashCode(); } - if (this.CommercialProductCode != null) + if (this.ProductLineCode.IsSet && this.ProductLineCode.Value != null) { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductLineCode.Value.GetHashCode(); } - if (this.ProductLineCode != null) + if (this.Country.IsSet && this.Country.Value != null) { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); + hashCode = (hashCode * 59) + this.Country.Value.GetHashCode(); } - if (this.Country != null) + if (this.CreatedBy.IsSet && this.CreatedBy.Value != null) { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedBy.Value.GetHashCode(); } - if (this.CreatedBy != null) + if (this.CreatedByFirstName.IsSet && this.CreatedByFirstName.Value != null) { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedByFirstName.Value.GetHashCode(); } - if (this.CreatedByFirstName != null) + if (this.CreatedByLastName.IsSet && this.CreatedByLastName.Value != null) { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedByLastName.Value.GetHashCode(); } - if (this.CreatedByLastName != null) + if (this.DeltaECalculationRepaired.IsSet && this.DeltaECalculationRepaired.Value != null) { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); + hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.Value.GetHashCode(); } - if (this.DeltaECalculationRepaired != null) + if (this.DeltaECalculationSprayout.IsSet && this.DeltaECalculationSprayout.Value != null) { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); + hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.Value.GetHashCode(); } - if (this.DeltaECalculationSprayout != null) + if (this.OwnColorVariantNumber.IsSet) { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); + hashCode = (hashCode * 59) + this.OwnColorVariantNumber.Value.GetHashCode(); } - if (this.OwnColorVariantNumber != null) + if (this.PrimerProductId.IsSet && this.PrimerProductId.Value != null) { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.PrimerProductId.Value.GetHashCode(); } - if (this.PrimerProductId != null) + if (this.ProductId.IsSet && this.ProductId.Value != null) { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductId.Value.GetHashCode(); } - if (this.ProductId != null) + if (this.ProductName.IsSet && this.ProductName.Value != null) { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductName.Value.GetHashCode(); } - if (this.ProductName != null) + if (this.SelectedVersionIndex.IsSet) { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); + hashCode = (hashCode * 59) + this.SelectedVersionIndex.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 889b927982c6..b40d088daa4d 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedAnyOf(MixedAnyOfContent content = default(MixedAnyOfContent)) + public MixedAnyOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedAnyOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedAnyOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs index b8d4fffa4b50..40f6ccfee8d5 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index 576cb29d578d..0e11b34c6c2b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedOneOf(MixedOneOfContent content = default(MixedOneOfContent)) + public MixedOneOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedOneOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedOneOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs index 241a53bfbe4a..36da2effb8b9 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 254ccb20d125..41dbd7eb7c37 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -40,8 +41,28 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatableuuid. /// dateTime. /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuidWithPattern = default(Guid), Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) + public MixedPropertiesAndAdditionalPropertiesClass(Option uuidWithPattern = default(Option), Option uuid = default(Option), Option dateTime = default(Option), Option> map = default(Option>)) { + // to ensure "uuidWithPattern" (not nullable) is not null + if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) + { + throw new ArgumentNullException("uuidWithPattern isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "map" (not nullable) is not null + if (map.IsSet && map.Value == null) + { + throw new ArgumentNullException("map isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } this.UuidWithPattern = uuidWithPattern; this.Uuid = uuid; this.DateTime = dateTime; @@ -53,25 +74,25 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable [DataMember(Name = "uuid_with_pattern", EmitDefaultValue = false)] - public Guid UuidWithPattern { get; set; } + public Option UuidWithPattern { get; set; } /// /// Gets or Sets Uuid /// [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets DateTime /// [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Map /// [DataMember(Name = "map", EmitDefaultValue = false)] - public Dictionary Map { get; set; } + public Option> Map { get; set; } /// /// Gets or Sets additional properties @@ -134,21 +155,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.UuidWithPattern != null) + if (this.UuidWithPattern.IsSet && this.UuidWithPattern.Value != null) { - hashCode = (hashCode * 59) + this.UuidWithPattern.GetHashCode(); + hashCode = (hashCode * 59) + this.UuidWithPattern.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Map != null) + if (this.Map.IsSet && this.Map.Value != null) { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); + hashCode = (hashCode * 59) + this.Map.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index a644d2744809..7287a1f2a8ba 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// id. - public MixedSubId(string id = default(string)) + public MixedSubId(Option id = default(Option)) { + // to ensure "id" (not nullable) is not null + if (id.IsSet && id.Value == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixedSubId and cannot be null"); + } this.Id = id; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Id != null) + if (this.Id.IsSet && this.Id.Value != null) { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index 34aee45d4c8c..b557f0ca4dfe 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -38,8 +39,13 @@ public partial class Model200Response : IEquatable, IValidatab /// /// name. /// varClass. - public Model200Response(int name = default(int), string varClass = default(string)) + public Model200Response(Option name = default(Option), Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for Model200Response and cannot be null"); + } this.Name = name; this.Class = varClass; this.AdditionalProperties = new Dictionary(); @@ -49,13 +55,13 @@ public partial class Model200Response : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public int Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets Class /// [DataMember(Name = "class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -116,10 +122,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) + if (this.Name.IsSet) + { + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); + } + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 2523c65536f3..e175491cb308 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClient. - public ModelClient(string varClient = default(string)) + public ModelClient(Option varClient = default(Option)) { + // to ensure "varClient" (not nullable) is not null + if (varClient.IsSet && varClient.Value == null) + { + throw new ArgumentNullException("varClient isn't a nullable property for ModelClient and cannot be null"); + } this.VarClient = varClient; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public string VarClient { get; set; } + public Option VarClient { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.VarClient != null) + if (this.VarClient.IsSet && this.VarClient.Value != null) { - hashCode = (hashCode * 59) + this.VarClient.GetHashCode(); + hashCode = (hashCode * 59) + this.VarClient.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs index 47c0de878119..0d68727e24bb 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -46,8 +47,13 @@ protected Name() /// /// varName (required). /// property. - public Name(int varName = default(int), string property = default(string)) + public Name(int varName = default(int), Option property = default(Option)) { + // to ensure "property" (not nullable) is not null + if (property.IsSet && property.Value == null) + { + throw new ArgumentNullException("property isn't a nullable property for Name and cannot be null"); + } this.VarName = varName; this.Property = property; this.AdditionalProperties = new Dictionary(); @@ -63,7 +69,7 @@ protected Name() /// Gets or Sets SnakeCase /// [DataMember(Name = "snake_case", EmitDefaultValue = false)] - public int SnakeCase { get; private set; } + public Option SnakeCase { get; private set; } /// /// Returns false as SnakeCase should not be serialized given that it's read-only. @@ -77,13 +83,13 @@ public bool ShouldSerializeSnakeCase() /// Gets or Sets Property /// [DataMember(Name = "property", EmitDefaultValue = false)] - public string Property { get; set; } + public Option Property { get; set; } /// /// Gets or Sets Var123Number /// [DataMember(Name = "123Number", EmitDefaultValue = false)] - public int Var123Number { get; private set; } + public Option Var123Number { get; private set; } /// /// Returns false as Var123Number should not be serialized given that it's read-only. @@ -155,12 +161,18 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.VarName.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) + if (this.SnakeCase.IsSet) + { + hashCode = (hashCode * 59) + this.SnakeCase.Value.GetHashCode(); + } + if (this.Property.IsSet && this.Property.Value != null) + { + hashCode = (hashCode * 59) + this.Property.Value.GetHashCode(); + } + if (this.Var123Number.IsSet) { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123Number.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Var123Number.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index a08db8b6648e..8f0e63d62acb 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -48,12 +49,12 @@ protected NotificationtestGetElementsV1ResponseMPayload() /// aObjVariableobject (required). public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List> aObjVariableobject = default(List>)) { - this.PkiNotificationtestID = pkiNotificationtestID; - // to ensure "aObjVariableobject" is required (not null) + // to ensure "aObjVariableobject" (not nullable) is not null if (aObjVariableobject == null) { - throw new ArgumentNullException("aObjVariableobject is a required property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); + throw new ArgumentNullException("aObjVariableobject isn't a nullable property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); } + this.PkiNotificationtestID = pkiNotificationtestID; this.AObjVariableobject = aObjVariableobject; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 8508046165fa..a5083e57ae03 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -48,8 +49,18 @@ public partial class NullableClass : IEquatable, IValidatableObje /// objectNullableProp. /// objectAndItemsNullableProp. /// objectItemsNullable. - public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateTime? dateProp = default(DateTime?), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) + public NullableClass(Option integerProp = default(Option), Option numberProp = default(Option), Option booleanProp = default(Option), Option stringProp = default(Option), Option dateProp = default(Option), Option datetimeProp = default(Option), Option> arrayNullableProp = default(Option>), Option> arrayAndItemsNullableProp = default(Option>), Option> arrayItemsNullable = default(Option>), Option> objectNullableProp = default(Option>), Option> objectAndItemsNullableProp = default(Option>), Option> objectItemsNullable = default(Option>)) { + // to ensure "arrayItemsNullable" (not nullable) is not null + if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) + { + throw new ArgumentNullException("arrayItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } + // to ensure "objectItemsNullable" (not nullable) is not null + if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) + { + throw new ArgumentNullException("objectItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } this.IntegerProp = integerProp; this.NumberProp = numberProp; this.BooleanProp = booleanProp; @@ -69,74 +80,74 @@ public partial class NullableClass : IEquatable, IValidatableObje /// Gets or Sets IntegerProp /// [DataMember(Name = "integer_prop", EmitDefaultValue = true)] - public int? IntegerProp { get; set; } + public Option IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// [DataMember(Name = "number_prop", EmitDefaultValue = true)] - public decimal? NumberProp { get; set; } + public Option NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] - public bool? BooleanProp { get; set; } + public Option BooleanProp { get; set; } /// /// Gets or Sets StringProp /// [DataMember(Name = "string_prop", EmitDefaultValue = true)] - public string StringProp { get; set; } + public Option StringProp { get; set; } /// /// Gets or Sets DateProp /// [DataMember(Name = "date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? DateProp { get; set; } + public Option DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] - public DateTime? DatetimeProp { get; set; } + public Option DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] - public List ArrayNullableProp { get; set; } + public Option> ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] - public List ArrayAndItemsNullableProp { get; set; } + public Option> ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] - public List ArrayItemsNullable { get; set; } + public Option> ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectNullableProp { get; set; } + public Option> ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectAndItemsNullableProp { get; set; } + public Option> ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] - public Dictionary ObjectItemsNullable { get; set; } + public Option> ObjectItemsNullable { get; set; } /// /// Gets or Sets additional properties @@ -207,53 +218,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.IntegerProp != null) + if (this.IntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.IntegerProp.Value.GetHashCode(); } - if (this.NumberProp != null) + if (this.NumberProp.IsSet) { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberProp.Value.GetHashCode(); } - if (this.BooleanProp != null) + if (this.BooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.BooleanProp.Value.GetHashCode(); } - if (this.StringProp != null) + if (this.StringProp.IsSet && this.StringProp.Value != null) { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.StringProp.Value.GetHashCode(); } - if (this.DateProp != null) + if (this.DateProp.IsSet && this.DateProp.Value != null) { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DateProp.Value.GetHashCode(); } - if (this.DatetimeProp != null) + if (this.DatetimeProp.IsSet && this.DatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DatetimeProp.Value.GetHashCode(); } - if (this.ArrayNullableProp != null) + if (this.ArrayNullableProp.IsSet && this.ArrayNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNullableProp.Value.GetHashCode(); } - if (this.ArrayAndItemsNullableProp != null) + if (this.ArrayAndItemsNullableProp.IsSet && this.ArrayAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.Value.GetHashCode(); } - if (this.ArrayItemsNullable != null) + if (this.ArrayItemsNullable.IsSet && this.ArrayItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayItemsNullable.Value.GetHashCode(); } - if (this.ObjectNullableProp != null) + if (this.ObjectNullableProp.IsSet && this.ObjectNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectNullableProp.Value.GetHashCode(); } - if (this.ObjectAndItemsNullableProp != null) + if (this.ObjectAndItemsNullableProp.IsSet && this.ObjectAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.Value.GetHashCode(); } - if (this.ObjectItemsNullable != null) + if (this.ObjectItemsNullable.IsSet && this.ObjectItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectItemsNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index ef4df456bd1a..4f80e7a49d09 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,7 +38,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// Initializes a new instance of the class. /// /// uuid. - public NullableGuidClass(Guid? uuid = default(Guid?)) + public NullableGuidClass(Option uuid = default(Option)) { this.Uuid = uuid; this.AdditionalProperties = new Dictionary(); @@ -48,7 +49,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = true)] - public Guid? Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets additional properties @@ -108,9 +109,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index 9342811826cb..41c634e92d7b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index a287358b015c..f7c38e570ff6 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -18,6 +18,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -40,7 +41,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) + public NumberOnly(Option justNumber = default(Option)) { this.JustNumber = justNumber; this.AdditionalProperties = new Dictionary(); @@ -50,7 +51,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Gets or Sets JustNumber /// [DataMember(Name = "JustNumber", EmitDefaultValue = false)] - public decimal JustNumber { get; set; } + public Option JustNumber { get; set; } /// /// Gets or Sets additional properties @@ -110,7 +111,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); + if (this.JustNumber.IsSet) + { + hashCode = (hashCode * 59) + this.JustNumber.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index db530572625a..8f0144542005 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -40,8 +41,23 @@ public partial class ObjectWithDeprecatedFields : IEquatableid. /// deprecatedRef. /// bars. - public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List bars = default(List)) + public ObjectWithDeprecatedFields(Option uuid = default(Option), Option id = default(Option), Option deprecatedRef = default(Option), Option> bars = default(Option>)) { + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "deprecatedRef" (not nullable) is not null + if (deprecatedRef.IsSet && deprecatedRef.Value == null) + { + throw new ArgumentNullException("deprecatedRef isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "bars" (not nullable) is not null + if (bars.IsSet && bars.Value == null) + { + throw new ArgumentNullException("bars isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } this.Uuid = uuid; this.Id = id; this.DeprecatedRef = deprecatedRef; @@ -53,28 +69,28 @@ public partial class ObjectWithDeprecatedFields : IEquatable [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] [Obsolete] - public decimal Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets DeprecatedRef /// [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } + public Option DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// [DataMember(Name = "bars", EmitDefaultValue = false)] [Obsolete] - public List Bars { get; set; } + public Option> Bars { get; set; } /// /// Gets or Sets additional properties @@ -137,18 +153,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) + { + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); + } + if (this.Id.IsSet) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) + if (this.DeprecatedRef.IsSet && this.DeprecatedRef.Value != null) { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); + hashCode = (hashCode * 59) + this.DeprecatedRef.Value.GetHashCode(); } - if (this.Bars != null) + if (this.Bars.IsSet && this.Bars.Value != null) { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); + hashCode = (hashCode * 59) + this.Bars.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs index 46b9d6f16c7a..2dcc79eb708e 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs index c995bf5d39bf..2a0e7ddbff14 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -65,7 +66,7 @@ public enum StatusEnum /// /// Order Status [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -75,14 +76,19 @@ public enum StatusEnum /// shipDate. /// Order Status. /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) + public Order(Option id = default(Option), Option petId = default(Option), Option quantity = default(Option), Option shipDate = default(Option), Option status = default(Option), Option complete = default(Option)) { + // to ensure "shipDate" (not nullable) is not null + if (shipDate.IsSet && shipDate.Value == null) + { + throw new ArgumentNullException("shipDate isn't a nullable property for Order and cannot be null"); + } this.Id = id; this.PetId = petId; this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - this.Complete = complete; + this.Complete = complete.IsSet ? complete : new Option(false); this.AdditionalProperties = new Dictionary(); } @@ -90,32 +96,32 @@ public enum StatusEnum /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets PetId /// [DataMember(Name = "petId", EmitDefaultValue = false)] - public long PetId { get; set; } + public Option PetId { get; set; } /// /// Gets or Sets Quantity /// [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int Quantity { get; set; } + public Option Quantity { get; set; } /// /// Gets or Sets ShipDate /// /// 2020-02-02T20:20:20.000222Z [DataMember(Name = "shipDate", EmitDefaultValue = false)] - public DateTime ShipDate { get; set; } + public Option ShipDate { get; set; } /// /// Gets or Sets Complete /// [DataMember(Name = "complete", EmitDefaultValue = true)] - public bool Complete { get; set; } + public Option Complete { get; set; } /// /// Gets or Sets additional properties @@ -180,15 +186,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.PetId.IsSet) + { + hashCode = (hashCode * 59) + this.PetId.Value.GetHashCode(); + } + if (this.Quantity.IsSet) + { + hashCode = (hashCode * 59) + this.Quantity.Value.GetHashCode(); + } + if (this.ShipDate.IsSet && this.ShipDate.Value != null) + { + hashCode = (hashCode * 59) + this.ShipDate.Value.GetHashCode(); + } + if (this.Status.IsSet) + { + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); + } + if (this.Complete.IsSet) { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); + hashCode = (hashCode * 59) + this.Complete.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 91a61870eea7..d0da50fcd4a5 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -39,8 +40,13 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// myNumber. /// myString. /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) + public OuterComposite(Option myNumber = default(Option), Option myString = default(Option), Option myBoolean = default(Option)) { + // to ensure "myString" (not nullable) is not null + if (myString.IsSet && myString.Value == null) + { + throw new ArgumentNullException("myString isn't a nullable property for OuterComposite and cannot be null"); + } this.MyNumber = myNumber; this.MyString = myString; this.MyBoolean = myBoolean; @@ -51,19 +57,19 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// Gets or Sets MyNumber /// [DataMember(Name = "my_number", EmitDefaultValue = false)] - public decimal MyNumber { get; set; } + public Option MyNumber { get; set; } /// /// Gets or Sets MyString /// [DataMember(Name = "my_string", EmitDefaultValue = false)] - public string MyString { get; set; } + public Option MyString { get; set; } /// /// Gets or Sets MyBoolean /// [DataMember(Name = "my_boolean", EmitDefaultValue = true)] - public bool MyBoolean { get; set; } + public Option MyBoolean { get; set; } /// /// Gets or Sets additional properties @@ -125,12 +131,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) + if (this.MyNumber.IsSet) + { + hashCode = (hashCode * 59) + this.MyNumber.Value.GetHashCode(); + } + if (this.MyString.IsSet && this.MyString.Value != null) + { + hashCode = (hashCode * 59) + this.MyString.Value.GetHashCode(); + } + if (this.MyBoolean.IsSet) { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); + hashCode = (hashCode * 59) + this.MyBoolean.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs index bb0e1f0ba58e..8840888be3c2 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index 1cec12bdd323..77862ecd6cec 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 15fc3f2f419c..c56ef53e1e9c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index 12c5e84a3658..04bf4b49e28f 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs index d7d59d5f8e1e..996c90cc4ae7 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index 98e7574e092e..d9310bd15058 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs index 2d13379fd74b..e9fc5008557c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -65,7 +66,7 @@ public enum StatusEnum /// /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -83,22 +84,32 @@ protected Pet() /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), Option category = default(Option), string name = default(string), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this.Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this.PhotoUrls = photoUrls; this.Id = id; this.Category = category; + this.Name = name; + this.PhotoUrls = photoUrls; this.Tags = tags; this.Status = status; this.AdditionalProperties = new Dictionary(); @@ -108,13 +119,13 @@ protected Pet() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category { get; set; } + public Option Category { get; set; } /// /// Gets or Sets Name @@ -133,7 +144,7 @@ protected Pet() /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags { get; set; } + public Option> Tags { get; set; } /// /// Gets or Sets additional properties @@ -198,10 +209,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.Name != null) { @@ -211,11 +225,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 9003f3a19ef5..620a47faa1c6 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 8315c6ddb7ba..17bd3a2624be 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index 673969c6ec9b..1abffa35669b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 8e87f3b369fe..b7fcf2cdd5f0 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -47,10 +48,10 @@ protected QuadrilateralInterface() /// quadrilateralType (required). public QuadrilateralInterface(string quadrilateralType = default(string)) { - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 8fd8dcd0dce9..dfcd3c12a1e2 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// baz. - public ReadOnlyFirst(string baz = default(string)) + public ReadOnlyFirst(Option baz = default(Option)) { + // to ensure "baz" (not nullable) is not null + if (baz.IsSet && baz.Value == null) + { + throw new ArgumentNullException("baz isn't a nullable property for ReadOnlyFirst and cannot be null"); + } this.Baz = baz; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -61,7 +67,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Baz /// [DataMember(Name = "baz", EmitDefaultValue = false)] - public string Baz { get; set; } + public Option Baz { get; set; } /// /// Gets or Sets additional properties @@ -122,13 +128,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Baz != null) + if (this.Baz.IsSet && this.Baz.Value != null) { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); + hashCode = (hashCode * 59) + this.Baz.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 3d5eaf99a7d5..d73e9cc27102 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -54,7 +55,7 @@ public enum RequiredNullableEnumIntegerEnum /// Gets or Sets RequiredNullableEnumInteger /// [DataMember(Name = "required_nullable_enum_integer", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerEnum RequiredNullableEnumInteger { get; set; } + public RequiredNullableEnumIntegerEnum? RequiredNullableEnumInteger { get; set; } /// /// Defines RequiredNotnullableEnumInteger /// @@ -98,7 +99,7 @@ public enum NotrequiredNullableEnumIntegerEnum /// Gets or Sets NotrequiredNullableEnumInteger /// [DataMember(Name = "notrequired_nullable_enum_integer", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerEnum? NotrequiredNullableEnumInteger { get; set; } + public Option NotrequiredNullableEnumInteger { get; set; } /// /// Defines NotrequiredNotnullableEnumInteger /// @@ -120,11 +121,10 @@ public enum NotrequiredNotnullableEnumIntegerEnum /// Gets or Sets NotrequiredNotnullableEnumInteger /// [DataMember(Name = "notrequired_notnullable_enum_integer", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerEnum? NotrequiredNotnullableEnumInteger { get; set; } + public Option NotrequiredNotnullableEnumInteger { get; set; } /// /// Defines RequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum RequiredNullableEnumIntegerOnlyEnum { /// @@ -143,7 +143,7 @@ public enum RequiredNullableEnumIntegerOnlyEnum /// Gets or Sets RequiredNullableEnumIntegerOnly /// [DataMember(Name = "required_nullable_enum_integer_only", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnly { get; set; } + public RequiredNullableEnumIntegerOnlyEnum? RequiredNullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumIntegerOnly /// @@ -169,7 +169,6 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum /// /// Defines NotrequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum NotrequiredNullableEnumIntegerOnlyEnum { /// @@ -188,7 +187,7 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNullableEnumIntegerOnly /// [DataMember(Name = "notrequired_nullable_enum_integer_only", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerOnlyEnum? NotrequiredNullableEnumIntegerOnly { get; set; } + public Option NotrequiredNullableEnumIntegerOnly { get; set; } /// /// Defines NotrequiredNotnullableEnumIntegerOnly /// @@ -210,7 +209,7 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNotnullableEnumIntegerOnly /// [DataMember(Name = "notrequired_notnullable_enum_integer_only", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerOnlyEnum? NotrequiredNotnullableEnumIntegerOnly { get; set; } + public Option NotrequiredNotnullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumString /// @@ -332,7 +331,7 @@ public enum RequiredNullableEnumStringEnum /// Gets or Sets RequiredNullableEnumString /// [DataMember(Name = "required_nullable_enum_string", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumStringEnum RequiredNullableEnumString { get; set; } + public RequiredNullableEnumStringEnum? RequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNullableEnumString /// @@ -393,7 +392,7 @@ public enum NotrequiredNullableEnumStringEnum /// Gets or Sets NotrequiredNullableEnumString /// [DataMember(Name = "notrequired_nullable_enum_string", EmitDefaultValue = true)] - public NotrequiredNullableEnumStringEnum? NotrequiredNullableEnumString { get; set; } + public Option NotrequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNotnullableEnumString /// @@ -454,7 +453,7 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNotnullableEnumString /// [DataMember(Name = "notrequired_notnullable_enum_string", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumStringEnum? NotrequiredNotnullableEnumString { get; set; } + public Option NotrequiredNotnullableEnumString { get; set; } /// /// Gets or Sets RequiredNullableOuterEnumDefaultValue @@ -472,13 +471,13 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_nullable_outerEnumDefaultValue", EmitDefaultValue = true)] - public OuterEnumDefaultValue? NotrequiredNullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNullableOuterEnumDefaultValue { get; set; } /// /// Gets or Sets NotrequiredNotnullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_notnullable_outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? NotrequiredNotnullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNotnullableOuterEnumDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -534,95 +533,100 @@ protected RequiredClass() /// requiredNotnullableArrayOfString (required). /// notrequiredNullableArrayOfString. /// notrequiredNotnullableArrayOfString. - public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), int? notRequiredNullableIntegerProp = default(int?), int notRequiredNotnullableintegerProp = default(int), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), string notrequiredNullableStringProp = default(string), string notrequiredNotnullableStringProp = default(string), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), bool? notrequiredNullableBooleanProp = default(bool?), bool notrequiredNotnullableBooleanProp = default(bool), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), DateTime? notRequiredNullableDateProp = default(DateTime?), DateTime notRequiredNotnullableDateProp = default(DateTime), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), DateTime? notrequiredNullableDatetimeProp = default(DateTime?), DateTime notrequiredNotnullableDatetimeProp = default(DateTime), RequiredNullableEnumIntegerEnum requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), NotrequiredNullableEnumIntegerEnum? notrequiredNullableEnumInteger = default(NotrequiredNullableEnumIntegerEnum?), NotrequiredNotnullableEnumIntegerEnum? notrequiredNotnullableEnumInteger = default(NotrequiredNotnullableEnumIntegerEnum?), RequiredNullableEnumIntegerOnlyEnum requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), NotrequiredNullableEnumIntegerOnlyEnum? notrequiredNullableEnumIntegerOnly = default(NotrequiredNullableEnumIntegerOnlyEnum?), NotrequiredNotnullableEnumIntegerOnlyEnum? notrequiredNotnullableEnumIntegerOnly = default(NotrequiredNotnullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum requiredNullableEnumString = default(RequiredNullableEnumStringEnum), NotrequiredNullableEnumStringEnum? notrequiredNullableEnumString = default(NotrequiredNullableEnumStringEnum?), NotrequiredNotnullableEnumStringEnum? notrequiredNotnullableEnumString = default(NotrequiredNotnullableEnumStringEnum?), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue? notrequiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue? notrequiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Guid? notrequiredNullableUuid = default(Guid?), Guid notrequiredNotnullableUuid = default(Guid), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), List notrequiredNullableArrayOfString = default(List), List notrequiredNotnullableArrayOfString = default(List)) + public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), Option notRequiredNullableIntegerProp = default(Option), Option notRequiredNotnullableintegerProp = default(Option), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), Option notrequiredNullableStringProp = default(Option), Option notrequiredNotnullableStringProp = default(Option), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), Option notrequiredNullableBooleanProp = default(Option), Option notrequiredNotnullableBooleanProp = default(Option), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), Option notRequiredNullableDateProp = default(Option), Option notRequiredNotnullableDateProp = default(Option), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), Option notrequiredNullableDatetimeProp = default(Option), Option notrequiredNotnullableDatetimeProp = default(Option), RequiredNullableEnumIntegerEnum? requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum?), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), Option notrequiredNullableEnumInteger = default(Option), Option notrequiredNotnullableEnumInteger = default(Option), RequiredNullableEnumIntegerOnlyEnum? requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), Option notrequiredNullableEnumIntegerOnly = default(Option), Option notrequiredNotnullableEnumIntegerOnly = default(Option), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum? requiredNullableEnumString = default(RequiredNullableEnumStringEnum?), Option notrequiredNullableEnumString = default(Option), Option notrequiredNotnullableEnumString = default(Option), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), Option notrequiredNullableOuterEnumDefaultValue = default(Option), Option notrequiredNotnullableOuterEnumDefaultValue = default(Option), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Option notrequiredNullableUuid = default(Option), Option notrequiredNotnullableUuid = default(Option), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), Option> notrequiredNullableArrayOfString = default(Option>), Option> notrequiredNotnullableArrayOfString = default(Option>)) { - // to ensure "requiredNullableIntegerProp" is required (not null) - if (requiredNullableIntegerProp == null) + // to ensure "requiredNotnullableStringProp" (not nullable) is not null + if (requiredNotnullableStringProp == null) { - throw new ArgumentNullException("requiredNullableIntegerProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableIntegerProp = requiredNullableIntegerProp; - this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; - // to ensure "requiredNullableStringProp" is required (not null) - if (requiredNullableStringProp == null) + // to ensure "notrequiredNotnullableStringProp" (not nullable) is not null + if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) { - throw new ArgumentNullException("requiredNullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableStringProp = requiredNullableStringProp; - // to ensure "requiredNotnullableStringProp" is required (not null) - if (requiredNotnullableStringProp == null) + // to ensure "requiredNotNullableDateProp" (not nullable) is not null + if (requiredNotNullableDateProp == null) { - throw new ArgumentNullException("requiredNotnullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotNullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableStringProp = requiredNotnullableStringProp; - // to ensure "requiredNullableBooleanProp" is required (not null) - if (requiredNullableBooleanProp == null) + // to ensure "notRequiredNotnullableDateProp" (not nullable) is not null + if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) { - throw new ArgumentNullException("requiredNullableBooleanProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notRequiredNotnullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableBooleanProp = requiredNullableBooleanProp; - this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; - // to ensure "requiredNullableDateProp" is required (not null) - if (requiredNullableDateProp == null) + // to ensure "requiredNotnullableDatetimeProp" (not nullable) is not null + if (requiredNotnullableDatetimeProp == null) { - throw new ArgumentNullException("requiredNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDateProp = requiredNullableDateProp; - this.RequiredNotNullableDateProp = requiredNotNullableDateProp; - this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; - // to ensure "requiredNullableDatetimeProp" is required (not null) - if (requiredNullableDatetimeProp == null) + // to ensure "notrequiredNotnullableDatetimeProp" (not nullable) is not null + if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) { - throw new ArgumentNullException("requiredNullableDatetimeProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; - this.RequiredNullableEnumInteger = requiredNullableEnumInteger; - this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; - this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; - this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; - this.RequiredNotnullableEnumString = requiredNotnullableEnumString; - this.RequiredNullableEnumString = requiredNullableEnumString; - this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; - this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; - // to ensure "requiredNullableUuid" is required (not null) - if (requiredNullableUuid == null) + // to ensure "requiredNotnullableUuid" (not nullable) is not null + if (requiredNotnullableUuid == null) { - throw new ArgumentNullException("requiredNullableUuid is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableUuid = requiredNullableUuid; - this.RequiredNotnullableUuid = requiredNotnullableUuid; - // to ensure "requiredNullableArrayOfString" is required (not null) - if (requiredNullableArrayOfString == null) + // to ensure "notrequiredNotnullableUuid" (not nullable) is not null + if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) { - throw new ArgumentNullException("requiredNullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableArrayOfString = requiredNullableArrayOfString; - // to ensure "requiredNotnullableArrayOfString" is required (not null) + // to ensure "requiredNotnullableArrayOfString" (not nullable) is not null if (requiredNotnullableArrayOfString == null) { - throw new ArgumentNullException("requiredNotnullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; + // to ensure "notrequiredNotnullableArrayOfString" (not nullable) is not null + if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) + { + throw new ArgumentNullException("notrequiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); + } + this.RequiredNullableIntegerProp = requiredNullableIntegerProp; + this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; this.NotRequiredNullableIntegerProp = notRequiredNullableIntegerProp; this.NotRequiredNotnullableintegerProp = notRequiredNotnullableintegerProp; + this.RequiredNullableStringProp = requiredNullableStringProp; + this.RequiredNotnullableStringProp = requiredNotnullableStringProp; this.NotrequiredNullableStringProp = notrequiredNullableStringProp; this.NotrequiredNotnullableStringProp = notrequiredNotnullableStringProp; + this.RequiredNullableBooleanProp = requiredNullableBooleanProp; + this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; this.NotrequiredNullableBooleanProp = notrequiredNullableBooleanProp; this.NotrequiredNotnullableBooleanProp = notrequiredNotnullableBooleanProp; + this.RequiredNullableDateProp = requiredNullableDateProp; + this.RequiredNotNullableDateProp = requiredNotNullableDateProp; this.NotRequiredNullableDateProp = notRequiredNullableDateProp; this.NotRequiredNotnullableDateProp = notRequiredNotnullableDateProp; + this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; + this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; this.NotrequiredNullableDatetimeProp = notrequiredNullableDatetimeProp; this.NotrequiredNotnullableDatetimeProp = notrequiredNotnullableDatetimeProp; + this.RequiredNullableEnumInteger = requiredNullableEnumInteger; + this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; this.NotrequiredNullableEnumInteger = notrequiredNullableEnumInteger; this.NotrequiredNotnullableEnumInteger = notrequiredNotnullableEnumInteger; + this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; + this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; this.NotrequiredNullableEnumIntegerOnly = notrequiredNullableEnumIntegerOnly; this.NotrequiredNotnullableEnumIntegerOnly = notrequiredNotnullableEnumIntegerOnly; + this.RequiredNotnullableEnumString = requiredNotnullableEnumString; + this.RequiredNullableEnumString = requiredNullableEnumString; this.NotrequiredNullableEnumString = notrequiredNullableEnumString; this.NotrequiredNotnullableEnumString = notrequiredNotnullableEnumString; + this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; + this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; this.NotrequiredNullableOuterEnumDefaultValue = notrequiredNullableOuterEnumDefaultValue; this.NotrequiredNotnullableOuterEnumDefaultValue = notrequiredNotnullableOuterEnumDefaultValue; + this.RequiredNullableUuid = requiredNullableUuid; + this.RequiredNotnullableUuid = requiredNotnullableUuid; this.NotrequiredNullableUuid = notrequiredNullableUuid; this.NotrequiredNotnullableUuid = notrequiredNotnullableUuid; + this.RequiredNullableArrayOfString = requiredNullableArrayOfString; + this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; this.NotrequiredNullableArrayOfString = notrequiredNullableArrayOfString; this.NotrequiredNotnullableArrayOfString = notrequiredNotnullableArrayOfString; this.AdditionalProperties = new Dictionary(); @@ -644,13 +648,13 @@ protected RequiredClass() /// Gets or Sets NotRequiredNullableIntegerProp /// [DataMember(Name = "not_required_nullable_integer_prop", EmitDefaultValue = true)] - public int? NotRequiredNullableIntegerProp { get; set; } + public Option NotRequiredNullableIntegerProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableintegerProp /// [DataMember(Name = "not_required_notnullableinteger_prop", EmitDefaultValue = false)] - public int NotRequiredNotnullableintegerProp { get; set; } + public Option NotRequiredNotnullableintegerProp { get; set; } /// /// Gets or Sets RequiredNullableStringProp @@ -668,13 +672,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableStringProp /// [DataMember(Name = "notrequired_nullable_string_prop", EmitDefaultValue = true)] - public string NotrequiredNullableStringProp { get; set; } + public Option NotrequiredNullableStringProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableStringProp /// [DataMember(Name = "notrequired_notnullable_string_prop", EmitDefaultValue = false)] - public string NotrequiredNotnullableStringProp { get; set; } + public Option NotrequiredNotnullableStringProp { get; set; } /// /// Gets or Sets RequiredNullableBooleanProp @@ -692,13 +696,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableBooleanProp /// [DataMember(Name = "notrequired_nullable_boolean_prop", EmitDefaultValue = true)] - public bool? NotrequiredNullableBooleanProp { get; set; } + public Option NotrequiredNullableBooleanProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableBooleanProp /// [DataMember(Name = "notrequired_notnullable_boolean_prop", EmitDefaultValue = true)] - public bool NotrequiredNotnullableBooleanProp { get; set; } + public Option NotrequiredNotnullableBooleanProp { get; set; } /// /// Gets or Sets RequiredNullableDateProp @@ -719,14 +723,14 @@ protected RequiredClass() /// [DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? NotRequiredNullableDateProp { get; set; } + public Option NotRequiredNullableDateProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableDateProp /// [DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime NotRequiredNotnullableDateProp { get; set; } + public Option NotRequiredNotnullableDateProp { get; set; } /// /// Gets or Sets RequiredNotnullableDatetimeProp @@ -744,13 +748,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableDatetimeProp /// [DataMember(Name = "notrequired_nullable_datetime_prop", EmitDefaultValue = true)] - public DateTime? NotrequiredNullableDatetimeProp { get; set; } + public Option NotrequiredNullableDatetimeProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableDatetimeProp /// [DataMember(Name = "notrequired_notnullable_datetime_prop", EmitDefaultValue = false)] - public DateTime NotrequiredNotnullableDatetimeProp { get; set; } + public Option NotrequiredNotnullableDatetimeProp { get; set; } /// /// Gets or Sets RequiredNullableUuid @@ -771,14 +775,14 @@ protected RequiredClass() /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_nullable_uuid", EmitDefaultValue = true)] - public Guid? NotrequiredNullableUuid { get; set; } + public Option NotrequiredNullableUuid { get; set; } /// /// Gets or Sets NotrequiredNotnullableUuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_notnullable_uuid", EmitDefaultValue = false)] - public Guid NotrequiredNotnullableUuid { get; set; } + public Option NotrequiredNotnullableUuid { get; set; } /// /// Gets or Sets RequiredNullableArrayOfString @@ -796,13 +800,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableArrayOfString /// [DataMember(Name = "notrequired_nullable_array_of_string", EmitDefaultValue = true)] - public List NotrequiredNullableArrayOfString { get; set; } + public Option> NotrequiredNullableArrayOfString { get; set; } /// /// Gets or Sets NotrequiredNotnullableArrayOfString /// [DataMember(Name = "notrequired_notnullable_array_of_string", EmitDefaultValue = false)] - public List NotrequiredNotnullableArrayOfString { get; set; } + public Option> NotrequiredNotnullableArrayOfString { get; set; } /// /// Gets or Sets additional properties @@ -905,16 +909,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RequiredNullableIntegerProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); + if (this.NotRequiredNullableIntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); - if (this.NotRequiredNullableIntegerProp != null) + if (this.NotRequiredNotnullableintegerProp.IsSet) { - hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.GetHashCode(); if (this.RequiredNullableStringProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableStringProp.GetHashCode(); @@ -923,24 +927,24 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableStringProp.GetHashCode(); } - if (this.NotrequiredNullableStringProp != null) + if (this.NotrequiredNullableStringProp.IsSet && this.NotrequiredNullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableStringProp != null) + if (this.NotrequiredNotnullableStringProp.IsSet && this.NotrequiredNotnullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.Value.GetHashCode(); } - if (this.RequiredNullableBooleanProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); + if (this.NotrequiredNullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); - if (this.NotrequiredNullableBooleanProp != null) + if (this.NotrequiredNotnullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.GetHashCode(); if (this.RequiredNullableDateProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableDateProp.GetHashCode(); @@ -949,13 +953,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotNullableDateProp.GetHashCode(); } - if (this.NotRequiredNullableDateProp != null) + if (this.NotRequiredNullableDateProp.IsSet && this.NotRequiredNullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.Value.GetHashCode(); } - if (this.NotRequiredNotnullableDateProp != null) + if (this.NotRequiredNotnullableDateProp.IsSet && this.NotRequiredNotnullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.Value.GetHashCode(); } if (this.RequiredNotnullableDatetimeProp != null) { @@ -965,30 +969,54 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNullableDatetimeProp.GetHashCode(); } - if (this.NotrequiredNullableDatetimeProp != null) + if (this.NotrequiredNullableDatetimeProp.IsSet && this.NotrequiredNullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableDatetimeProp != null) + if (this.NotrequiredNotnullableDatetimeProp.IsSet && this.NotrequiredNotnullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.RequiredNullableEnumInteger.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.GetHashCode(); + if (this.NotrequiredNullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableEnumIntegerOnly.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.GetHashCode(); + if (this.NotrequiredNullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNotnullableEnumString.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.GetHashCode(); + if (this.NotrequiredNullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableOuterEnumDefaultValue.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.GetHashCode(); + if (this.NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.Value.GetHashCode(); + } if (this.RequiredNullableUuid != null) { hashCode = (hashCode * 59) + this.RequiredNullableUuid.GetHashCode(); @@ -997,13 +1025,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableUuid.GetHashCode(); } - if (this.NotrequiredNullableUuid != null) + if (this.NotrequiredNullableUuid.IsSet && this.NotrequiredNullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.Value.GetHashCode(); } - if (this.NotrequiredNotnullableUuid != null) + if (this.NotrequiredNotnullableUuid.IsSet && this.NotrequiredNotnullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.Value.GetHashCode(); } if (this.RequiredNullableArrayOfString != null) { @@ -1013,13 +1041,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableArrayOfString.GetHashCode(); } - if (this.NotrequiredNullableArrayOfString != null) + if (this.NotrequiredNullableArrayOfString.IsSet && this.NotrequiredNullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.Value.GetHashCode(); } - if (this.NotrequiredNotnullableArrayOfString != null) + if (this.NotrequiredNotnullableArrayOfString.IsSet && this.NotrequiredNotnullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs index 6a9590cc8f40..7c13c296a88b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -48,21 +49,21 @@ protected Return() /// varLock (required). /// varAbstract (required). /// varUnsafe. - public Return(int varReturn = default(int), string varLock = default(string), string varAbstract = default(string), string varUnsafe = default(string)) + public Return(Option varReturn = default(Option), string varLock = default(string), string varAbstract = default(string), Option varUnsafe = default(Option)) { - // to ensure "varLock" is required (not null) + // to ensure "varLock" (not nullable) is not null if (varLock == null) { - throw new ArgumentNullException("varLock is a required property for Return and cannot be null"); + throw new ArgumentNullException("varLock isn't a nullable property for Return and cannot be null"); } - this.Lock = varLock; - // to ensure "varAbstract" is required (not null) - if (varAbstract == null) + // to ensure "varUnsafe" (not nullable) is not null + if (varUnsafe.IsSet && varUnsafe.Value == null) { - throw new ArgumentNullException("varAbstract is a required property for Return and cannot be null"); + throw new ArgumentNullException("varUnsafe isn't a nullable property for Return and cannot be null"); } - this.Abstract = varAbstract; this.VarReturn = varReturn; + this.Lock = varLock; + this.Abstract = varAbstract; this.Unsafe = varUnsafe; this.AdditionalProperties = new Dictionary(); } @@ -71,7 +72,7 @@ protected Return() /// Gets or Sets VarReturn /// [DataMember(Name = "return", EmitDefaultValue = false)] - public int VarReturn { get; set; } + public Option VarReturn { get; set; } /// /// Gets or Sets Lock @@ -89,7 +90,7 @@ protected Return() /// Gets or Sets Unsafe /// [DataMember(Name = "unsafe", EmitDefaultValue = false)] - public string Unsafe { get; set; } + public Option Unsafe { get; set; } /// /// Gets or Sets additional properties @@ -152,7 +153,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.VarReturn.GetHashCode(); + if (this.VarReturn.IsSet) + { + hashCode = (hashCode * 59) + this.VarReturn.Value.GetHashCode(); + } if (this.Lock != null) { hashCode = (hashCode * 59) + this.Lock.GetHashCode(); @@ -161,9 +165,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Abstract.GetHashCode(); } - if (this.Unsafe != null) + if (this.Unsafe.IsSet && this.Unsafe.Value != null) { - hashCode = (hashCode * 59) + this.Unsafe.GetHashCode(); + hashCode = (hashCode * 59) + this.Unsafe.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 43f205a0529d..69fa327926c2 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -38,8 +39,18 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// /// roleUuid. /// role. - public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole)) + public RolesReportsHash(Option roleUuid = default(Option), Option role = default(Option)) { + // to ensure "roleUuid" (not nullable) is not null + if (roleUuid.IsSet && roleUuid.Value == null) + { + throw new ArgumentNullException("roleUuid isn't a nullable property for RolesReportsHash and cannot be null"); + } + // to ensure "role" (not nullable) is not null + if (role.IsSet && role.Value == null) + { + throw new ArgumentNullException("role isn't a nullable property for RolesReportsHash and cannot be null"); + } this.RoleUuid = roleUuid; this.Role = role; this.AdditionalProperties = new Dictionary(); @@ -49,13 +60,13 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// Gets or Sets RoleUuid /// [DataMember(Name = "role_uuid", EmitDefaultValue = false)] - public Guid RoleUuid { get; set; } + public Option RoleUuid { get; set; } /// /// Gets or Sets Role /// [DataMember(Name = "role", EmitDefaultValue = false)] - public RolesReportsHashRole Role { get; set; } + public Option Role { get; set; } /// /// Gets or Sets additional properties @@ -116,13 +127,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RoleUuid != null) + if (this.RoleUuid.IsSet && this.RoleUuid.Value != null) { - hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.RoleUuid.Value.GetHashCode(); } - if (this.Role != null) + if (this.Role.IsSet && this.Role.Value != null) { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); + hashCode = (hashCode * 59) + this.Role.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 217f538e0a90..3e1140cc139a 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Initializes a new instance of the class. /// /// name. - public RolesReportsHashRole(string name = default(string)) + public RolesReportsHashRole(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for RolesReportsHashRole and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index be7027373c76..edb4b3b74a7f 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -48,17 +49,17 @@ protected ScaleneTriangle() /// triangleType (required). public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ScaleneTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for ScaleneTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs index baf7c736005d..a7bc00565999 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 41366a1d82dd..964fd114389e 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -47,10 +48,10 @@ protected ShapeInterface() /// shapeType (required). public ShapeInterface(string shapeType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 77cc69fcdf36..69a982f0536b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index f775230a9b19..12b6df09103b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -48,17 +49,17 @@ protected SimpleQuadrilateral() /// quadrilateralType (required). public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index e1e27974a67b..a4434d474515 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -38,8 +39,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// /// specialPropertyName. /// varSpecialModelName. - public SpecialModelName(long specialPropertyName = default(long), string varSpecialModelName = default(string)) + public SpecialModelName(Option specialPropertyName = default(Option), Option varSpecialModelName = default(Option)) { + // to ensure "varSpecialModelName" (not nullable) is not null + if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) + { + throw new ArgumentNullException("varSpecialModelName isn't a nullable property for SpecialModelName and cannot be null"); + } this.SpecialPropertyName = specialPropertyName; this.VarSpecialModelName = varSpecialModelName; this.AdditionalProperties = new Dictionary(); @@ -49,13 +55,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// Gets or Sets SpecialPropertyName /// [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] - public long SpecialPropertyName { get; set; } + public Option SpecialPropertyName { get; set; } /// /// Gets or Sets VarSpecialModelName /// [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string VarSpecialModelName { get; set; } + public Option VarSpecialModelName { get; set; } /// /// Gets or Sets additional properties @@ -116,10 +122,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.VarSpecialModelName != null) + if (this.SpecialPropertyName.IsSet) + { + hashCode = (hashCode * 59) + this.SpecialPropertyName.Value.GetHashCode(); + } + if (this.VarSpecialModelName.IsSet && this.VarSpecialModelName.Value != null) { - hashCode = (hashCode * 59) + this.VarSpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.VarSpecialModelName.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs index ab8f5e0db099..b8283df15790 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -38,8 +39,13 @@ public partial class Tag : IEquatable, IValidatableObject /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this.Id = id; this.Name = name; this.AdditionalProperties = new Dictionary(); @@ -49,13 +55,13 @@ public partial class Tag : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -116,10 +122,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index ca1cb65fcb24..f68a75c20086 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class TestCollectionEndingWithWordList : IEquatable class. /// /// value. - public TestCollectionEndingWithWordList(string value = default(string)) + public TestCollectionEndingWithWordList(Option value = default(Option)) { + // to ensure "value" (not nullable) is not null + if (value.IsSet && value.Value == null) + { + throw new ArgumentNullException("value isn't a nullable property for TestCollectionEndingWithWordList and cannot be null"); + } this.Value = value; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class TestCollectionEndingWithWordList : IEquatable [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } + public Option Value { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Value != null) + if (this.Value.IsSet && this.Value.Value != null) { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index b5a65aac0252..46e26eaa65c9 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable class. /// /// testCollectionEndingWithWordList. - public TestCollectionEndingWithWordListObject(List testCollectionEndingWithWordList = default(List)) + public TestCollectionEndingWithWordListObject(Option> testCollectionEndingWithWordList = default(Option>)) { + // to ensure "testCollectionEndingWithWordList" (not nullable) is not null + if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) + { + throw new ArgumentNullException("testCollectionEndingWithWordList isn't a nullable property for TestCollectionEndingWithWordListObject and cannot be null"); + } this.TestCollectionEndingWithWordList = testCollectionEndingWithWordList; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable [DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)] - public List TestCollectionEndingWithWordList { get; set; } + public Option> TestCollectionEndingWithWordList { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.TestCollectionEndingWithWordList != null) + if (this.TestCollectionEndingWithWordList.IsSet && this.TestCollectionEndingWithWordList.Value != null) { - hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.GetHashCode(); + hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 7b15b1340456..65c424f89536 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,13 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Initializes a new instance of the class. /// /// someProperty. - public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) + public TestInlineFreeformAdditionalPropertiesRequest(Option someProperty = default(Option)) { + // to ensure "someProperty" (not nullable) is not null + if (someProperty.IsSet && someProperty.Value == null) + { + throw new ArgumentNullException("someProperty isn't a nullable property for TestInlineFreeformAdditionalPropertiesRequest and cannot be null"); + } this.SomeProperty = someProperty; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Gets or Sets SomeProperty /// [DataMember(Name = "someProperty", EmitDefaultValue = false)] - public string SomeProperty { get; set; } + public Option SomeProperty { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SomeProperty != null) + if (this.SomeProperty.IsSet && this.SomeProperty.Value != null) { - hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.SomeProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index bd8e6abfd667..e0580dfbdced 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index acdf3e8a0505..06a664670f04 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -47,10 +48,10 @@ protected TriangleInterface() /// triangleType (required). public TriangleInterface(string triangleType = default(string)) { - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs index 2356f9020cc8..af00e176628c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -48,8 +49,43 @@ public partial class User : IEquatable, IValidatableObject /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) + public User(Option id = default(Option), Option username = default(Option), Option firstName = default(Option), Option lastName = default(Option), Option email = default(Option), Option password = default(Option), Option phone = default(Option), Option userStatus = default(Option), Option objectWithNoDeclaredProps = default(Option), Option objectWithNoDeclaredPropsNullable = default(Option), Option anyTypeProp = default(Option), Option anyTypePropNullable = default(Option)) { + // to ensure "username" (not nullable) is not null + if (username.IsSet && username.Value == null) + { + throw new ArgumentNullException("username isn't a nullable property for User and cannot be null"); + } + // to ensure "firstName" (not nullable) is not null + if (firstName.IsSet && firstName.Value == null) + { + throw new ArgumentNullException("firstName isn't a nullable property for User and cannot be null"); + } + // to ensure "lastName" (not nullable) is not null + if (lastName.IsSet && lastName.Value == null) + { + throw new ArgumentNullException("lastName isn't a nullable property for User and cannot be null"); + } + // to ensure "email" (not nullable) is not null + if (email.IsSet && email.Value == null) + { + throw new ArgumentNullException("email isn't a nullable property for User and cannot be null"); + } + // to ensure "password" (not nullable) is not null + if (password.IsSet && password.Value == null) + { + throw new ArgumentNullException("password isn't a nullable property for User and cannot be null"); + } + // to ensure "phone" (not nullable) is not null + if (phone.IsSet && phone.Value == null) + { + throw new ArgumentNullException("phone isn't a nullable property for User and cannot be null"); + } + // to ensure "objectWithNoDeclaredProps" (not nullable) is not null + if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) + { + throw new ArgumentNullException("objectWithNoDeclaredProps isn't a nullable property for User and cannot be null"); + } this.Id = id; this.Username = username; this.FirstName = firstName; @@ -69,78 +105,78 @@ public partial class User : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Username /// [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } + public Option Username { get; set; } /// /// Gets or Sets FirstName /// [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } + public Option FirstName { get; set; } /// /// Gets or Sets LastName /// [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } + public Option LastName { get; set; } /// /// Gets or Sets Email /// [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } + public Option Email { get; set; } /// /// Gets or Sets Password /// [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } + public Option Password { get; set; } /// /// Gets or Sets Phone /// [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } + public Option Phone { get; set; } /// /// User Status /// /// User Status [DataMember(Name = "userStatus", EmitDefaultValue = false)] - public int UserStatus { get; set; } + public Option UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] - public Object ObjectWithNoDeclaredProps { get; set; } + public Option ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] - public Object ObjectWithNoDeclaredPropsNullable { get; set; } + public Option ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] - public Object AnyTypeProp { get; set; } + public Option AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] - public Object AnyTypePropNullable { get; set; } + public Option AnyTypePropNullable { get; set; } /// /// Gets or Sets additional properties @@ -211,47 +247,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Username.IsSet && this.Username.Value != null) + { + hashCode = (hashCode * 59) + this.Username.Value.GetHashCode(); + } + if (this.FirstName.IsSet && this.FirstName.Value != null) { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); + hashCode = (hashCode * 59) + this.FirstName.Value.GetHashCode(); } - if (this.FirstName != null) + if (this.LastName.IsSet && this.LastName.Value != null) { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.LastName.Value.GetHashCode(); } - if (this.LastName != null) + if (this.Email.IsSet && this.Email.Value != null) { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + hashCode = (hashCode * 59) + this.Email.Value.GetHashCode(); } - if (this.Email != null) + if (this.Password.IsSet && this.Password.Value != null) { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); + hashCode = (hashCode * 59) + this.Password.Value.GetHashCode(); } - if (this.Password != null) + if (this.Phone.IsSet && this.Phone.Value != null) { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); + hashCode = (hashCode * 59) + this.Phone.Value.GetHashCode(); } - if (this.Phone != null) + if (this.UserStatus.IsSet) { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); + hashCode = (hashCode * 59) + this.UserStatus.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) + if (this.ObjectWithNoDeclaredProps.IsSet && this.ObjectWithNoDeclaredProps.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.Value.GetHashCode(); } - if (this.ObjectWithNoDeclaredPropsNullable != null) + if (this.ObjectWithNoDeclaredPropsNullable.IsSet && this.ObjectWithNoDeclaredPropsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.Value.GetHashCode(); } - if (this.AnyTypeProp != null) + if (this.AnyTypeProp.IsSet && this.AnyTypeProp.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypeProp.Value.GetHashCode(); } - if (this.AnyTypePropNullable != null) + if (this.AnyTypePropNullable.IsSet && this.AnyTypePropNullable.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypePropNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 1a6e079fdab0..e4b135741f99 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -47,16 +48,16 @@ protected Whale() /// hasBaleen. /// hasTeeth. /// className (required). - public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) + public Whale(Option hasBaleen = default(Option), Option hasTeeth = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Whale and cannot be null"); } - this.ClassName = className; this.HasBaleen = hasBaleen; this.HasTeeth = hasTeeth; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -64,13 +65,13 @@ protected Whale() /// Gets or Sets HasBaleen /// [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] - public bool HasBaleen { get; set; } + public Option HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] - public bool HasTeeth { get; set; } + public Option HasTeeth { get; set; } /// /// Gets or Sets ClassName @@ -138,8 +139,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); + if (this.HasBaleen.IsSet) + { + hashCode = (hashCode * 59) + this.HasBaleen.Value.GetHashCode(); + } + if (this.HasTeeth.IsSet) + { + hashCode = (hashCode * 59) + this.HasTeeth.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 08064bb5591c..0291d92c2813 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -63,7 +64,7 @@ public enum TypeEnum /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } + public Option Type { get; set; } /// /// Initializes a new instance of the class. /// @@ -77,15 +78,15 @@ protected Zebra() /// /// type. /// className (required). - public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) + public Zebra(Option type = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Zebra and cannot be null"); } - this.ClassName = className; this.Type = type; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -154,7 +155,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Type.IsSet) + { + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs index ad2811901556..9c9e494497e1 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 3dbc0012d591..7c1fbbbf47dc 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -57,12 +58,12 @@ public enum ZeroBasedEnumEnum /// Gets or Sets ZeroBasedEnum /// [DataMember(Name = "ZeroBasedEnum", EmitDefaultValue = false)] - public ZeroBasedEnumEnum? ZeroBasedEnum { get; set; } + public Option ZeroBasedEnum { get; set; } /// /// Initializes a new instance of the class. /// /// zeroBasedEnum. - public ZeroBasedEnumClass(ZeroBasedEnumEnum? zeroBasedEnum = default(ZeroBasedEnumEnum?)) + public ZeroBasedEnumClass(Option zeroBasedEnum = default(Option)) { this.ZeroBasedEnum = zeroBasedEnum; this.AdditionalProperties = new Dictionary(); @@ -126,7 +127,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.ZeroBasedEnum.GetHashCode(); + if (this.ZeroBasedEnum.IsSet) + { + hashCode = (hashCode * 59) + this.ZeroBasedEnum.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/.openapi-generator/FILES index f05700009ef9..4166de88acad 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/.openapi-generator/FILES @@ -34,6 +34,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/PetApi.cs index 2cfaf9e7d492..25891171c9ab 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/PetApi.cs @@ -55,7 +55,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); + void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Deletes a pet @@ -68,7 +68,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); + ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Finds Pets by status /// @@ -169,7 +169,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -183,7 +183,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// uploads an image /// @@ -193,7 +193,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image @@ -207,7 +207,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -254,7 +254,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -268,7 +268,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -384,7 +384,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -399,7 +399,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -413,7 +413,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -428,7 +428,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -573,9 +573,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -664,9 +662,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -739,7 +735,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int /// (optional) /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) + public void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -752,8 +748,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -776,9 +776,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -824,7 +824,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -838,8 +838,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -863,9 +867,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -927,9 +931,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1016,9 +1018,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1107,9 +1107,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1198,9 +1196,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1431,9 +1427,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1522,9 +1516,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1598,7 +1590,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i /// Updated status of the pet (optional) /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1612,8 +1604,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1637,13 +1637,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1690,7 +1690,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1705,8 +1705,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1731,13 +1739,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1784,7 +1792,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1799,8 +1807,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1825,13 +1841,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -1878,7 +1894,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1894,8 +1910,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1921,13 +1945,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/StoreApi.cs index 3fb02496f77a..c739531183e9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/StoreApi.cs @@ -364,9 +364,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -434,9 +432,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -775,9 +771,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -849,9 +843,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/UserApi.cs index 9f568eb988dc..d1832bfdff4d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Api/UserApi.cs @@ -552,9 +552,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -628,9 +626,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -704,9 +700,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -780,9 +774,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -856,9 +848,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -932,9 +922,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1008,9 +996,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1083,9 +1069,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1159,9 +1143,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1232,9 +1214,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1307,15 +1287,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1389,15 +1365,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1602,15 +1574,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1687,15 +1655,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs index 7d3e7d96adf3..41859f5274dc 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs @@ -32,6 +32,7 @@ using Polly; using Org.OpenAPITools.Client.Auth; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -51,7 +52,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -185,7 +187,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..6690d6ae7199 --- /dev/null +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,124 @@ +// +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + Type innerType = value.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/ApiResponse.cs index ef964fd4e870..370380770898 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,18 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// code. /// type. /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) + public ApiResponse(Option code = default(Option), Option type = default(Option), Option message = default(Option)) { + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for ApiResponse and cannot be null"); + } + // to ensure "message" (not nullable) is not null + if (message.IsSet && message.Value == null) + { + throw new ArgumentNullException("message isn't a nullable property for ApiResponse and cannot be null"); + } this.Code = code; this.Type = type; this.Message = message; @@ -49,19 +60,19 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// Gets or Sets Code /// [DataMember(Name = "code", EmitDefaultValue = false)] - public int Code { get; set; } + public Option Code { get; set; } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + public Option Type { get; set; } /// /// Gets or Sets Message /// [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } + public Option Message { get; set; } /// /// Returns the string presentation of the object @@ -116,14 +127,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) + if (this.Code.IsSet) + { + hashCode = (hashCode * 59) + this.Code.Value.GetHashCode(); + } + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.Message != null) + if (this.Message.IsSet && this.Message.Value != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this.Message.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Category.cs index 663e49f1b1c1..f207a3688e86 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Category.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Category : IEquatable, IValidatableObject /// /// id. /// name. - public Category(long id = default(long), string name = default(string)) + public Category(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); + } this.Id = id; this.Name = name; } @@ -47,13 +53,13 @@ public partial class Category : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -107,10 +113,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Order.cs index 4c049227f843..2acb794ff4a5 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Order.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// Order Status [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -74,45 +75,50 @@ public enum StatusEnum /// shipDate. /// Order Status. /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) + public Order(Option id = default(Option), Option petId = default(Option), Option quantity = default(Option), Option shipDate = default(Option), Option status = default(Option), Option complete = default(Option)) { + // to ensure "shipDate" (not nullable) is not null + if (shipDate.IsSet && shipDate.Value == null) + { + throw new ArgumentNullException("shipDate isn't a nullable property for Order and cannot be null"); + } this.Id = id; this.PetId = petId; this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - this.Complete = complete; + this.Complete = complete.IsSet ? complete : new Option(false); } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets PetId /// [DataMember(Name = "petId", EmitDefaultValue = false)] - public long PetId { get; set; } + public Option PetId { get; set; } /// /// Gets or Sets Quantity /// [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int Quantity { get; set; } + public Option Quantity { get; set; } /// /// Gets or Sets ShipDate /// [DataMember(Name = "shipDate", EmitDefaultValue = false)] - public DateTime ShipDate { get; set; } + public Option ShipDate { get; set; } /// /// Gets or Sets Complete /// [DataMember(Name = "complete", EmitDefaultValue = true)] - public bool Complete { get; set; } + public Option Complete { get; set; } /// /// Returns the string presentation of the object @@ -170,15 +176,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.PetId.IsSet) + { + hashCode = (hashCode * 59) + this.PetId.Value.GetHashCode(); + } + if (this.Quantity.IsSet) + { + hashCode = (hashCode * 59) + this.Quantity.Value.GetHashCode(); + } + if (this.ShipDate.IsSet && this.ShipDate.Value != null) + { + hashCode = (hashCode * 59) + this.ShipDate.Value.GetHashCode(); + } + if (this.Status.IsSet) + { + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); + } + if (this.Complete.IsSet) { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); + hashCode = (hashCode * 59) + this.Complete.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Pet.cs index f42bc15e4555..2906de6e142b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Pet.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -65,7 +66,7 @@ public enum StatusEnum /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] [Obsolete] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -80,22 +81,32 @@ protected Pet() { } /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), Option category = default(Option), string name = default(string), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this.Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this.PhotoUrls = photoUrls; this.Id = id; this.Category = category; + this.Name = name; + this.PhotoUrls = photoUrls; this.Tags = tags; this.Status = status; } @@ -104,13 +115,13 @@ protected Pet() { } /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category { get; set; } + public Option Category { get; set; } /// /// Gets or Sets Name @@ -129,7 +140,7 @@ protected Pet() { } /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags { get; set; } + public Option> Tags { get; set; } /// /// Returns the string presentation of the object @@ -187,10 +198,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.Name != null) { @@ -200,11 +214,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Tag.cs index 8ac7c07be0ac..f144c9884662 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Tag.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Tag : IEquatable, IValidatableObject /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this.Id = id; this.Name = name; } @@ -47,13 +53,13 @@ public partial class Tag : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -107,10 +113,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/User.cs index 91ba71b2274c..06681606fbb9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/User.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,8 +44,38 @@ public partial class User : IEquatable, IValidatableObject /// password. /// phone. /// User Status. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int)) + public User(Option id = default(Option), Option username = default(Option), Option firstName = default(Option), Option lastName = default(Option), Option email = default(Option), Option password = default(Option), Option phone = default(Option), Option userStatus = default(Option)) { + // to ensure "username" (not nullable) is not null + if (username.IsSet && username.Value == null) + { + throw new ArgumentNullException("username isn't a nullable property for User and cannot be null"); + } + // to ensure "firstName" (not nullable) is not null + if (firstName.IsSet && firstName.Value == null) + { + throw new ArgumentNullException("firstName isn't a nullable property for User and cannot be null"); + } + // to ensure "lastName" (not nullable) is not null + if (lastName.IsSet && lastName.Value == null) + { + throw new ArgumentNullException("lastName isn't a nullable property for User and cannot be null"); + } + // to ensure "email" (not nullable) is not null + if (email.IsSet && email.Value == null) + { + throw new ArgumentNullException("email isn't a nullable property for User and cannot be null"); + } + // to ensure "password" (not nullable) is not null + if (password.IsSet && password.Value == null) + { + throw new ArgumentNullException("password isn't a nullable property for User and cannot be null"); + } + // to ensure "phone" (not nullable) is not null + if (phone.IsSet && phone.Value == null) + { + throw new ArgumentNullException("phone isn't a nullable property for User and cannot be null"); + } this.Id = id; this.Username = username; this.FirstName = firstName; @@ -59,50 +90,50 @@ public partial class User : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Username /// [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } + public Option Username { get; set; } /// /// Gets or Sets FirstName /// [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } + public Option FirstName { get; set; } /// /// Gets or Sets LastName /// [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } + public Option LastName { get; set; } /// /// Gets or Sets Email /// [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } + public Option Email { get; set; } /// /// Gets or Sets Password /// [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } + public Option Password { get; set; } /// /// Gets or Sets Phone /// [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } + public Option Phone { get; set; } /// /// User Status /// /// User Status [DataMember(Name = "userStatus", EmitDefaultValue = false)] - public int UserStatus { get; set; } + public Option UserStatus { get; set; } /// /// Returns the string presentation of the object @@ -162,32 +193,38 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Username.IsSet && this.Username.Value != null) + { + hashCode = (hashCode * 59) + this.Username.Value.GetHashCode(); + } + if (this.FirstName.IsSet && this.FirstName.Value != null) { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); + hashCode = (hashCode * 59) + this.FirstName.Value.GetHashCode(); } - if (this.FirstName != null) + if (this.LastName.IsSet && this.LastName.Value != null) { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.LastName.Value.GetHashCode(); } - if (this.LastName != null) + if (this.Email.IsSet && this.Email.Value != null) { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + hashCode = (hashCode * 59) + this.Email.Value.GetHashCode(); } - if (this.Email != null) + if (this.Password.IsSet && this.Password.Value != null) { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); + hashCode = (hashCode * 59) + this.Password.Value.GetHashCode(); } - if (this.Password != null) + if (this.Phone.IsSet && this.Phone.Value != null) { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); + hashCode = (hashCode * 59) + this.Phone.Value.GetHashCode(); } - if (this.Phone != null) + if (this.UserStatus.IsSet) { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); + hashCode = (hashCode * 59) + this.UserStatus.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/.openapi-generator/FILES index c6424794961a..e662c2362228 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/.openapi-generator/FILES @@ -132,6 +132,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FakeApi.md index 06309f31e8a5..b926dc908fd9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool? body = null) +> bool FakeOuterBooleanSerialize (bool body = null) @@ -134,7 +134,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = true; // bool? | Input boolean as post body (optional) + var body = true; // bool | Input boolean as post body (optional) try { @@ -175,7 +175,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **bool?** | Input boolean as post body | [optional] | +| **body** | **bool** | Input boolean as post body | [optional] | ### Return type @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal? body = null) +> decimal FakeOuterNumberSerialize (decimal body = null) @@ -312,7 +312,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14D; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal | Input number as post body (optional) try { @@ -353,7 +353,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **decimal?** | Input number as post body | [optional] | +| **body** | **decimal** | Input number as post body | [optional] | ### Return type @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1098,14 +1098,14 @@ namespace Example var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789L; // long? | None (optional) - var varFloat = 3.4F; // float? | None (optional) + var integer = 56; // int | None (optional) + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var varFloat = 3.4F; // float | None (optional) var varString = "varString_example"; // string | None (optional) var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) @@ -1150,14 +1150,14 @@ catch (ApiException e) | **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int?** | None | [optional] | -| **int32** | **int?** | None | [optional] | -| **int64** | **long?** | None | [optional] | -| **varFloat** | **float?** | None | [optional] | +| **integer** | **int** | None | [optional] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **varFloat** | **float** | None | [optional] | | **varString** | **string** | None | [optional] | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | -| **date** | **DateTime?** | None | [optional] | -| **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **date** | **DateTime** | None | [optional] | +| **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | | **password** | **string** | None | [optional] | | **callback** | **string** | None | [optional] | @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -1212,8 +1212,8 @@ namespace Example var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -1258,8 +1258,8 @@ catch (ApiException e) | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | -| **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | | **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) Fake endpoint to test group parameters (optional) @@ -1316,9 +1316,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789L; // long? | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) + var booleanGroup = true; // bool | Boolean in group parameters (optional) + var int64Group = 789L; // long | Integer in group parameters (optional) try { @@ -1360,9 +1360,9 @@ catch (ApiException e) | **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | -| **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | -| **int64Group** | **long?** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | +| **booleanGroup** | **bool** | Boolean in group parameters | [optional] | +| **int64Group** | **long** | Integer in group parameters | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/RequiredClass.md b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/RequiredClass.md index 07b6f018f6c1..3400459756d2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/RequiredClass.md +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/RequiredClass.md @@ -33,8 +33,8 @@ Name | Type | Description | Notes **NotrequiredNullableEnumIntegerOnly** | **int?** | | [optional] **NotrequiredNotnullableEnumIntegerOnly** | **int** | | [optional] **RequiredNotnullableEnumString** | **string** | | -**RequiredNullableEnumString** | **string** | | -**NotrequiredNullableEnumString** | **string** | | [optional] +**RequiredNullableEnumString** | **string?** | | +**NotrequiredNullableEnumString** | **string?** | | [optional] **NotrequiredNotnullableEnumString** | **string** | | [optional] **RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | **RequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 95d41fcbd942..3437138cacd2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -301,9 +299,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs index 354f9eb6d9f2..11aeb829749a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -517,9 +517,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -588,9 +586,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index 82d3054c5a90..85535bfbd190 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -55,7 +55,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); + bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -67,7 +67,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -78,7 +78,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0); /// /// @@ -90,7 +90,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0); /// /// /// @@ -101,7 +101,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); + decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -113,7 +113,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -125,7 +125,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// string - string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string), int operationIndex = 0); + string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// @@ -138,7 +138,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string), int operationIndex = 0); + ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// Array of Enums /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -329,7 +329,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// To test enum parameters /// @@ -347,7 +347,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// To test enum parameters @@ -366,7 +366,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -382,7 +382,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -399,7 +399,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// test inline additionalProperties /// @@ -480,7 +480,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// @@ -500,7 +500,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// test referenced string map /// @@ -564,7 +564,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -577,7 +577,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -589,7 +589,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -602,7 +602,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -614,7 +614,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -627,7 +627,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -640,7 +640,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -654,7 +654,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -850,7 +850,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -876,7 +876,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -895,7 +895,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -915,7 +915,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -932,7 +932,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -950,7 +950,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -1047,7 +1047,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -1068,7 +1068,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test referenced string map /// @@ -1347,7 +1347,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) + public bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1360,7 +1360,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1413,7 +1413,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1427,7 +1427,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1481,7 +1481,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1494,8 +1494,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1547,7 +1551,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1561,8 +1565,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1615,7 +1623,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) + public decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1628,7 +1636,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1681,7 +1689,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1695,7 +1703,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1750,7 +1758,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string), int operationIndex = 0) + public string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, body); return localVarResponse.Data; @@ -1764,8 +1772,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1819,7 +1835,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(requiredStringUuid, body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1834,8 +1850,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2283,9 +2307,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2354,9 +2376,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2425,9 +2445,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2496,9 +2514,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2569,15 +2585,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2649,15 +2661,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2728,9 +2736,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2801,9 +2807,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2870,7 +2874,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); } @@ -2895,19 +2899,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2931,49 +2955,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3021,7 +3045,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEndpointParametersWithHttpInfoAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3047,19 +3071,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3084,49 +3128,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3168,7 +3212,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -3187,8 +3231,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -3211,37 +3279,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3277,7 +3345,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3297,8 +3365,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3322,37 +3414,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3386,7 +3478,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -3403,7 +3495,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3428,18 +3520,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3479,7 +3571,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3497,7 +3589,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3523,18 +3615,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3585,9 +3677,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3656,9 +3746,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3727,9 +3815,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3798,9 +3884,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3871,15 +3955,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3951,15 +4031,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4021,7 +4097,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } @@ -4041,49 +4117,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4113,13 +4183,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4156,7 +4226,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -4177,49 +4247,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4250,13 +4314,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4301,9 +4365,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4372,9 +4434,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index dd74c66d1544..9f168cc6adb2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -306,9 +304,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs index 7a34dc4fe192..20b583356df9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs @@ -55,7 +55,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); + void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Deletes a pet @@ -68,7 +68,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); + ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Finds Pets by status /// @@ -169,7 +169,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -183,7 +183,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// uploads an image /// @@ -193,7 +193,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image @@ -207,7 +207,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image (required) /// @@ -217,7 +217,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); /// /// uploads an image (required) @@ -231,7 +231,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -278,7 +278,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -292,7 +292,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -408,7 +408,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -423,7 +423,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -437,7 +437,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -452,7 +452,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -466,7 +466,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -481,7 +481,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -625,9 +625,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -729,9 +727,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -818,7 +814,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) + public void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -831,8 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -855,9 +855,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -903,7 +903,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -917,8 +917,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -942,9 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -1006,9 +1010,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1111,9 +1113,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1218,9 +1218,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,9 +1323,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1583,9 +1579,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1687,9 +1681,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1777,7 +1769,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1791,8 +1783,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1816,13 +1816,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1869,7 +1869,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1884,8 +1884,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1910,13 +1918,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1963,7 +1971,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1978,8 +1986,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2004,13 +2020,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2057,7 +2073,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2073,8 +2089,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2100,13 +2124,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2153,7 +2177,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -2168,13 +2192,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2201,9 +2227,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); @@ -2251,7 +2277,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2267,13 +2293,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2301,9 +2329,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs index e8bed0a150ec..1ffc5a694f5b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -364,9 +364,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -434,9 +432,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -775,9 +771,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -849,9 +843,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index 8efb827cdc00..3a89a6e99556 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -552,9 +552,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -623,9 +621,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -694,9 +690,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -765,9 +759,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -836,9 +828,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -907,9 +897,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -978,9 +966,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1048,9 +1034,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1119,9 +1103,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1192,9 +1174,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1267,15 +1247,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1349,15 +1325,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1552,15 +1524,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1632,15 +1600,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index a55d7f34afc6..9c2644600398 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -32,6 +32,7 @@ using Polly; using Org.OpenAPITools.Client.Auth; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -51,7 +52,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -185,7 +187,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..722d06c6b323 --- /dev/null +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,124 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + Type innerType = value.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 08a39249cb82..64ec72ede072 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class Activity : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// activityOutputs. - public Activity(Dictionary> activityOutputs = default(Dictionary>)) + public Activity(Option>> activityOutputs = default(Option>>)) { + // to ensure "activityOutputs" (not nullable) is not null + if (activityOutputs.IsSet && activityOutputs.Value == null) + { + throw new ArgumentNullException("activityOutputs isn't a nullable property for Activity and cannot be null"); + } this.ActivityOutputs = activityOutputs; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class Activity : IEquatable, IValidatableObject /// Gets or Sets ActivityOutputs /// [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] - public Dictionary> ActivityOutputs { get; set; } + public Option>> ActivityOutputs { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActivityOutputs != null) + if (this.ActivityOutputs.IsSet && this.ActivityOutputs.Value != null) { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); + hashCode = (hashCode * 59) + this.ActivityOutputs.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index dce3f9134dbb..1b186a8771ed 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class ActivityOutputElementRepresentation : IEquatable /// prop1. /// prop2. - public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + public ActivityOutputElementRepresentation(Option prop1 = default(Option), Option prop2 = default(Option)) { + // to ensure "prop1" (not nullable) is not null + if (prop1.IsSet && prop1.Value == null) + { + throw new ArgumentNullException("prop1 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } + // to ensure "prop2" (not nullable) is not null + if (prop2.IsSet && prop2.Value == null) + { + throw new ArgumentNullException("prop2 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } this.Prop1 = prop1; this.Prop2 = prop2; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class ActivityOutputElementRepresentation : IEquatable [DataMember(Name = "prop1", EmitDefaultValue = false)] - public string Prop1 { get; set; } + public Option Prop1 { get; set; } /// /// Gets or Sets Prop2 /// [DataMember(Name = "prop2", EmitDefaultValue = false)] - public Object Prop2 { get; set; } + public Option Prop2 { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Prop1 != null) + if (this.Prop1.IsSet && this.Prop1.Value != null) { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop1.Value.GetHashCode(); } - if (this.Prop2 != null) + if (this.Prop2.IsSet && this.Prop2.Value != null) { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop2.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index c83597fc607e..c84fba57b967 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,8 +44,43 @@ public partial class AdditionalPropertiesClass : IEquatablemapWithUndeclaredPropertiesAnytype3. /// an object with no declared properties and no undeclared properties, hence it's an empty map.. /// mapWithUndeclaredPropertiesString. - public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) + public AdditionalPropertiesClass(Option> mapProperty = default(Option>), Option>> mapOfMapProperty = default(Option>>), Option anytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype2 = default(Option), Option> mapWithUndeclaredPropertiesAnytype3 = default(Option>), Option emptyMap = default(Option), Option> mapWithUndeclaredPropertiesString = default(Option>)) { + // to ensure "mapProperty" (not nullable) is not null + if (mapProperty.IsSet && mapProperty.Value == null) + { + throw new ArgumentNullException("mapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapOfMapProperty" (not nullable) is not null + if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) + { + throw new ArgumentNullException("mapOfMapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype1" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype2" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype3" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "emptyMap" (not nullable) is not null + if (emptyMap.IsSet && emptyMap.Value == null) + { + throw new ArgumentNullException("emptyMap isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesString" (not nullable) is not null + if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesString isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } this.MapProperty = mapProperty; this.MapOfMapProperty = mapOfMapProperty; this.Anytype1 = anytype1; @@ -60,50 +96,50 @@ public partial class AdditionalPropertiesClass : IEquatable [DataMember(Name = "map_property", EmitDefaultValue = false)] - public Dictionary MapProperty { get; set; } + public Option> MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] - public Dictionary> MapOfMapProperty { get; set; } + public Option>> MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// [DataMember(Name = "anytype_1", EmitDefaultValue = true)] - public Object Anytype1 { get; set; } + public Option Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } + public Option> MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. [DataMember(Name = "empty_map", EmitDefaultValue = false)] - public Object EmptyMap { get; set; } + public Option EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesString { get; set; } + public Option> MapWithUndeclaredPropertiesString { get; set; } /// /// Gets or Sets additional properties @@ -170,37 +206,37 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapProperty != null) + if (this.MapProperty.IsSet && this.MapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapProperty.Value.GetHashCode(); } - if (this.MapOfMapProperty != null) + if (this.MapOfMapProperty.IsSet && this.MapOfMapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfMapProperty.Value.GetHashCode(); } - if (this.Anytype1 != null) + if (this.Anytype1.IsSet && this.Anytype1.Value != null) { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.Anytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) + if (this.MapWithUndeclaredPropertiesAnytype1.IsSet && this.MapWithUndeclaredPropertiesAnytype1.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) + if (this.MapWithUndeclaredPropertiesAnytype2.IsSet && this.MapWithUndeclaredPropertiesAnytype2.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) + if (this.MapWithUndeclaredPropertiesAnytype3.IsSet && this.MapWithUndeclaredPropertiesAnytype3.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.Value.GetHashCode(); } - if (this.EmptyMap != null) + if (this.EmptyMap.IsSet && this.EmptyMap.Value != null) { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); + hashCode = (hashCode * 59) + this.EmptyMap.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesString != null) + if (this.MapWithUndeclaredPropertiesString.IsSet && this.MapWithUndeclaredPropertiesString.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 9ddb56ebad6c..a9332678ea77 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -49,16 +50,20 @@ protected Animal() /// /// className (required). /// color (default to "red"). - public Animal(string className = default(string), string color = @"red") + public Animal(string className = default(string), Option color = default(Option)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Animal and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for Animal and cannot be null"); } this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? @"red"; + this.Color = color.IsSet ? color : new Option(@"red"); this.AdditionalProperties = new Dictionary(); } @@ -72,7 +77,7 @@ protected Animal() /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Gets or Sets additional properties @@ -137,9 +142,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); } - if (this.Color != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index e55d523aad1f..72fba0eefb19 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,18 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// code. /// type. /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) + public ApiResponse(Option code = default(Option), Option type = default(Option), Option message = default(Option)) { + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for ApiResponse and cannot be null"); + } + // to ensure "message" (not nullable) is not null + if (message.IsSet && message.Value == null) + { + throw new ArgumentNullException("message isn't a nullable property for ApiResponse and cannot be null"); + } this.Code = code; this.Type = type; this.Message = message; @@ -50,19 +61,19 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// Gets or Sets Code /// [DataMember(Name = "code", EmitDefaultValue = false)] - public int Code { get; set; } + public Option Code { get; set; } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + public Option Type { get; set; } /// /// Gets or Sets Message /// [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } + public Option Message { get; set; } /// /// Gets or Sets additional properties @@ -124,14 +135,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) + if (this.Code.IsSet) + { + hashCode = (hashCode * 59) + this.Code.Value.GetHashCode(); + } + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.Message != null) + if (this.Message.IsSet && this.Message.Value != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this.Message.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 8d3f9af56df6..f085a6b77f31 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class Apple : IEquatable, IValidatableObject /// cultivar. /// origin. /// colorCode. - public Apple(string cultivar = default(string), string origin = default(string), string colorCode = default(string)) + public Apple(Option cultivar = default(Option), Option origin = default(Option), Option colorCode = default(Option)) { + // to ensure "cultivar" (not nullable) is not null + if (cultivar.IsSet && cultivar.Value == null) + { + throw new ArgumentNullException("cultivar isn't a nullable property for Apple and cannot be null"); + } + // to ensure "origin" (not nullable) is not null + if (origin.IsSet && origin.Value == null) + { + throw new ArgumentNullException("origin isn't a nullable property for Apple and cannot be null"); + } + // to ensure "colorCode" (not nullable) is not null + if (colorCode.IsSet && colorCode.Value == null) + { + throw new ArgumentNullException("colorCode isn't a nullable property for Apple and cannot be null"); + } this.Cultivar = cultivar; this.Origin = origin; this.ColorCode = colorCode; @@ -50,19 +66,19 @@ public partial class Apple : IEquatable, IValidatableObject /// Gets or Sets Cultivar /// [DataMember(Name = "cultivar", EmitDefaultValue = false)] - public string Cultivar { get; set; } + public Option Cultivar { get; set; } /// /// Gets or Sets Origin /// [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin { get; set; } + public Option Origin { get; set; } /// /// Gets or Sets ColorCode /// [DataMember(Name = "color_code", EmitDefaultValue = false)] - public string ColorCode { get; set; } + public Option ColorCode { get; set; } /// /// Gets or Sets additional properties @@ -124,17 +140,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Cultivar != null) + if (this.Cultivar.IsSet && this.Cultivar.Value != null) { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); + hashCode = (hashCode * 59) + this.Cultivar.Value.GetHashCode(); } - if (this.Origin != null) + if (this.Origin.IsSet && this.Origin.Value != null) { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); + hashCode = (hashCode * 59) + this.Origin.Value.GetHashCode(); } - if (this.ColorCode != null) + if (this.ColorCode.IsSet && this.ColorCode.Value != null) { - hashCode = (hashCode * 59) + this.ColorCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorCode.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index 3eef221be3e3..f2a1e63e3787 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,12 +43,12 @@ protected AppleReq() { } /// /// cultivar (required). /// mealy. - public AppleReq(string cultivar = default(string), bool mealy = default(bool)) + public AppleReq(string cultivar = default(string), Option mealy = default(Option)) { - // to ensure "cultivar" is required (not null) + // to ensure "cultivar" (not nullable) is not null if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); + throw new ArgumentNullException("cultivar isn't a nullable property for AppleReq and cannot be null"); } this.Cultivar = cultivar; this.Mealy = mealy; @@ -63,7 +64,7 @@ protected AppleReq() { } /// Gets or Sets Mealy /// [DataMember(Name = "mealy", EmitDefaultValue = true)] - public bool Mealy { get; set; } + public Option Mealy { get; set; } /// /// Returns the string presentation of the object @@ -121,7 +122,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); + if (this.Mealy.IsSet) + { + hashCode = (hashCode * 59) + this.Mealy.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 3e1666ca90f8..7cc2ebed0e24 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable class. /// /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + public ArrayOfArrayOfNumberOnly(Option>> arrayArrayNumber = default(Option>>)) { + // to ensure "arrayArrayNumber" (not nullable) is not null + if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) + { + throw new ArgumentNullException("arrayArrayNumber isn't a nullable property for ArrayOfArrayOfNumberOnly and cannot be null"); + } this.ArrayArrayNumber = arrayArrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] - public List> ArrayArrayNumber { get; set; } + public Option>> ArrayArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayArrayNumber != null) + if (this.ArrayArrayNumber.IsSet && this.ArrayArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index f2946f435b53..7d85fc169003 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Initializes a new instance of the class. /// /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) + public ArrayOfNumberOnly(Option> arrayNumber = default(Option>)) { + // to ensure "arrayNumber" (not nullable) is not null + if (arrayNumber.IsSet && arrayNumber.Value == null) + { + throw new ArgumentNullException("arrayNumber isn't a nullable property for ArrayOfNumberOnly and cannot be null"); + } this.ArrayNumber = arrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Gets or Sets ArrayNumber /// [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] - public List ArrayNumber { get; set; } + public Option> ArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayNumber != null) + if (this.ArrayNumber.IsSet && this.ArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 343e486f6575..119862eca2e8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// arrayOfString. /// arrayArrayOfInteger. /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + public ArrayTest(Option> arrayOfString = default(Option>), Option>> arrayArrayOfInteger = default(Option>>), Option>> arrayArrayOfModel = default(Option>>)) { + // to ensure "arrayOfString" (not nullable) is not null + if (arrayOfString.IsSet && arrayOfString.Value == null) + { + throw new ArgumentNullException("arrayOfString isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfInteger" (not nullable) is not null + if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) + { + throw new ArgumentNullException("arrayArrayOfInteger isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfModel" (not nullable) is not null + if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) + { + throw new ArgumentNullException("arrayArrayOfModel isn't a nullable property for ArrayTest and cannot be null"); + } this.ArrayOfString = arrayOfString; this.ArrayArrayOfInteger = arrayArrayOfInteger; this.ArrayArrayOfModel = arrayArrayOfModel; @@ -50,19 +66,19 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// Gets or Sets ArrayOfString /// [DataMember(Name = "array_of_string", EmitDefaultValue = false)] - public List ArrayOfString { get; set; } + public Option> ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] - public List> ArrayArrayOfInteger { get; set; } + public Option>> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] - public List> ArrayArrayOfModel { get; set; } + public Option>> ArrayArrayOfModel { get; set; } /// /// Gets or Sets additional properties @@ -124,17 +140,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayOfString != null) + if (this.ArrayOfString.IsSet && this.ArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayOfString.Value.GetHashCode(); } - if (this.ArrayArrayOfInteger != null) + if (this.ArrayArrayOfInteger.IsSet && this.ArrayArrayOfInteger.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.Value.GetHashCode(); } - if (this.ArrayArrayOfModel != null) + if (this.ArrayArrayOfModel.IsSet && this.ArrayArrayOfModel.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfModel.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 04d69550656d..3d6f908c4487 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// lengthCm. - public Banana(decimal lengthCm = default(decimal)) + public Banana(Option lengthCm = default(Option)) { this.LengthCm = lengthCm; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Gets or Sets LengthCm /// [DataMember(Name = "lengthCm", EmitDefaultValue = false)] - public decimal LengthCm { get; set; } + public Option LengthCm { get; set; } /// /// Gets or Sets additional properties @@ -106,7 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); + if (this.LengthCm.IsSet) + { + hashCode = (hashCode * 59) + this.LengthCm.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 360cb5281e80..02703e4025a9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,7 +43,7 @@ protected BananaReq() { } /// /// lengthCm (required). /// sweet. - public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool)) + public BananaReq(decimal lengthCm = default(decimal), Option sweet = default(Option)) { this.LengthCm = lengthCm; this.Sweet = sweet; @@ -58,7 +59,7 @@ protected BananaReq() { } /// Gets or Sets Sweet /// [DataMember(Name = "sweet", EmitDefaultValue = true)] - public bool Sweet { get; set; } + public Option Sweet { get; set; } /// /// Returns the string presentation of the object @@ -113,7 +114,10 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); + if (this.Sweet.IsSet) + { + hashCode = (hashCode * 59) + this.Sweet.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index 868cba98eeea..8771aa57a2b8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected BasquePig() /// className (required). public BasquePig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for BasquePig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index f46fffa0ad6c..46478517456c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -41,8 +42,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// capitalSnake. /// sCAETHFlowPoints. /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) + public Capitalization(Option smallCamel = default(Option), Option capitalCamel = default(Option), Option smallSnake = default(Option), Option capitalSnake = default(Option), Option sCAETHFlowPoints = default(Option), Option aTTNAME = default(Option)) { + // to ensure "smallCamel" (not nullable) is not null + if (smallCamel.IsSet && smallCamel.Value == null) + { + throw new ArgumentNullException("smallCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalCamel" (not nullable) is not null + if (capitalCamel.IsSet && capitalCamel.Value == null) + { + throw new ArgumentNullException("capitalCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "smallSnake" (not nullable) is not null + if (smallSnake.IsSet && smallSnake.Value == null) + { + throw new ArgumentNullException("smallSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalSnake" (not nullable) is not null + if (capitalSnake.IsSet && capitalSnake.Value == null) + { + throw new ArgumentNullException("capitalSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "sCAETHFlowPoints" (not nullable) is not null + if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) + { + throw new ArgumentNullException("sCAETHFlowPoints isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "aTTNAME" (not nullable) is not null + if (aTTNAME.IsSet && aTTNAME.Value == null) + { + throw new ArgumentNullException("aTTNAME isn't a nullable property for Capitalization and cannot be null"); + } this.SmallCamel = smallCamel; this.CapitalCamel = capitalCamel; this.SmallSnake = smallSnake; @@ -56,38 +87,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// Gets or Sets SmallCamel /// [DataMember(Name = "smallCamel", EmitDefaultValue = false)] - public string SmallCamel { get; set; } + public Option SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] - public string CapitalCamel { get; set; } + public Option CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// [DataMember(Name = "small_Snake", EmitDefaultValue = false)] - public string SmallSnake { get; set; } + public Option SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] - public string CapitalSnake { get; set; } + public Option CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] - public string SCAETHFlowPoints { get; set; } + public Option SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] - public string ATT_NAME { get; set; } + public Option ATT_NAME { get; set; } /// /// Gets or Sets additional properties @@ -152,29 +183,29 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SmallCamel != null) + if (this.SmallCamel.IsSet && this.SmallCamel.Value != null) { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallCamel.Value.GetHashCode(); } - if (this.CapitalCamel != null) + if (this.CapitalCamel.IsSet && this.CapitalCamel.Value != null) { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalCamel.Value.GetHashCode(); } - if (this.SmallSnake != null) + if (this.SmallSnake.IsSet && this.SmallSnake.Value != null) { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallSnake.Value.GetHashCode(); } - if (this.CapitalSnake != null) + if (this.CapitalSnake.IsSet && this.CapitalSnake.Value != null) { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalSnake.Value.GetHashCode(); } - if (this.SCAETHFlowPoints != null) + if (this.SCAETHFlowPoints.IsSet && this.SCAETHFlowPoints.Value != null) { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); + hashCode = (hashCode * 59) + this.SCAETHFlowPoints.Value.GetHashCode(); } - if (this.ATT_NAME != null) + if (this.ATT_NAME.IsSet && this.ATT_NAME.Value != null) { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); + hashCode = (hashCode * 59) + this.ATT_NAME.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs index a427b55727d7..c2e163db6026 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,7 +49,7 @@ protected Cat() /// declawed. /// className (required) (default to "Cat"). /// color (default to "red"). - public Cat(bool declawed = default(bool), string className = @"Cat", string color = @"red") : base(className, color) + public Cat(Option declawed = default(Option), string className = @"Cat", Option color = default(Option)) : base(className, color) { this.Declawed = declawed; this.AdditionalProperties = new Dictionary(); @@ -58,7 +59,7 @@ protected Cat() /// Gets or Sets Declawed /// [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed { get; set; } + public Option Declawed { get; set; } /// /// Gets or Sets additional properties @@ -119,7 +120,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); + if (this.Declawed.IsSet) + { + hashCode = (hashCode * 59) + this.Declawed.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs index 5edb4edfea4a..fa5cfbd9a2d5 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,15 +46,15 @@ protected Category() /// /// id. /// name (required) (default to "default-name"). - public Category(long id = default(long), string name = @"default-name") + public Category(Option id = default(Option), string name = @"default-name") { - // to ensure "name" is required (not null) + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); } - this.Name = name; this.Id = id; + this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -61,7 +62,7 @@ protected Category() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name @@ -128,7 +129,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index a5d404bd17d6..fd54f56a6ea9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -66,10 +67,15 @@ protected ChildCat() /// /// name. /// petType (required) (default to PetTypeEnum.ChildCat). - public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() + public ChildCat(Option name = default(Option), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.PetType = petType; + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for ChildCat and cannot be null"); + } this.Name = name; + this.PetType = petType; this.AdditionalProperties = new Dictionary(); } @@ -77,7 +83,7 @@ protected ChildCat() /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -139,9 +145,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.PetType.GetHashCode(); if (this.AdditionalProperties != null) diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 7a0846aec4e1..c7e10769716c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClass. - public ClassModel(string varClass = default(string)) + public ClassModel(Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for ClassModel and cannot be null"); + } this.Class = varClass; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Gets or Sets Class /// [DataMember(Name = "_class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Class != null) + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index bbed21283745..fbabd075d34f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected ComplexQuadrilateral() /// quadrilateralType (required). public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 3c81f50d00d7..3816eb30acd4 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected DanishPig() /// className (required). public DanishPig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for DanishPig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 9933ec57ea9e..3b5f665905e4 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// dateOnlyProperty. - public DateOnlyClass(DateTime dateOnlyProperty = default(DateTime)) + public DateOnlyClass(Option dateOnlyProperty = default(Option)) { + // to ensure "dateOnlyProperty" (not nullable) is not null + if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) + { + throw new ArgumentNullException("dateOnlyProperty isn't a nullable property for DateOnlyClass and cannot be null"); + } this.DateOnlyProperty = dateOnlyProperty; this.AdditionalProperties = new Dictionary(); } @@ -48,7 +54,7 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Fri Jul 21 00:00:00 UTC 2017 [DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOnlyProperty { get; set; } + public Option DateOnlyProperty { get; set; } /// /// Gets or Sets additional properties @@ -108,9 +114,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.DateOnlyProperty != null) + if (this.DateOnlyProperty.IsSet && this.DateOnlyProperty.Value != null) { - hashCode = (hashCode * 59) + this.DateOnlyProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.DateOnlyProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 2895d518a81f..d323606d4072 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Initializes a new instance of the class. /// /// name. - public DeprecatedObject(string name = default(string)) + public DeprecatedObject(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for DeprecatedObject and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 44f95fa0fe05..d638ec7f4551 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,8 +49,13 @@ protected Dog() /// breed. /// className (required) (default to "Dog"). /// color (default to "red"). - public Dog(string breed = default(string), string className = @"Dog", string color = @"red") : base(className, color) + public Dog(Option breed = default(Option), string className = @"Dog", Option color = default(Option)) : base(className, color) { + // to ensure "breed" (not nullable) is not null + if (breed.IsSet && breed.Value == null) + { + throw new ArgumentNullException("breed isn't a nullable property for Dog and cannot be null"); + } this.Breed = breed; this.AdditionalProperties = new Dictionary(); } @@ -58,7 +64,7 @@ protected Dog() /// Gets or Sets Breed /// [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed { get; set; } + public Option Breed { get; set; } /// /// Gets or Sets additional properties @@ -119,9 +125,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) + if (this.Breed.IsSet && this.Breed.Value != null) { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); + hashCode = (hashCode * 59) + this.Breed.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 98c683539e6f..bcb1878282cf 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,18 @@ public partial class Drawing : IEquatable, IValidatableObject /// shapeOrNull. /// nullableShape. /// shapes. - public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) + public Drawing(Option mainShape = default(Option), Option shapeOrNull = default(Option), Option nullableShape = default(Option), Option> shapes = default(Option>)) { + // to ensure "mainShape" (not nullable) is not null + if (mainShape.IsSet && mainShape.Value == null) + { + throw new ArgumentNullException("mainShape isn't a nullable property for Drawing and cannot be null"); + } + // to ensure "shapes" (not nullable) is not null + if (shapes.IsSet && shapes.Value == null) + { + throw new ArgumentNullException("shapes isn't a nullable property for Drawing and cannot be null"); + } this.MainShape = mainShape; this.ShapeOrNull = shapeOrNull; this.NullableShape = nullableShape; @@ -52,25 +63,25 @@ public partial class Drawing : IEquatable, IValidatableObject /// Gets or Sets MainShape /// [DataMember(Name = "mainShape", EmitDefaultValue = false)] - public Shape MainShape { get; set; } + public Option MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// [DataMember(Name = "shapeOrNull", EmitDefaultValue = true)] - public ShapeOrNull ShapeOrNull { get; set; } + public Option ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// [DataMember(Name = "nullableShape", EmitDefaultValue = true)] - public NullableShape NullableShape { get; set; } + public Option NullableShape { get; set; } /// /// Gets or Sets Shapes /// [DataMember(Name = "shapes", EmitDefaultValue = false)] - public List Shapes { get; set; } + public Option> Shapes { get; set; } /// /// Gets or Sets additional properties @@ -133,21 +144,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MainShape != null) + if (this.MainShape.IsSet && this.MainShape.Value != null) { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); + hashCode = (hashCode * 59) + this.MainShape.Value.GetHashCode(); } - if (this.ShapeOrNull != null) + if (this.ShapeOrNull.IsSet && this.ShapeOrNull.Value != null) { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); + hashCode = (hashCode * 59) + this.ShapeOrNull.Value.GetHashCode(); } - if (this.NullableShape != null) + if (this.NullableShape.IsSet && this.NullableShape.Value != null) { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableShape.Value.GetHashCode(); } - if (this.Shapes != null) + if (this.Shapes.IsSet && this.Shapes.Value != null) { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); + hashCode = (hashCode * 59) + this.Shapes.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 2bec93345bb7..569a1bbf1ea4 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,7 +57,7 @@ public enum JustSymbolEnum /// Gets or Sets JustSymbol /// [DataMember(Name = "just_symbol", EmitDefaultValue = false)] - public JustSymbolEnum? JustSymbol { get; set; } + public Option JustSymbol { get; set; } /// /// Defines ArrayEnum /// @@ -81,8 +82,13 @@ public enum ArrayEnumEnum /// /// justSymbol. /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) + public EnumArrays(Option justSymbol = default(Option), Option> arrayEnum = default(Option>)) { + // to ensure "arrayEnum" (not nullable) is not null + if (arrayEnum.IsSet && arrayEnum.Value == null) + { + throw new ArgumentNullException("arrayEnum isn't a nullable property for EnumArrays and cannot be null"); + } this.JustSymbol = justSymbol; this.ArrayEnum = arrayEnum; this.AdditionalProperties = new Dictionary(); @@ -92,7 +98,7 @@ public enum ArrayEnumEnum /// Gets or Sets ArrayEnum /// [DataMember(Name = "array_enum", EmitDefaultValue = false)] - public List ArrayEnum { get; set; } + public Option> ArrayEnum { get; set; } /// /// Gets or Sets additional properties @@ -153,10 +159,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) + if (this.JustSymbol.IsSet) + { + hashCode = (hashCode * 59) + this.JustSymbol.Value.GetHashCode(); + } + if (this.ArrayEnum.IsSet && this.ArrayEnum.Value != null) { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayEnum.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs index c47540b557a3..eb2aa0bd1217 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 27d1193954ea..20e394af4bc2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -92,7 +93,7 @@ public enum EnumStringEnum /// Gets or Sets EnumString /// [DataMember(Name = "enum_string", EmitDefaultValue = false)] - public EnumStringEnum? EnumString { get; set; } + public Option EnumString { get; set; } /// /// Defines EnumStringRequired /// @@ -175,7 +176,7 @@ public enum EnumIntegerEnum /// Gets or Sets EnumInteger /// [DataMember(Name = "enum_integer", EmitDefaultValue = false)] - public EnumIntegerEnum? EnumInteger { get; set; } + public Option EnumInteger { get; set; } /// /// Defines EnumIntegerOnly /// @@ -197,7 +198,7 @@ public enum EnumIntegerOnlyEnum /// Gets or Sets EnumIntegerOnly /// [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] - public EnumIntegerOnlyEnum? EnumIntegerOnly { get; set; } + public Option EnumIntegerOnly { get; set; } /// /// Defines EnumNumber /// @@ -222,31 +223,31 @@ public enum EnumNumberEnum /// Gets or Sets EnumNumber /// [DataMember(Name = "enum_number", EmitDefaultValue = false)] - public EnumNumberEnum? EnumNumber { get; set; } + public Option EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// [DataMember(Name = "outerEnum", EmitDefaultValue = true)] - public OuterEnum? OuterEnum { get; set; } + public Option OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] - public OuterEnumInteger? OuterEnumInteger { get; set; } + public Option OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } + public Option OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } + public Option OuterEnumIntegerDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -267,10 +268,10 @@ protected EnumTest() /// outerEnumInteger. /// outerEnumDefaultValue. /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumIntegerOnlyEnum? enumIntegerOnly = default(EnumIntegerOnlyEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) + public EnumTest(Option enumString = default(Option), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), Option enumInteger = default(Option), Option enumIntegerOnly = default(Option), Option enumNumber = default(Option), Option outerEnum = default(Option), Option outerEnumInteger = default(Option), Option outerEnumDefaultValue = default(Option), Option outerEnumIntegerDefaultValue = default(Option)) { - this.EnumStringRequired = enumStringRequired; this.EnumString = enumString; + this.EnumStringRequired = enumStringRequired; this.EnumInteger = enumInteger; this.EnumIntegerOnly = enumIntegerOnly; this.EnumNumber = enumNumber; @@ -347,15 +348,39 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); + if (this.EnumString.IsSet) + { + hashCode = (hashCode * 59) + this.EnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); + if (this.EnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.EnumInteger.Value.GetHashCode(); + } + if (this.EnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.EnumIntegerOnly.Value.GetHashCode(); + } + if (this.EnumNumber.IsSet) + { + hashCode = (hashCode * 59) + this.EnumNumber.Value.GetHashCode(); + } + if (this.OuterEnum.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnum.Value.GetHashCode(); + } + if (this.OuterEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumInteger.Value.GetHashCode(); + } + if (this.OuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.OuterEnumIntegerDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 7fb0e2094548..26e4c5b5984b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected EquilateralTriangle() /// triangleType (required). public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for EquilateralTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for EquilateralTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs index 72b34e492626..3073d9ce4919 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class File : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// Test capitalization. - public File(string sourceURI = default(string)) + public File(Option sourceURI = default(Option)) { + // to ensure "sourceURI" (not nullable) is not null + if (sourceURI.IsSet && sourceURI.Value == null) + { + throw new ArgumentNullException("sourceURI isn't a nullable property for File and cannot be null"); + } this.SourceURI = sourceURI; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class File : IEquatable, IValidatableObject /// /// Test capitalization [DataMember(Name = "sourceURI", EmitDefaultValue = false)] - public string SourceURI { get; set; } + public Option SourceURI { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SourceURI != null) + if (this.SourceURI.IsSet && this.SourceURI.Value != null) { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); + hashCode = (hashCode * 59) + this.SourceURI.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index cd75dba4a925..bdd81d64aace 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// /// file. /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) + public FileSchemaTestClass(Option file = default(Option), Option> files = default(Option>)) { + // to ensure "file" (not nullable) is not null + if (file.IsSet && file.Value == null) + { + throw new ArgumentNullException("file isn't a nullable property for FileSchemaTestClass and cannot be null"); + } + // to ensure "files" (not nullable) is not null + if (files.IsSet && files.Value == null) + { + throw new ArgumentNullException("files isn't a nullable property for FileSchemaTestClass and cannot be null"); + } this.File = file; this.Files = files; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// Gets or Sets File /// [DataMember(Name = "file", EmitDefaultValue = false)] - public File File { get; set; } + public Option File { get; set; } /// /// Gets or Sets Files /// [DataMember(Name = "files", EmitDefaultValue = false)] - public List Files { get; set; } + public Option> Files { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.File != null) + if (this.File.IsSet && this.File.Value != null) { - hashCode = (hashCode * 59) + this.File.GetHashCode(); + hashCode = (hashCode * 59) + this.File.Value.GetHashCode(); } - if (this.Files != null) + if (this.Files.IsSet && this.Files.Value != null) { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); + hashCode = (hashCode * 59) + this.Files.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 3108c8a86913..d899e3f91fa0 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,14 @@ public partial class Foo : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// bar (default to "bar"). - public Foo(string bar = @"bar") + public Foo(Option bar = default(Option)) { - // use default value if no "bar" provided - this.Bar = bar ?? @"bar"; + // to ensure "bar" (not nullable) is not null + if (bar.IsSet && bar.Value == null) + { + throw new ArgumentNullException("bar isn't a nullable property for Foo and cannot be null"); + } + this.Bar = bar.IsSet ? bar : new Option(@"bar"); this.AdditionalProperties = new Dictionary(); } @@ -47,7 +52,7 @@ public Foo(string bar = @"bar") /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; set; } + public Option Bar { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 1ce81eece3ee..3465ee4146ea 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class FooGetDefaultResponse : IEquatable, /// Initializes a new instance of the class. /// /// varString. - public FooGetDefaultResponse(Foo varString = default(Foo)) + public FooGetDefaultResponse(Option varString = default(Option)) { + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FooGetDefaultResponse and cannot be null"); + } this.String = varString; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class FooGetDefaultResponse : IEquatable, /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public Foo String { get; set; } + public Option String { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.String != null) + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 7158640c24e2..63345fa27a20 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,34 +63,74 @@ protected FormatTest() /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(Option integer = default(Option), Option int32 = default(Option), Option unsignedInteger = default(Option), Option int64 = default(Option), Option unsignedLong = default(Option), decimal number = default(decimal), Option varFloat = default(Option), Option varDouble = default(Option), Option varDecimal = default(Option), Option varString = default(Option), byte[] varByte = default(byte[]), Option binary = default(Option), DateTime date = default(DateTime), Option dateTime = default(Option), Option uuid = default(Option), string password = default(string), Option patternWithDigits = default(Option), Option patternWithDigitsAndDelimiter = default(Option), Option patternWithBackslash = default(Option)) { - this.Number = number; - // to ensure "varByte" is required (not null) + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "varByte" (not nullable) is not null if (varByte == null) { - throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("varByte isn't a nullable property for FormatTest and cannot be null"); } - this.Byte = varByte; - this.Date = date; - // to ensure "password" is required (not null) + // to ensure "binary" (not nullable) is not null + if (binary.IsSet && binary.Value == null) + { + throw new ArgumentNullException("binary isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "date" (not nullable) is not null + if (date == null) + { + throw new ArgumentNullException("date isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "password" (not nullable) is not null if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("password isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigits" (not nullable) is not null + if (patternWithDigits.IsSet && patternWithDigits.Value == null) + { + throw new ArgumentNullException("patternWithDigits isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigitsAndDelimiter" (not nullable) is not null + if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) + { + throw new ArgumentNullException("patternWithDigitsAndDelimiter isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithBackslash" (not nullable) is not null + if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) + { + throw new ArgumentNullException("patternWithBackslash isn't a nullable property for FormatTest and cannot be null"); } - this.Password = password; this.Integer = integer; this.Int32 = int32; this.UnsignedInteger = unsignedInteger; this.Int64 = int64; this.UnsignedLong = unsignedLong; + this.Number = number; this.Float = varFloat; this.Double = varDouble; this.Decimal = varDecimal; this.String = varString; + this.Byte = varByte; this.Binary = binary; + this.Date = date; this.DateTime = dateTime; this.Uuid = uuid; + this.Password = password; this.PatternWithDigits = patternWithDigits; this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; this.PatternWithBackslash = patternWithBackslash; @@ -100,31 +141,31 @@ protected FormatTest() /// Gets or Sets Integer /// [DataMember(Name = "integer", EmitDefaultValue = false)] - public int Integer { get; set; } + public Option Integer { get; set; } /// /// Gets or Sets Int32 /// [DataMember(Name = "int32", EmitDefaultValue = false)] - public int Int32 { get; set; } + public Option Int32 { get; set; } /// /// Gets or Sets UnsignedInteger /// [DataMember(Name = "unsigned_integer", EmitDefaultValue = false)] - public uint UnsignedInteger { get; set; } + public Option UnsignedInteger { get; set; } /// /// Gets or Sets Int64 /// [DataMember(Name = "int64", EmitDefaultValue = false)] - public long Int64 { get; set; } + public Option Int64 { get; set; } /// /// Gets or Sets UnsignedLong /// [DataMember(Name = "unsigned_long", EmitDefaultValue = false)] - public ulong UnsignedLong { get; set; } + public Option UnsignedLong { get; set; } /// /// Gets or Sets Number @@ -136,25 +177,25 @@ protected FormatTest() /// Gets or Sets Float /// [DataMember(Name = "float", EmitDefaultValue = false)] - public float Float { get; set; } + public Option Float { get; set; } /// /// Gets or Sets Double /// [DataMember(Name = "double", EmitDefaultValue = false)] - public double Double { get; set; } + public Option Double { get; set; } /// /// Gets or Sets Decimal /// [DataMember(Name = "decimal", EmitDefaultValue = false)] - public decimal Decimal { get; set; } + public Option Decimal { get; set; } /// /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public string String { get; set; } + public Option String { get; set; } /// /// Gets or Sets Byte @@ -166,7 +207,7 @@ protected FormatTest() /// Gets or Sets Binary /// [DataMember(Name = "binary", EmitDefaultValue = false)] - public System.IO.Stream Binary { get; set; } + public Option Binary { get; set; } /// /// Gets or Sets Date @@ -181,14 +222,14 @@ protected FormatTest() /// /// 2007-12-03T10:15:30+01:00 [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Uuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Password @@ -201,21 +242,21 @@ protected FormatTest() /// /// A string that is a 10 digit number. Can have leading zeros. [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] - public string PatternWithDigits { get; set; } + public Option PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] - public string PatternWithDigitsAndDelimiter { get; set; } + public Option PatternWithDigitsAndDelimiter { get; set; } /// /// None /// /// None [DataMember(Name = "pattern_with_backslash", EmitDefaultValue = false)] - public string PatternWithBackslash { get; set; } + public Option PatternWithBackslash { get; set; } /// /// Gets or Sets additional properties @@ -293,54 +334,78 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode(); + if (this.Integer.IsSet) + { + hashCode = (hashCode * 59) + this.Integer.Value.GetHashCode(); + } + if (this.Int32.IsSet) + { + hashCode = (hashCode * 59) + this.Int32.Value.GetHashCode(); + } + if (this.UnsignedInteger.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedInteger.Value.GetHashCode(); + } + if (this.Int64.IsSet) + { + hashCode = (hashCode * 59) + this.Int64.Value.GetHashCode(); + } + if (this.UnsignedLong.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedLong.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.Number.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) + if (this.Float.IsSet) + { + hashCode = (hashCode * 59) + this.Float.Value.GetHashCode(); + } + if (this.Double.IsSet) + { + hashCode = (hashCode * 59) + this.Double.Value.GetHashCode(); + } + if (this.Decimal.IsSet) + { + hashCode = (hashCode * 59) + this.Decimal.Value.GetHashCode(); + } + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.Byte != null) { hashCode = (hashCode * 59) + this.Byte.GetHashCode(); } - if (this.Binary != null) + if (this.Binary.IsSet && this.Binary.Value != null) { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); + hashCode = (hashCode * 59) + this.Binary.Value.GetHashCode(); } if (this.Date != null) { hashCode = (hashCode * 59) + this.Date.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.Password != null) { hashCode = (hashCode * 59) + this.Password.GetHashCode(); } - if (this.PatternWithDigits != null) + if (this.PatternWithDigits.IsSet && this.PatternWithDigits.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigits.Value.GetHashCode(); } - if (this.PatternWithDigitsAndDelimiter != null) + if (this.PatternWithDigitsAndDelimiter.IsSet && this.PatternWithDigitsAndDelimiter.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.Value.GetHashCode(); } - if (this.PatternWithBackslash != null) + if (this.PatternWithBackslash.IsSet && this.PatternWithBackslash.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithBackslash.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithBackslash.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index 5e0d760c369f..637e088e9ea9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs index 3772b99bdb42..5626c5152e3c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index c22ccd6ebb50..bf63b65e7b74 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 75285a73f6ca..a537191d7d12 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -50,10 +51,10 @@ protected GrandparentAnimal() /// petType (required). public GrandparentAnimal(string petType = default(string)) { - // to ensure "petType" is required (not null) + // to ensure "petType" (not nullable) is not null if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); + throw new ArgumentNullException("petType isn't a nullable property for GrandparentAnimal and cannot be null"); } this.PetType = petType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 3c6298d7d8d2..96d854d60872 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,7 +46,7 @@ public HasOnlyReadOnly() /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -59,7 +60,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Foo /// [DataMember(Name = "foo", EmitDefaultValue = false)] - public string Foo { get; private set; } + public Option Foo { get; private set; } /// /// Returns false as Foo should not be serialized given that it's read-only. @@ -128,13 +129,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Foo != null) + if (this.Foo.IsSet && this.Foo.Value != null) { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); + hashCode = (hashCode * 59) + this.Foo.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 6fe074907762..cced5965aa84 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Initializes a new instance of the class. /// /// nullableMessage. - public HealthCheckResult(string nullableMessage = default(string)) + public HealthCheckResult(Option nullableMessage = default(Option)) { this.NullableMessage = nullableMessage; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Gets or Sets NullableMessage /// [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] - public string NullableMessage { get; set; } + public Option NullableMessage { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +107,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.NullableMessage != null) + if (this.NullableMessage.IsSet && this.NullableMessage.Value != null) { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableMessage.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index acf86063d050..9b860ce985ee 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,17 +45,17 @@ protected IsoscelesTriangle() { } /// triangleType (required). public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for IsoscelesTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for IsoscelesTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs index e06a3f381f12..358846cdd689 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class List : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// var123List. - public List(string var123List = default(string)) + public List(Option var123List = default(Option)) { + // to ensure "var123List" (not nullable) is not null + if (var123List.IsSet && var123List.Value == null) + { + throw new ArgumentNullException("var123List isn't a nullable property for List and cannot be null"); + } this.Var123List = var123List; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class List : IEquatable, IValidatableObject /// Gets or Sets Var123List /// [DataMember(Name = "123-list", EmitDefaultValue = false)] - public string Var123List { get; set; } + public Option Var123List { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Var123List != null) + if (this.Var123List.IsSet && this.Var123List.Value != null) { - hashCode = (hashCode * 59) + this.Var123List.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123List.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 57cc8110fbb8..63e1726e5f79 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,12 +38,20 @@ public partial class LiteralStringClass : IEquatable, IValid /// /// escapedLiteralString (default to "C:\\Users\\username"). /// unescapedLiteralString (default to "C:\Users\username"). - public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", string unescapedLiteralString = @"C:\Users\username") + public LiteralStringClass(Option escapedLiteralString = default(Option), Option unescapedLiteralString = default(Option)) { - // use default value if no "escapedLiteralString" provided - this.EscapedLiteralString = escapedLiteralString ?? @"C:\\Users\\username"; - // use default value if no "unescapedLiteralString" provided - this.UnescapedLiteralString = unescapedLiteralString ?? @"C:\Users\username"; + // to ensure "escapedLiteralString" (not nullable) is not null + if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) + { + throw new ArgumentNullException("escapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + // to ensure "unescapedLiteralString" (not nullable) is not null + if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) + { + throw new ArgumentNullException("unescapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + this.EscapedLiteralString = escapedLiteralString.IsSet ? escapedLiteralString : new Option(@"C:\\Users\\username"); + this.UnescapedLiteralString = unescapedLiteralString.IsSet ? unescapedLiteralString : new Option(@"C:\Users\username"); this.AdditionalProperties = new Dictionary(); } @@ -50,13 +59,13 @@ public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", /// Gets or Sets EscapedLiteralString /// [DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)] - public string EscapedLiteralString { get; set; } + public Option EscapedLiteralString { get; set; } /// /// Gets or Sets UnescapedLiteralString /// [DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)] - public string UnescapedLiteralString { get; set; } + public Option UnescapedLiteralString { get; set; } /// /// Gets or Sets additional properties @@ -117,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.EscapedLiteralString != null) + if (this.EscapedLiteralString.IsSet && this.EscapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.EscapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.EscapedLiteralString.Value.GetHashCode(); } - if (this.UnescapedLiteralString != null) + if (this.UnescapedLiteralString.IsSet && this.UnescapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.UnescapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.UnescapedLiteralString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 49a7e091c235..9efc46f30641 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 691f128ea5fb..004bf942c034 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -58,8 +59,28 @@ public enum InnerEnum /// mapOfEnumString. /// directMap. /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + public MapTest(Option>> mapMapOfString = default(Option>>), Option> mapOfEnumString = default(Option>), Option> directMap = default(Option>), Option> indirectMap = default(Option>)) { + // to ensure "mapMapOfString" (not nullable) is not null + if (mapMapOfString.IsSet && mapMapOfString.Value == null) + { + throw new ArgumentNullException("mapMapOfString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "mapOfEnumString" (not nullable) is not null + if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) + { + throw new ArgumentNullException("mapOfEnumString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "directMap" (not nullable) is not null + if (directMap.IsSet && directMap.Value == null) + { + throw new ArgumentNullException("directMap isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "indirectMap" (not nullable) is not null + if (indirectMap.IsSet && indirectMap.Value == null) + { + throw new ArgumentNullException("indirectMap isn't a nullable property for MapTest and cannot be null"); + } this.MapMapOfString = mapMapOfString; this.MapOfEnumString = mapOfEnumString; this.DirectMap = directMap; @@ -71,25 +92,25 @@ public enum InnerEnum /// Gets or Sets MapMapOfString /// [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] - public Dictionary> MapMapOfString { get; set; } + public Option>> MapMapOfString { get; set; } /// /// Gets or Sets MapOfEnumString /// [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] - public Dictionary MapOfEnumString { get; set; } + public Option> MapOfEnumString { get; set; } /// /// Gets or Sets DirectMap /// [DataMember(Name = "direct_map", EmitDefaultValue = false)] - public Dictionary DirectMap { get; set; } + public Option> DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// [DataMember(Name = "indirect_map", EmitDefaultValue = false)] - public Dictionary IndirectMap { get; set; } + public Option> IndirectMap { get; set; } /// /// Gets or Sets additional properties @@ -152,21 +173,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapMapOfString != null) + if (this.MapMapOfString.IsSet && this.MapMapOfString.Value != null) { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapMapOfString.Value.GetHashCode(); } - if (this.MapOfEnumString != null) + if (this.MapOfEnumString.IsSet && this.MapOfEnumString.Value != null) { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfEnumString.Value.GetHashCode(); } - if (this.DirectMap != null) + if (this.DirectMap.IsSet && this.DirectMap.Value != null) { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.DirectMap.Value.GetHashCode(); } - if (this.IndirectMap != null) + if (this.IndirectMap.IsSet && this.IndirectMap.Value != null) { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.IndirectMap.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 2b62d5975478..5dbb7d0ef732 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedAnyOf(MixedAnyOfContent content = default(MixedAnyOfContent)) + public MixedAnyOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedAnyOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedAnyOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs index 49e94cc5e5db..7c4a5791f8e2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index bd0255888b86..f18b4793a139 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedOneOf(MixedOneOfContent content = default(MixedOneOfContent)) + public MixedOneOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedOneOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedOneOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs index e2527cc3c315..77af863c507e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 5f51e31aa034..fc342925735f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,28 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatableuuid. /// dateTime. /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuidWithPattern = default(Guid), Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) + public MixedPropertiesAndAdditionalPropertiesClass(Option uuidWithPattern = default(Option), Option uuid = default(Option), Option dateTime = default(Option), Option> map = default(Option>)) { + // to ensure "uuidWithPattern" (not nullable) is not null + if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) + { + throw new ArgumentNullException("uuidWithPattern isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "map" (not nullable) is not null + if (map.IsSet && map.Value == null) + { + throw new ArgumentNullException("map isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } this.UuidWithPattern = uuidWithPattern; this.Uuid = uuid; this.DateTime = dateTime; @@ -52,25 +73,25 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable [DataMember(Name = "uuid_with_pattern", EmitDefaultValue = false)] - public Guid UuidWithPattern { get; set; } + public Option UuidWithPattern { get; set; } /// /// Gets or Sets Uuid /// [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets DateTime /// [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Map /// [DataMember(Name = "map", EmitDefaultValue = false)] - public Dictionary Map { get; set; } + public Option> Map { get; set; } /// /// Gets or Sets additional properties @@ -133,21 +154,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.UuidWithPattern != null) + if (this.UuidWithPattern.IsSet && this.UuidWithPattern.Value != null) { - hashCode = (hashCode * 59) + this.UuidWithPattern.GetHashCode(); + hashCode = (hashCode * 59) + this.UuidWithPattern.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Map != null) + if (this.Map.IsSet && this.Map.Value != null) { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); + hashCode = (hashCode * 59) + this.Map.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 1906ce0b2709..9d5c0bc35f6f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// id. - public MixedSubId(string id = default(string)) + public MixedSubId(Option id = default(Option)) { + // to ensure "id" (not nullable) is not null + if (id.IsSet && id.Value == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixedSubId and cannot be null"); + } this.Id = id; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Id != null) + if (this.Id.IsSet && this.Id.Value != null) { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index a023e3c3e754..d22b1c824ceb 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Model200Response : IEquatable, IValidatab /// /// name. /// varClass. - public Model200Response(int name = default(int), string varClass = default(string)) + public Model200Response(Option name = default(Option), Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for Model200Response and cannot be null"); + } this.Name = name; this.Class = varClass; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class Model200Response : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public int Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets Class /// [DataMember(Name = "class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) + if (this.Name.IsSet) + { + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); + } + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 690894994947..4c8ff7320d98 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClient. - public ModelClient(string varClient = default(string)) + public ModelClient(Option varClient = default(Option)) { + // to ensure "varClient" (not nullable) is not null + if (varClient.IsSet && varClient.Value == null) + { + throw new ArgumentNullException("varClient isn't a nullable property for ModelClient and cannot be null"); + } this.VarClient = varClient; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public string VarClient { get; set; } + public Option VarClient { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.VarClient != null) + if (this.VarClient.IsSet && this.VarClient.Value != null) { - hashCode = (hashCode * 59) + this.VarClient.GetHashCode(); + hashCode = (hashCode * 59) + this.VarClient.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs index f34052aa706c..10b22f09b12a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,8 +46,13 @@ protected Name() /// /// varName (required). /// property. - public Name(int varName = default(int), string property = default(string)) + public Name(int varName = default(int), Option property = default(Option)) { + // to ensure "property" (not nullable) is not null + if (property.IsSet && property.Value == null) + { + throw new ArgumentNullException("property isn't a nullable property for Name and cannot be null"); + } this.VarName = varName; this.Property = property; this.AdditionalProperties = new Dictionary(); @@ -62,7 +68,7 @@ protected Name() /// Gets or Sets SnakeCase /// [DataMember(Name = "snake_case", EmitDefaultValue = false)] - public int SnakeCase { get; private set; } + public Option SnakeCase { get; private set; } /// /// Returns false as SnakeCase should not be serialized given that it's read-only. @@ -76,13 +82,13 @@ public bool ShouldSerializeSnakeCase() /// Gets or Sets Property /// [DataMember(Name = "property", EmitDefaultValue = false)] - public string Property { get; set; } + public Option Property { get; set; } /// /// Gets or Sets Var123Number /// [DataMember(Name = "123Number", EmitDefaultValue = false)] - public int Var123Number { get; private set; } + public Option Var123Number { get; private set; } /// /// Returns false as Var123Number should not be serialized given that it's read-only. @@ -154,12 +160,18 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.VarName.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) + if (this.SnakeCase.IsSet) + { + hashCode = (hashCode * 59) + this.SnakeCase.Value.GetHashCode(); + } + if (this.Property.IsSet && this.Property.Value != null) + { + hashCode = (hashCode * 59) + this.Property.Value.GetHashCode(); + } + if (this.Var123Number.IsSet) { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123Number.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Var123Number.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 3fbd6e83ef29..b4b03a3be7c9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,12 +48,12 @@ protected NotificationtestGetElementsV1ResponseMPayload() /// aObjVariableobject (required). public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List> aObjVariableobject = default(List>)) { - this.PkiNotificationtestID = pkiNotificationtestID; - // to ensure "aObjVariableobject" is required (not null) + // to ensure "aObjVariableobject" (not nullable) is not null if (aObjVariableobject == null) { - throw new ArgumentNullException("aObjVariableobject is a required property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); + throw new ArgumentNullException("aObjVariableobject isn't a nullable property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); } + this.PkiNotificationtestID = pkiNotificationtestID; this.AObjVariableobject = aObjVariableobject; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 6e4a6ef50e7b..c384e5bfa54f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,18 @@ public partial class NullableClass : IEquatable, IValidatableObje /// objectNullableProp. /// objectAndItemsNullableProp. /// objectItemsNullable. - public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateTime? dateProp = default(DateTime?), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) + public NullableClass(Option integerProp = default(Option), Option numberProp = default(Option), Option booleanProp = default(Option), Option stringProp = default(Option), Option dateProp = default(Option), Option datetimeProp = default(Option), Option> arrayNullableProp = default(Option>), Option> arrayAndItemsNullableProp = default(Option>), Option> arrayItemsNullable = default(Option>), Option> objectNullableProp = default(Option>), Option> objectAndItemsNullableProp = default(Option>), Option> objectItemsNullable = default(Option>)) { + // to ensure "arrayItemsNullable" (not nullable) is not null + if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) + { + throw new ArgumentNullException("arrayItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } + // to ensure "objectItemsNullable" (not nullable) is not null + if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) + { + throw new ArgumentNullException("objectItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } this.IntegerProp = integerProp; this.NumberProp = numberProp; this.BooleanProp = booleanProp; @@ -68,74 +79,74 @@ public partial class NullableClass : IEquatable, IValidatableObje /// Gets or Sets IntegerProp /// [DataMember(Name = "integer_prop", EmitDefaultValue = true)] - public int? IntegerProp { get; set; } + public Option IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// [DataMember(Name = "number_prop", EmitDefaultValue = true)] - public decimal? NumberProp { get; set; } + public Option NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] - public bool? BooleanProp { get; set; } + public Option BooleanProp { get; set; } /// /// Gets or Sets StringProp /// [DataMember(Name = "string_prop", EmitDefaultValue = true)] - public string StringProp { get; set; } + public Option StringProp { get; set; } /// /// Gets or Sets DateProp /// [DataMember(Name = "date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? DateProp { get; set; } + public Option DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] - public DateTime? DatetimeProp { get; set; } + public Option DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] - public List ArrayNullableProp { get; set; } + public Option> ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] - public List ArrayAndItemsNullableProp { get; set; } + public Option> ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] - public List ArrayItemsNullable { get; set; } + public Option> ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectNullableProp { get; set; } + public Option> ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectAndItemsNullableProp { get; set; } + public Option> ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] - public Dictionary ObjectItemsNullable { get; set; } + public Option> ObjectItemsNullable { get; set; } /// /// Gets or Sets additional properties @@ -206,53 +217,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.IntegerProp != null) + if (this.IntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.IntegerProp.Value.GetHashCode(); } - if (this.NumberProp != null) + if (this.NumberProp.IsSet) { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberProp.Value.GetHashCode(); } - if (this.BooleanProp != null) + if (this.BooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.BooleanProp.Value.GetHashCode(); } - if (this.StringProp != null) + if (this.StringProp.IsSet && this.StringProp.Value != null) { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.StringProp.Value.GetHashCode(); } - if (this.DateProp != null) + if (this.DateProp.IsSet && this.DateProp.Value != null) { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DateProp.Value.GetHashCode(); } - if (this.DatetimeProp != null) + if (this.DatetimeProp.IsSet && this.DatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DatetimeProp.Value.GetHashCode(); } - if (this.ArrayNullableProp != null) + if (this.ArrayNullableProp.IsSet && this.ArrayNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNullableProp.Value.GetHashCode(); } - if (this.ArrayAndItemsNullableProp != null) + if (this.ArrayAndItemsNullableProp.IsSet && this.ArrayAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.Value.GetHashCode(); } - if (this.ArrayItemsNullable != null) + if (this.ArrayItemsNullable.IsSet && this.ArrayItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayItemsNullable.Value.GetHashCode(); } - if (this.ObjectNullableProp != null) + if (this.ObjectNullableProp.IsSet && this.ObjectNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectNullableProp.Value.GetHashCode(); } - if (this.ObjectAndItemsNullableProp != null) + if (this.ObjectAndItemsNullableProp.IsSet && this.ObjectAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.Value.GetHashCode(); } - if (this.ObjectItemsNullable != null) + if (this.ObjectItemsNullable.IsSet && this.ObjectItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectItemsNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 8a3011986ecd..059dd8c09a0b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// Initializes a new instance of the class. /// /// uuid. - public NullableGuidClass(Guid? uuid = default(Guid?)) + public NullableGuidClass(Option uuid = default(Option)) { this.Uuid = uuid; this.AdditionalProperties = new Dictionary(); @@ -47,7 +48,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = true)] - public Guid? Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +108,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index 3c760b3abddf..255842acfbac 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 7218451d9fb0..eabf9cccc135 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,7 +40,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) + public NumberOnly(Option justNumber = default(Option)) { this.JustNumber = justNumber; this.AdditionalProperties = new Dictionary(); @@ -49,7 +50,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Gets or Sets JustNumber /// [DataMember(Name = "JustNumber", EmitDefaultValue = false)] - public decimal JustNumber { get; set; } + public Option JustNumber { get; set; } /// /// Gets or Sets additional properties @@ -109,7 +110,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); + if (this.JustNumber.IsSet) + { + hashCode = (hashCode * 59) + this.JustNumber.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 76faa5154c86..fe77912ea4be 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,23 @@ public partial class ObjectWithDeprecatedFields : IEquatableid. /// deprecatedRef. /// bars. - public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List bars = default(List)) + public ObjectWithDeprecatedFields(Option uuid = default(Option), Option id = default(Option), Option deprecatedRef = default(Option), Option> bars = default(Option>)) { + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "deprecatedRef" (not nullable) is not null + if (deprecatedRef.IsSet && deprecatedRef.Value == null) + { + throw new ArgumentNullException("deprecatedRef isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "bars" (not nullable) is not null + if (bars.IsSet && bars.Value == null) + { + throw new ArgumentNullException("bars isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } this.Uuid = uuid; this.Id = id; this.DeprecatedRef = deprecatedRef; @@ -52,28 +68,28 @@ public partial class ObjectWithDeprecatedFields : IEquatable [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] [Obsolete] - public decimal Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets DeprecatedRef /// [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } + public Option DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// [DataMember(Name = "bars", EmitDefaultValue = false)] [Obsolete] - public List Bars { get; set; } + public Option> Bars { get; set; } /// /// Gets or Sets additional properties @@ -136,18 +152,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) + { + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); + } + if (this.Id.IsSet) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) + if (this.DeprecatedRef.IsSet && this.DeprecatedRef.Value != null) { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); + hashCode = (hashCode * 59) + this.DeprecatedRef.Value.GetHashCode(); } - if (this.Bars != null) + if (this.Bars.IsSet && this.Bars.Value != null) { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); + hashCode = (hashCode * 59) + this.Bars.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs index b7278bd5600e..fc7a1298bc33 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs index e9471d3ba022..22df3b5b7b01 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// Order Status [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -74,14 +75,19 @@ public enum StatusEnum /// shipDate. /// Order Status. /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) + public Order(Option id = default(Option), Option petId = default(Option), Option quantity = default(Option), Option shipDate = default(Option), Option status = default(Option), Option complete = default(Option)) { + // to ensure "shipDate" (not nullable) is not null + if (shipDate.IsSet && shipDate.Value == null) + { + throw new ArgumentNullException("shipDate isn't a nullable property for Order and cannot be null"); + } this.Id = id; this.PetId = petId; this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - this.Complete = complete; + this.Complete = complete.IsSet ? complete : new Option(false); this.AdditionalProperties = new Dictionary(); } @@ -89,32 +95,32 @@ public enum StatusEnum /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets PetId /// [DataMember(Name = "petId", EmitDefaultValue = false)] - public long PetId { get; set; } + public Option PetId { get; set; } /// /// Gets or Sets Quantity /// [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int Quantity { get; set; } + public Option Quantity { get; set; } /// /// Gets or Sets ShipDate /// /// 2020-02-02T20:20:20.000222Z [DataMember(Name = "shipDate", EmitDefaultValue = false)] - public DateTime ShipDate { get; set; } + public Option ShipDate { get; set; } /// /// Gets or Sets Complete /// [DataMember(Name = "complete", EmitDefaultValue = true)] - public bool Complete { get; set; } + public Option Complete { get; set; } /// /// Gets or Sets additional properties @@ -179,15 +185,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.PetId.IsSet) + { + hashCode = (hashCode * 59) + this.PetId.Value.GetHashCode(); + } + if (this.Quantity.IsSet) + { + hashCode = (hashCode * 59) + this.Quantity.Value.GetHashCode(); + } + if (this.ShipDate.IsSet && this.ShipDate.Value != null) + { + hashCode = (hashCode * 59) + this.ShipDate.Value.GetHashCode(); + } + if (this.Status.IsSet) + { + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); + } + if (this.Complete.IsSet) { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); + hashCode = (hashCode * 59) + this.Complete.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 47d598a27e6f..f55b2f8c2454 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,13 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// myNumber. /// myString. /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) + public OuterComposite(Option myNumber = default(Option), Option myString = default(Option), Option myBoolean = default(Option)) { + // to ensure "myString" (not nullable) is not null + if (myString.IsSet && myString.Value == null) + { + throw new ArgumentNullException("myString isn't a nullable property for OuterComposite and cannot be null"); + } this.MyNumber = myNumber; this.MyString = myString; this.MyBoolean = myBoolean; @@ -50,19 +56,19 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// Gets or Sets MyNumber /// [DataMember(Name = "my_number", EmitDefaultValue = false)] - public decimal MyNumber { get; set; } + public Option MyNumber { get; set; } /// /// Gets or Sets MyString /// [DataMember(Name = "my_string", EmitDefaultValue = false)] - public string MyString { get; set; } + public Option MyString { get; set; } /// /// Gets or Sets MyBoolean /// [DataMember(Name = "my_boolean", EmitDefaultValue = true)] - public bool MyBoolean { get; set; } + public Option MyBoolean { get; set; } /// /// Gets or Sets additional properties @@ -124,12 +130,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) + if (this.MyNumber.IsSet) + { + hashCode = (hashCode * 59) + this.MyNumber.Value.GetHashCode(); + } + if (this.MyString.IsSet && this.MyString.Value != null) + { + hashCode = (hashCode * 59) + this.MyString.Value.GetHashCode(); + } + if (this.MyBoolean.IsSet) { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); + hashCode = (hashCode * 59) + this.MyBoolean.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs index 59a9f8e3500a..8d09e4d421bb 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index 40e276b600eb..9217b6a24c9a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 3a70c3716fe2..83a1123c3651 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index 42b36058c031..69a3229977ac 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs index 392e199e137f..5fd8f69243a4 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index 7a7421349903..92b018fe797c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs index e4722f4a5379..bbd65be3d7fd 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -82,22 +83,32 @@ protected Pet() /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), Option category = default(Option), string name = default(string), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this.Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this.PhotoUrls = photoUrls; this.Id = id; this.Category = category; + this.Name = name; + this.PhotoUrls = photoUrls; this.Tags = tags; this.Status = status; this.AdditionalProperties = new Dictionary(); @@ -107,13 +118,13 @@ protected Pet() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category { get; set; } + public Option Category { get; set; } /// /// Gets or Sets Name @@ -132,7 +143,7 @@ protected Pet() /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags { get; set; } + public Option> Tags { get; set; } /// /// Gets or Sets additional properties @@ -197,10 +208,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.Name != null) { @@ -210,11 +224,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 53b52bce70f1..efb16d85c318 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 5e4472118140..fddb8c8500ad 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index 1e12804ecd2a..4b1b8777ee3f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 3a364f98c1e2..3bc8ef02e009 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected QuadrilateralInterface() /// quadrilateralType (required). public QuadrilateralInterface(string quadrilateralType = default(string)) { - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 46ed3b3948c0..d6715914adc5 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// baz. - public ReadOnlyFirst(string baz = default(string)) + public ReadOnlyFirst(Option baz = default(Option)) { + // to ensure "baz" (not nullable) is not null + if (baz.IsSet && baz.Value == null) + { + throw new ArgumentNullException("baz isn't a nullable property for ReadOnlyFirst and cannot be null"); + } this.Baz = baz; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -60,7 +66,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Baz /// [DataMember(Name = "baz", EmitDefaultValue = false)] - public string Baz { get; set; } + public Option Baz { get; set; } /// /// Gets or Sets additional properties @@ -121,13 +127,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Baz != null) + if (this.Baz.IsSet && this.Baz.Value != null) { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); + hashCode = (hashCode * 59) + this.Baz.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index d040204ece33..7fbdfa344d3c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -53,7 +54,7 @@ public enum RequiredNullableEnumIntegerEnum /// Gets or Sets RequiredNullableEnumInteger /// [DataMember(Name = "required_nullable_enum_integer", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerEnum RequiredNullableEnumInteger { get; set; } + public RequiredNullableEnumIntegerEnum? RequiredNullableEnumInteger { get; set; } /// /// Defines RequiredNotnullableEnumInteger /// @@ -97,7 +98,7 @@ public enum NotrequiredNullableEnumIntegerEnum /// Gets or Sets NotrequiredNullableEnumInteger /// [DataMember(Name = "notrequired_nullable_enum_integer", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerEnum? NotrequiredNullableEnumInteger { get; set; } + public Option NotrequiredNullableEnumInteger { get; set; } /// /// Defines NotrequiredNotnullableEnumInteger /// @@ -119,11 +120,10 @@ public enum NotrequiredNotnullableEnumIntegerEnum /// Gets or Sets NotrequiredNotnullableEnumInteger /// [DataMember(Name = "notrequired_notnullable_enum_integer", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerEnum? NotrequiredNotnullableEnumInteger { get; set; } + public Option NotrequiredNotnullableEnumInteger { get; set; } /// /// Defines RequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum RequiredNullableEnumIntegerOnlyEnum { /// @@ -142,7 +142,7 @@ public enum RequiredNullableEnumIntegerOnlyEnum /// Gets or Sets RequiredNullableEnumIntegerOnly /// [DataMember(Name = "required_nullable_enum_integer_only", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnly { get; set; } + public RequiredNullableEnumIntegerOnlyEnum? RequiredNullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumIntegerOnly /// @@ -168,7 +168,6 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum /// /// Defines NotrequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum NotrequiredNullableEnumIntegerOnlyEnum { /// @@ -187,7 +186,7 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNullableEnumIntegerOnly /// [DataMember(Name = "notrequired_nullable_enum_integer_only", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerOnlyEnum? NotrequiredNullableEnumIntegerOnly { get; set; } + public Option NotrequiredNullableEnumIntegerOnly { get; set; } /// /// Defines NotrequiredNotnullableEnumIntegerOnly /// @@ -209,7 +208,7 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNotnullableEnumIntegerOnly /// [DataMember(Name = "notrequired_notnullable_enum_integer_only", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerOnlyEnum? NotrequiredNotnullableEnumIntegerOnly { get; set; } + public Option NotrequiredNotnullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumString /// @@ -331,7 +330,7 @@ public enum RequiredNullableEnumStringEnum /// Gets or Sets RequiredNullableEnumString /// [DataMember(Name = "required_nullable_enum_string", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumStringEnum RequiredNullableEnumString { get; set; } + public RequiredNullableEnumStringEnum? RequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNullableEnumString /// @@ -392,7 +391,7 @@ public enum NotrequiredNullableEnumStringEnum /// Gets or Sets NotrequiredNullableEnumString /// [DataMember(Name = "notrequired_nullable_enum_string", EmitDefaultValue = true)] - public NotrequiredNullableEnumStringEnum? NotrequiredNullableEnumString { get; set; } + public Option NotrequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNotnullableEnumString /// @@ -453,7 +452,7 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNotnullableEnumString /// [DataMember(Name = "notrequired_notnullable_enum_string", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumStringEnum? NotrequiredNotnullableEnumString { get; set; } + public Option NotrequiredNotnullableEnumString { get; set; } /// /// Gets or Sets RequiredNullableOuterEnumDefaultValue @@ -471,13 +470,13 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_nullable_outerEnumDefaultValue", EmitDefaultValue = true)] - public OuterEnumDefaultValue? NotrequiredNullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNullableOuterEnumDefaultValue { get; set; } /// /// Gets or Sets NotrequiredNotnullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_notnullable_outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? NotrequiredNotnullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNotnullableOuterEnumDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -533,95 +532,100 @@ protected RequiredClass() /// requiredNotnullableArrayOfString (required). /// notrequiredNullableArrayOfString. /// notrequiredNotnullableArrayOfString. - public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), int? notRequiredNullableIntegerProp = default(int?), int notRequiredNotnullableintegerProp = default(int), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), string notrequiredNullableStringProp = default(string), string notrequiredNotnullableStringProp = default(string), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), bool? notrequiredNullableBooleanProp = default(bool?), bool notrequiredNotnullableBooleanProp = default(bool), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), DateTime? notRequiredNullableDateProp = default(DateTime?), DateTime notRequiredNotnullableDateProp = default(DateTime), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), DateTime? notrequiredNullableDatetimeProp = default(DateTime?), DateTime notrequiredNotnullableDatetimeProp = default(DateTime), RequiredNullableEnumIntegerEnum requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), NotrequiredNullableEnumIntegerEnum? notrequiredNullableEnumInteger = default(NotrequiredNullableEnumIntegerEnum?), NotrequiredNotnullableEnumIntegerEnum? notrequiredNotnullableEnumInteger = default(NotrequiredNotnullableEnumIntegerEnum?), RequiredNullableEnumIntegerOnlyEnum requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), NotrequiredNullableEnumIntegerOnlyEnum? notrequiredNullableEnumIntegerOnly = default(NotrequiredNullableEnumIntegerOnlyEnum?), NotrequiredNotnullableEnumIntegerOnlyEnum? notrequiredNotnullableEnumIntegerOnly = default(NotrequiredNotnullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum requiredNullableEnumString = default(RequiredNullableEnumStringEnum), NotrequiredNullableEnumStringEnum? notrequiredNullableEnumString = default(NotrequiredNullableEnumStringEnum?), NotrequiredNotnullableEnumStringEnum? notrequiredNotnullableEnumString = default(NotrequiredNotnullableEnumStringEnum?), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue? notrequiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue? notrequiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Guid? notrequiredNullableUuid = default(Guid?), Guid notrequiredNotnullableUuid = default(Guid), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), List notrequiredNullableArrayOfString = default(List), List notrequiredNotnullableArrayOfString = default(List)) + public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), Option notRequiredNullableIntegerProp = default(Option), Option notRequiredNotnullableintegerProp = default(Option), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), Option notrequiredNullableStringProp = default(Option), Option notrequiredNotnullableStringProp = default(Option), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), Option notrequiredNullableBooleanProp = default(Option), Option notrequiredNotnullableBooleanProp = default(Option), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), Option notRequiredNullableDateProp = default(Option), Option notRequiredNotnullableDateProp = default(Option), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), Option notrequiredNullableDatetimeProp = default(Option), Option notrequiredNotnullableDatetimeProp = default(Option), RequiredNullableEnumIntegerEnum? requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum?), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), Option notrequiredNullableEnumInteger = default(Option), Option notrequiredNotnullableEnumInteger = default(Option), RequiredNullableEnumIntegerOnlyEnum? requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), Option notrequiredNullableEnumIntegerOnly = default(Option), Option notrequiredNotnullableEnumIntegerOnly = default(Option), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum? requiredNullableEnumString = default(RequiredNullableEnumStringEnum?), Option notrequiredNullableEnumString = default(Option), Option notrequiredNotnullableEnumString = default(Option), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), Option notrequiredNullableOuterEnumDefaultValue = default(Option), Option notrequiredNotnullableOuterEnumDefaultValue = default(Option), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Option notrequiredNullableUuid = default(Option), Option notrequiredNotnullableUuid = default(Option), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), Option> notrequiredNullableArrayOfString = default(Option>), Option> notrequiredNotnullableArrayOfString = default(Option>)) { - // to ensure "requiredNullableIntegerProp" is required (not null) - if (requiredNullableIntegerProp == null) + // to ensure "requiredNotnullableStringProp" (not nullable) is not null + if (requiredNotnullableStringProp == null) { - throw new ArgumentNullException("requiredNullableIntegerProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableIntegerProp = requiredNullableIntegerProp; - this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; - // to ensure "requiredNullableStringProp" is required (not null) - if (requiredNullableStringProp == null) + // to ensure "notrequiredNotnullableStringProp" (not nullable) is not null + if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) { - throw new ArgumentNullException("requiredNullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableStringProp = requiredNullableStringProp; - // to ensure "requiredNotnullableStringProp" is required (not null) - if (requiredNotnullableStringProp == null) + // to ensure "requiredNotNullableDateProp" (not nullable) is not null + if (requiredNotNullableDateProp == null) { - throw new ArgumentNullException("requiredNotnullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotNullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableStringProp = requiredNotnullableStringProp; - // to ensure "requiredNullableBooleanProp" is required (not null) - if (requiredNullableBooleanProp == null) + // to ensure "notRequiredNotnullableDateProp" (not nullable) is not null + if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) { - throw new ArgumentNullException("requiredNullableBooleanProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notRequiredNotnullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableBooleanProp = requiredNullableBooleanProp; - this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; - // to ensure "requiredNullableDateProp" is required (not null) - if (requiredNullableDateProp == null) + // to ensure "requiredNotnullableDatetimeProp" (not nullable) is not null + if (requiredNotnullableDatetimeProp == null) { - throw new ArgumentNullException("requiredNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDateProp = requiredNullableDateProp; - this.RequiredNotNullableDateProp = requiredNotNullableDateProp; - this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; - // to ensure "requiredNullableDatetimeProp" is required (not null) - if (requiredNullableDatetimeProp == null) + // to ensure "notrequiredNotnullableDatetimeProp" (not nullable) is not null + if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) { - throw new ArgumentNullException("requiredNullableDatetimeProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; - this.RequiredNullableEnumInteger = requiredNullableEnumInteger; - this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; - this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; - this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; - this.RequiredNotnullableEnumString = requiredNotnullableEnumString; - this.RequiredNullableEnumString = requiredNullableEnumString; - this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; - this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; - // to ensure "requiredNullableUuid" is required (not null) - if (requiredNullableUuid == null) + // to ensure "requiredNotnullableUuid" (not nullable) is not null + if (requiredNotnullableUuid == null) { - throw new ArgumentNullException("requiredNullableUuid is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableUuid = requiredNullableUuid; - this.RequiredNotnullableUuid = requiredNotnullableUuid; - // to ensure "requiredNullableArrayOfString" is required (not null) - if (requiredNullableArrayOfString == null) + // to ensure "notrequiredNotnullableUuid" (not nullable) is not null + if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) { - throw new ArgumentNullException("requiredNullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableArrayOfString = requiredNullableArrayOfString; - // to ensure "requiredNotnullableArrayOfString" is required (not null) + // to ensure "requiredNotnullableArrayOfString" (not nullable) is not null if (requiredNotnullableArrayOfString == null) { - throw new ArgumentNullException("requiredNotnullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; + // to ensure "notrequiredNotnullableArrayOfString" (not nullable) is not null + if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) + { + throw new ArgumentNullException("notrequiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); + } + this.RequiredNullableIntegerProp = requiredNullableIntegerProp; + this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; this.NotRequiredNullableIntegerProp = notRequiredNullableIntegerProp; this.NotRequiredNotnullableintegerProp = notRequiredNotnullableintegerProp; + this.RequiredNullableStringProp = requiredNullableStringProp; + this.RequiredNotnullableStringProp = requiredNotnullableStringProp; this.NotrequiredNullableStringProp = notrequiredNullableStringProp; this.NotrequiredNotnullableStringProp = notrequiredNotnullableStringProp; + this.RequiredNullableBooleanProp = requiredNullableBooleanProp; + this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; this.NotrequiredNullableBooleanProp = notrequiredNullableBooleanProp; this.NotrequiredNotnullableBooleanProp = notrequiredNotnullableBooleanProp; + this.RequiredNullableDateProp = requiredNullableDateProp; + this.RequiredNotNullableDateProp = requiredNotNullableDateProp; this.NotRequiredNullableDateProp = notRequiredNullableDateProp; this.NotRequiredNotnullableDateProp = notRequiredNotnullableDateProp; + this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; + this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; this.NotrequiredNullableDatetimeProp = notrequiredNullableDatetimeProp; this.NotrequiredNotnullableDatetimeProp = notrequiredNotnullableDatetimeProp; + this.RequiredNullableEnumInteger = requiredNullableEnumInteger; + this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; this.NotrequiredNullableEnumInteger = notrequiredNullableEnumInteger; this.NotrequiredNotnullableEnumInteger = notrequiredNotnullableEnumInteger; + this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; + this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; this.NotrequiredNullableEnumIntegerOnly = notrequiredNullableEnumIntegerOnly; this.NotrequiredNotnullableEnumIntegerOnly = notrequiredNotnullableEnumIntegerOnly; + this.RequiredNotnullableEnumString = requiredNotnullableEnumString; + this.RequiredNullableEnumString = requiredNullableEnumString; this.NotrequiredNullableEnumString = notrequiredNullableEnumString; this.NotrequiredNotnullableEnumString = notrequiredNotnullableEnumString; + this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; + this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; this.NotrequiredNullableOuterEnumDefaultValue = notrequiredNullableOuterEnumDefaultValue; this.NotrequiredNotnullableOuterEnumDefaultValue = notrequiredNotnullableOuterEnumDefaultValue; + this.RequiredNullableUuid = requiredNullableUuid; + this.RequiredNotnullableUuid = requiredNotnullableUuid; this.NotrequiredNullableUuid = notrequiredNullableUuid; this.NotrequiredNotnullableUuid = notrequiredNotnullableUuid; + this.RequiredNullableArrayOfString = requiredNullableArrayOfString; + this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; this.NotrequiredNullableArrayOfString = notrequiredNullableArrayOfString; this.NotrequiredNotnullableArrayOfString = notrequiredNotnullableArrayOfString; this.AdditionalProperties = new Dictionary(); @@ -643,13 +647,13 @@ protected RequiredClass() /// Gets or Sets NotRequiredNullableIntegerProp /// [DataMember(Name = "not_required_nullable_integer_prop", EmitDefaultValue = true)] - public int? NotRequiredNullableIntegerProp { get; set; } + public Option NotRequiredNullableIntegerProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableintegerProp /// [DataMember(Name = "not_required_notnullableinteger_prop", EmitDefaultValue = false)] - public int NotRequiredNotnullableintegerProp { get; set; } + public Option NotRequiredNotnullableintegerProp { get; set; } /// /// Gets or Sets RequiredNullableStringProp @@ -667,13 +671,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableStringProp /// [DataMember(Name = "notrequired_nullable_string_prop", EmitDefaultValue = true)] - public string NotrequiredNullableStringProp { get; set; } + public Option NotrequiredNullableStringProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableStringProp /// [DataMember(Name = "notrequired_notnullable_string_prop", EmitDefaultValue = false)] - public string NotrequiredNotnullableStringProp { get; set; } + public Option NotrequiredNotnullableStringProp { get; set; } /// /// Gets or Sets RequiredNullableBooleanProp @@ -691,13 +695,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableBooleanProp /// [DataMember(Name = "notrequired_nullable_boolean_prop", EmitDefaultValue = true)] - public bool? NotrequiredNullableBooleanProp { get; set; } + public Option NotrequiredNullableBooleanProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableBooleanProp /// [DataMember(Name = "notrequired_notnullable_boolean_prop", EmitDefaultValue = true)] - public bool NotrequiredNotnullableBooleanProp { get; set; } + public Option NotrequiredNotnullableBooleanProp { get; set; } /// /// Gets or Sets RequiredNullableDateProp @@ -718,14 +722,14 @@ protected RequiredClass() /// [DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? NotRequiredNullableDateProp { get; set; } + public Option NotRequiredNullableDateProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableDateProp /// [DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime NotRequiredNotnullableDateProp { get; set; } + public Option NotRequiredNotnullableDateProp { get; set; } /// /// Gets or Sets RequiredNotnullableDatetimeProp @@ -743,13 +747,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableDatetimeProp /// [DataMember(Name = "notrequired_nullable_datetime_prop", EmitDefaultValue = true)] - public DateTime? NotrequiredNullableDatetimeProp { get; set; } + public Option NotrequiredNullableDatetimeProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableDatetimeProp /// [DataMember(Name = "notrequired_notnullable_datetime_prop", EmitDefaultValue = false)] - public DateTime NotrequiredNotnullableDatetimeProp { get; set; } + public Option NotrequiredNotnullableDatetimeProp { get; set; } /// /// Gets or Sets RequiredNullableUuid @@ -770,14 +774,14 @@ protected RequiredClass() /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_nullable_uuid", EmitDefaultValue = true)] - public Guid? NotrequiredNullableUuid { get; set; } + public Option NotrequiredNullableUuid { get; set; } /// /// Gets or Sets NotrequiredNotnullableUuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_notnullable_uuid", EmitDefaultValue = false)] - public Guid NotrequiredNotnullableUuid { get; set; } + public Option NotrequiredNotnullableUuid { get; set; } /// /// Gets or Sets RequiredNullableArrayOfString @@ -795,13 +799,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableArrayOfString /// [DataMember(Name = "notrequired_nullable_array_of_string", EmitDefaultValue = true)] - public List NotrequiredNullableArrayOfString { get; set; } + public Option> NotrequiredNullableArrayOfString { get; set; } /// /// Gets or Sets NotrequiredNotnullableArrayOfString /// [DataMember(Name = "notrequired_notnullable_array_of_string", EmitDefaultValue = false)] - public List NotrequiredNotnullableArrayOfString { get; set; } + public Option> NotrequiredNotnullableArrayOfString { get; set; } /// /// Gets or Sets additional properties @@ -904,16 +908,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RequiredNullableIntegerProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); + if (this.NotRequiredNullableIntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); - if (this.NotRequiredNullableIntegerProp != null) + if (this.NotRequiredNotnullableintegerProp.IsSet) { - hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.GetHashCode(); if (this.RequiredNullableStringProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableStringProp.GetHashCode(); @@ -922,24 +926,24 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableStringProp.GetHashCode(); } - if (this.NotrequiredNullableStringProp != null) + if (this.NotrequiredNullableStringProp.IsSet && this.NotrequiredNullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableStringProp != null) + if (this.NotrequiredNotnullableStringProp.IsSet && this.NotrequiredNotnullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.Value.GetHashCode(); } - if (this.RequiredNullableBooleanProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); + if (this.NotrequiredNullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); - if (this.NotrequiredNullableBooleanProp != null) + if (this.NotrequiredNotnullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.GetHashCode(); if (this.RequiredNullableDateProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableDateProp.GetHashCode(); @@ -948,13 +952,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotNullableDateProp.GetHashCode(); } - if (this.NotRequiredNullableDateProp != null) + if (this.NotRequiredNullableDateProp.IsSet && this.NotRequiredNullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.Value.GetHashCode(); } - if (this.NotRequiredNotnullableDateProp != null) + if (this.NotRequiredNotnullableDateProp.IsSet && this.NotRequiredNotnullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.Value.GetHashCode(); } if (this.RequiredNotnullableDatetimeProp != null) { @@ -964,30 +968,54 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNullableDatetimeProp.GetHashCode(); } - if (this.NotrequiredNullableDatetimeProp != null) + if (this.NotrequiredNullableDatetimeProp.IsSet && this.NotrequiredNullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableDatetimeProp != null) + if (this.NotrequiredNotnullableDatetimeProp.IsSet && this.NotrequiredNotnullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.RequiredNullableEnumInteger.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.GetHashCode(); + if (this.NotrequiredNullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableEnumIntegerOnly.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.GetHashCode(); + if (this.NotrequiredNullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNotnullableEnumString.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.GetHashCode(); + if (this.NotrequiredNullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableOuterEnumDefaultValue.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.GetHashCode(); + if (this.NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.Value.GetHashCode(); + } if (this.RequiredNullableUuid != null) { hashCode = (hashCode * 59) + this.RequiredNullableUuid.GetHashCode(); @@ -996,13 +1024,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableUuid.GetHashCode(); } - if (this.NotrequiredNullableUuid != null) + if (this.NotrequiredNullableUuid.IsSet && this.NotrequiredNullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.Value.GetHashCode(); } - if (this.NotrequiredNotnullableUuid != null) + if (this.NotrequiredNotnullableUuid.IsSet && this.NotrequiredNotnullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.Value.GetHashCode(); } if (this.RequiredNullableArrayOfString != null) { @@ -1012,13 +1040,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableArrayOfString.GetHashCode(); } - if (this.NotrequiredNullableArrayOfString != null) + if (this.NotrequiredNullableArrayOfString.IsSet && this.NotrequiredNullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.Value.GetHashCode(); } - if (this.NotrequiredNotnullableArrayOfString != null) + if (this.NotrequiredNotnullableArrayOfString.IsSet && this.NotrequiredNotnullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs index fec56c44fa82..077005d6cc27 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class Return : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varReturn. - public Return(int varReturn = default(int)) + public Return(Option varReturn = default(Option)) { this.VarReturn = varReturn; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class Return : IEquatable, IValidatableObject /// Gets or Sets VarReturn /// [DataMember(Name = "return", EmitDefaultValue = false)] - public int VarReturn { get; set; } + public Option VarReturn { get; set; } /// /// Gets or Sets additional properties @@ -106,7 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.VarReturn.GetHashCode(); + if (this.VarReturn.IsSet) + { + hashCode = (hashCode * 59) + this.VarReturn.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 4523238ad385..53d7053be15e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// /// roleUuid. /// role. - public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole)) + public RolesReportsHash(Option roleUuid = default(Option), Option role = default(Option)) { + // to ensure "roleUuid" (not nullable) is not null + if (roleUuid.IsSet && roleUuid.Value == null) + { + throw new ArgumentNullException("roleUuid isn't a nullable property for RolesReportsHash and cannot be null"); + } + // to ensure "role" (not nullable) is not null + if (role.IsSet && role.Value == null) + { + throw new ArgumentNullException("role isn't a nullable property for RolesReportsHash and cannot be null"); + } this.RoleUuid = roleUuid; this.Role = role; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// Gets or Sets RoleUuid /// [DataMember(Name = "role_uuid", EmitDefaultValue = false)] - public Guid RoleUuid { get; set; } + public Option RoleUuid { get; set; } /// /// Gets or Sets Role /// [DataMember(Name = "role", EmitDefaultValue = false)] - public RolesReportsHashRole Role { get; set; } + public Option Role { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RoleUuid != null) + if (this.RoleUuid.IsSet && this.RoleUuid.Value != null) { - hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.RoleUuid.Value.GetHashCode(); } - if (this.Role != null) + if (this.Role.IsSet && this.Role.Value != null) { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); + hashCode = (hashCode * 59) + this.Role.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index ef21c6091f38..177eddaba12d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Initializes a new instance of the class. /// /// name. - public RolesReportsHashRole(string name = default(string)) + public RolesReportsHashRole(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for RolesReportsHashRole and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 1510bd5c512d..a3ba20fa6c48 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected ScaleneTriangle() /// triangleType (required). public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ScaleneTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for ScaleneTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 12e4af151482..f7f7c7dcc627 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 9f8b4dd35b35..52027034071a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected ShapeInterface() /// shapeType (required). public ShapeInterface(string shapeType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 6d8279a8beda..b5fc4a013b0a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 266dcfee794c..1d5698e4b2ba 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected SimpleQuadrilateral() /// quadrilateralType (required). public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 33320b76cf1f..8778d6b6381c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// /// specialPropertyName. /// varSpecialModelName. - public SpecialModelName(long specialPropertyName = default(long), string varSpecialModelName = default(string)) + public SpecialModelName(Option specialPropertyName = default(Option), Option varSpecialModelName = default(Option)) { + // to ensure "varSpecialModelName" (not nullable) is not null + if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) + { + throw new ArgumentNullException("varSpecialModelName isn't a nullable property for SpecialModelName and cannot be null"); + } this.SpecialPropertyName = specialPropertyName; this.VarSpecialModelName = varSpecialModelName; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// Gets or Sets SpecialPropertyName /// [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] - public long SpecialPropertyName { get; set; } + public Option SpecialPropertyName { get; set; } /// /// Gets or Sets VarSpecialModelName /// [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string VarSpecialModelName { get; set; } + public Option VarSpecialModelName { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.VarSpecialModelName != null) + if (this.SpecialPropertyName.IsSet) + { + hashCode = (hashCode * 59) + this.SpecialPropertyName.Value.GetHashCode(); + } + if (this.VarSpecialModelName.IsSet && this.VarSpecialModelName.Value != null) { - hashCode = (hashCode * 59) + this.VarSpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.VarSpecialModelName.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 58eb2c605d15..74c5d5104142 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Tag : IEquatable, IValidatableObject /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this.Id = id; this.Name = name; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class Tag : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index f7782b6fd5a7..72bd1b369aeb 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordList : IEquatable class. /// /// value. - public TestCollectionEndingWithWordList(string value = default(string)) + public TestCollectionEndingWithWordList(Option value = default(Option)) { + // to ensure "value" (not nullable) is not null + if (value.IsSet && value.Value == null) + { + throw new ArgumentNullException("value isn't a nullable property for TestCollectionEndingWithWordList and cannot be null"); + } this.Value = value; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestCollectionEndingWithWordList : IEquatable [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } + public Option Value { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Value != null) + if (this.Value.IsSet && this.Value.Value != null) { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 8498a5eca78f..6e00826d7870 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable class. /// /// testCollectionEndingWithWordList. - public TestCollectionEndingWithWordListObject(List testCollectionEndingWithWordList = default(List)) + public TestCollectionEndingWithWordListObject(Option> testCollectionEndingWithWordList = default(Option>)) { + // to ensure "testCollectionEndingWithWordList" (not nullable) is not null + if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) + { + throw new ArgumentNullException("testCollectionEndingWithWordList isn't a nullable property for TestCollectionEndingWithWordListObject and cannot be null"); + } this.TestCollectionEndingWithWordList = testCollectionEndingWithWordList; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable [DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)] - public List TestCollectionEndingWithWordList { get; set; } + public Option> TestCollectionEndingWithWordList { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.TestCollectionEndingWithWordList != null) + if (this.TestCollectionEndingWithWordList.IsSet && this.TestCollectionEndingWithWordList.Value != null) { - hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.GetHashCode(); + hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 457b88ac9c74..aca5c0652ab6 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Initializes a new instance of the class. /// /// someProperty. - public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) + public TestInlineFreeformAdditionalPropertiesRequest(Option someProperty = default(Option)) { + // to ensure "someProperty" (not nullable) is not null + if (someProperty.IsSet && someProperty.Value == null) + { + throw new ArgumentNullException("someProperty isn't a nullable property for TestInlineFreeformAdditionalPropertiesRequest and cannot be null"); + } this.SomeProperty = someProperty; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Gets or Sets SomeProperty /// [DataMember(Name = "someProperty", EmitDefaultValue = false)] - public string SomeProperty { get; set; } + public Option SomeProperty { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SomeProperty != null) + if (this.SomeProperty.IsSet && this.SomeProperty.Value != null) { - hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.SomeProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 37729a438160..4874223e8554 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index 34fa15105dca..fc45b2b8d370 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected TriangleInterface() /// triangleType (required). public TriangleInterface(string triangleType = default(string)) { - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs index b7911507a704..4c20f415c024 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,43 @@ public partial class User : IEquatable, IValidatableObject /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) + public User(Option id = default(Option), Option username = default(Option), Option firstName = default(Option), Option lastName = default(Option), Option email = default(Option), Option password = default(Option), Option phone = default(Option), Option userStatus = default(Option), Option objectWithNoDeclaredProps = default(Option), Option objectWithNoDeclaredPropsNullable = default(Option), Option anyTypeProp = default(Option), Option anyTypePropNullable = default(Option)) { + // to ensure "username" (not nullable) is not null + if (username.IsSet && username.Value == null) + { + throw new ArgumentNullException("username isn't a nullable property for User and cannot be null"); + } + // to ensure "firstName" (not nullable) is not null + if (firstName.IsSet && firstName.Value == null) + { + throw new ArgumentNullException("firstName isn't a nullable property for User and cannot be null"); + } + // to ensure "lastName" (not nullable) is not null + if (lastName.IsSet && lastName.Value == null) + { + throw new ArgumentNullException("lastName isn't a nullable property for User and cannot be null"); + } + // to ensure "email" (not nullable) is not null + if (email.IsSet && email.Value == null) + { + throw new ArgumentNullException("email isn't a nullable property for User and cannot be null"); + } + // to ensure "password" (not nullable) is not null + if (password.IsSet && password.Value == null) + { + throw new ArgumentNullException("password isn't a nullable property for User and cannot be null"); + } + // to ensure "phone" (not nullable) is not null + if (phone.IsSet && phone.Value == null) + { + throw new ArgumentNullException("phone isn't a nullable property for User and cannot be null"); + } + // to ensure "objectWithNoDeclaredProps" (not nullable) is not null + if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) + { + throw new ArgumentNullException("objectWithNoDeclaredProps isn't a nullable property for User and cannot be null"); + } this.Id = id; this.Username = username; this.FirstName = firstName; @@ -68,78 +104,78 @@ public partial class User : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Username /// [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } + public Option Username { get; set; } /// /// Gets or Sets FirstName /// [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } + public Option FirstName { get; set; } /// /// Gets or Sets LastName /// [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } + public Option LastName { get; set; } /// /// Gets or Sets Email /// [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } + public Option Email { get; set; } /// /// Gets or Sets Password /// [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } + public Option Password { get; set; } /// /// Gets or Sets Phone /// [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } + public Option Phone { get; set; } /// /// User Status /// /// User Status [DataMember(Name = "userStatus", EmitDefaultValue = false)] - public int UserStatus { get; set; } + public Option UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] - public Object ObjectWithNoDeclaredProps { get; set; } + public Option ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] - public Object ObjectWithNoDeclaredPropsNullable { get; set; } + public Option ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] - public Object AnyTypeProp { get; set; } + public Option AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] - public Object AnyTypePropNullable { get; set; } + public Option AnyTypePropNullable { get; set; } /// /// Gets or Sets additional properties @@ -210,47 +246,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Username.IsSet && this.Username.Value != null) + { + hashCode = (hashCode * 59) + this.Username.Value.GetHashCode(); + } + if (this.FirstName.IsSet && this.FirstName.Value != null) { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); + hashCode = (hashCode * 59) + this.FirstName.Value.GetHashCode(); } - if (this.FirstName != null) + if (this.LastName.IsSet && this.LastName.Value != null) { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.LastName.Value.GetHashCode(); } - if (this.LastName != null) + if (this.Email.IsSet && this.Email.Value != null) { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + hashCode = (hashCode * 59) + this.Email.Value.GetHashCode(); } - if (this.Email != null) + if (this.Password.IsSet && this.Password.Value != null) { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); + hashCode = (hashCode * 59) + this.Password.Value.GetHashCode(); } - if (this.Password != null) + if (this.Phone.IsSet && this.Phone.Value != null) { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); + hashCode = (hashCode * 59) + this.Phone.Value.GetHashCode(); } - if (this.Phone != null) + if (this.UserStatus.IsSet) { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); + hashCode = (hashCode * 59) + this.UserStatus.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) + if (this.ObjectWithNoDeclaredProps.IsSet && this.ObjectWithNoDeclaredProps.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.Value.GetHashCode(); } - if (this.ObjectWithNoDeclaredPropsNullable != null) + if (this.ObjectWithNoDeclaredPropsNullable.IsSet && this.ObjectWithNoDeclaredPropsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.Value.GetHashCode(); } - if (this.AnyTypeProp != null) + if (this.AnyTypeProp.IsSet && this.AnyTypeProp.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypeProp.Value.GetHashCode(); } - if (this.AnyTypePropNullable != null) + if (this.AnyTypePropNullable.IsSet && this.AnyTypePropNullable.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypePropNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 50119ed39e76..2038fc78e8db 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,16 +47,16 @@ protected Whale() /// hasBaleen. /// hasTeeth. /// className (required). - public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) + public Whale(Option hasBaleen = default(Option), Option hasTeeth = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Whale and cannot be null"); } - this.ClassName = className; this.HasBaleen = hasBaleen; this.HasTeeth = hasTeeth; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -63,13 +64,13 @@ protected Whale() /// Gets or Sets HasBaleen /// [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] - public bool HasBaleen { get; set; } + public Option HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] - public bool HasTeeth { get; set; } + public Option HasTeeth { get; set; } /// /// Gets or Sets ClassName @@ -137,8 +138,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); + if (this.HasBaleen.IsSet) + { + hashCode = (hashCode * 59) + this.HasBaleen.Value.GetHashCode(); + } + if (this.HasTeeth.IsSet) + { + hashCode = (hashCode * 59) + this.HasTeeth.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 314fae589fc5..3bb224da1e43 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,7 +63,7 @@ public enum TypeEnum /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } + public Option Type { get; set; } /// /// Initializes a new instance of the class. /// @@ -76,15 +77,15 @@ protected Zebra() /// /// type. /// className (required). - public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) + public Zebra(Option type = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Zebra and cannot be null"); } - this.ClassName = className; this.Type = type; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -153,7 +154,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Type.IsSet) + { + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs index b4ff8d51adb7..15c623dc8d8f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 617dcd5f7a09..daccbc984737 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,12 +57,12 @@ public enum ZeroBasedEnumEnum /// Gets or Sets ZeroBasedEnum /// [DataMember(Name = "ZeroBasedEnum", EmitDefaultValue = false)] - public ZeroBasedEnumEnum? ZeroBasedEnum { get; set; } + public Option ZeroBasedEnum { get; set; } /// /// Initializes a new instance of the class. /// /// zeroBasedEnum. - public ZeroBasedEnumClass(ZeroBasedEnumEnum? zeroBasedEnum = default(ZeroBasedEnumEnum?)) + public ZeroBasedEnumClass(Option zeroBasedEnum = default(Option)) { this.ZeroBasedEnum = zeroBasedEnum; this.AdditionalProperties = new Dictionary(); @@ -125,7 +126,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.ZeroBasedEnum.GetHashCode(); + if (this.ZeroBasedEnum.IsSet) + { + hashCode = (hashCode * 59) + this.ZeroBasedEnum.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/.openapi-generator/FILES index c6424794961a..e662c2362228 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/.openapi-generator/FILES @@ -132,6 +132,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FakeApi.md index 06309f31e8a5..b926dc908fd9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool? body = null) +> bool FakeOuterBooleanSerialize (bool body = null) @@ -134,7 +134,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = true; // bool? | Input boolean as post body (optional) + var body = true; // bool | Input boolean as post body (optional) try { @@ -175,7 +175,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **bool?** | Input boolean as post body | [optional] | +| **body** | **bool** | Input boolean as post body | [optional] | ### Return type @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal? body = null) +> decimal FakeOuterNumberSerialize (decimal body = null) @@ -312,7 +312,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14D; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal | Input number as post body (optional) try { @@ -353,7 +353,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **decimal?** | Input number as post body | [optional] | +| **body** | **decimal** | Input number as post body | [optional] | ### Return type @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1098,14 +1098,14 @@ namespace Example var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789L; // long? | None (optional) - var varFloat = 3.4F; // float? | None (optional) + var integer = 56; // int | None (optional) + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var varFloat = 3.4F; // float | None (optional) var varString = "varString_example"; // string | None (optional) var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) @@ -1150,14 +1150,14 @@ catch (ApiException e) | **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int?** | None | [optional] | -| **int32** | **int?** | None | [optional] | -| **int64** | **long?** | None | [optional] | -| **varFloat** | **float?** | None | [optional] | +| **integer** | **int** | None | [optional] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **varFloat** | **float** | None | [optional] | | **varString** | **string** | None | [optional] | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | -| **date** | **DateTime?** | None | [optional] | -| **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **date** | **DateTime** | None | [optional] | +| **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | | **password** | **string** | None | [optional] | | **callback** | **string** | None | [optional] | @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -1212,8 +1212,8 @@ namespace Example var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -1258,8 +1258,8 @@ catch (ApiException e) | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | -| **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | | **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) Fake endpoint to test group parameters (optional) @@ -1316,9 +1316,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789L; // long? | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) + var booleanGroup = true; // bool | Boolean in group parameters (optional) + var int64Group = 789L; // long | Integer in group parameters (optional) try { @@ -1360,9 +1360,9 @@ catch (ApiException e) | **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | -| **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | -| **int64Group** | **long?** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | +| **booleanGroup** | **bool** | Boolean in group parameters | [optional] | +| **int64Group** | **long** | Integer in group parameters | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/RequiredClass.md b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/RequiredClass.md index 07b6f018f6c1..3400459756d2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/RequiredClass.md +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/RequiredClass.md @@ -33,8 +33,8 @@ Name | Type | Description | Notes **NotrequiredNullableEnumIntegerOnly** | **int?** | | [optional] **NotrequiredNotnullableEnumIntegerOnly** | **int** | | [optional] **RequiredNotnullableEnumString** | **string** | | -**RequiredNullableEnumString** | **string** | | -**NotrequiredNullableEnumString** | **string** | | [optional] +**RequiredNullableEnumString** | **string?** | | +**NotrequiredNullableEnumString** | **string?** | | [optional] **NotrequiredNotnullableEnumString** | **string** | | [optional] **RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | **RequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 95d41fcbd942..3437138cacd2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -301,9 +299,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs index 354f9eb6d9f2..11aeb829749a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -517,9 +517,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -588,9 +586,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index 82d3054c5a90..85535bfbd190 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -55,7 +55,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); + bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -67,7 +67,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -78,7 +78,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0); /// /// @@ -90,7 +90,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0); /// /// /// @@ -101,7 +101,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); + decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -113,7 +113,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -125,7 +125,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// string - string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string), int operationIndex = 0); + string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// @@ -138,7 +138,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string), int operationIndex = 0); + ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// Array of Enums /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -329,7 +329,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// To test enum parameters /// @@ -347,7 +347,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// To test enum parameters @@ -366,7 +366,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -382,7 +382,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -399,7 +399,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// test inline additionalProperties /// @@ -480,7 +480,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// @@ -500,7 +500,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// test referenced string map /// @@ -564,7 +564,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -577,7 +577,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -589,7 +589,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -602,7 +602,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -614,7 +614,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -627,7 +627,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -640,7 +640,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -654,7 +654,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -850,7 +850,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -876,7 +876,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -895,7 +895,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -915,7 +915,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -932,7 +932,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -950,7 +950,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -1047,7 +1047,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -1068,7 +1068,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test referenced string map /// @@ -1347,7 +1347,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) + public bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1360,7 +1360,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1413,7 +1413,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1427,7 +1427,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1481,7 +1481,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1494,8 +1494,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1547,7 +1551,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1561,8 +1565,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1615,7 +1623,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) + public decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1628,7 +1636,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1681,7 +1689,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1695,7 +1703,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1750,7 +1758,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string), int operationIndex = 0) + public string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, body); return localVarResponse.Data; @@ -1764,8 +1772,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1819,7 +1835,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(requiredStringUuid, body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1834,8 +1850,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2283,9 +2307,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2354,9 +2376,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2425,9 +2445,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2496,9 +2514,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2569,15 +2585,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2649,15 +2661,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2728,9 +2736,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2801,9 +2807,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2870,7 +2874,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); } @@ -2895,19 +2899,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2931,49 +2955,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3021,7 +3045,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEndpointParametersWithHttpInfoAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3047,19 +3071,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3084,49 +3128,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3168,7 +3212,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -3187,8 +3231,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -3211,37 +3279,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3277,7 +3345,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3297,8 +3365,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3322,37 +3414,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3386,7 +3478,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -3403,7 +3495,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3428,18 +3520,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3479,7 +3571,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3497,7 +3589,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3523,18 +3615,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3585,9 +3677,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3656,9 +3746,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3727,9 +3815,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3798,9 +3884,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3871,15 +3955,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3951,15 +4031,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4021,7 +4097,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } @@ -4041,49 +4117,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4113,13 +4183,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4156,7 +4226,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -4177,49 +4247,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4250,13 +4314,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4301,9 +4365,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4372,9 +4434,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index dd74c66d1544..9f168cc6adb2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -306,9 +304,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs index 7a34dc4fe192..20b583356df9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs @@ -55,7 +55,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); + void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Deletes a pet @@ -68,7 +68,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); + ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Finds Pets by status /// @@ -169,7 +169,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -183,7 +183,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// uploads an image /// @@ -193,7 +193,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image @@ -207,7 +207,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image (required) /// @@ -217,7 +217,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); /// /// uploads an image (required) @@ -231,7 +231,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -278,7 +278,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -292,7 +292,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -408,7 +408,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -423,7 +423,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -437,7 +437,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -452,7 +452,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -466,7 +466,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -481,7 +481,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -625,9 +625,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -729,9 +727,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -818,7 +814,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) + public void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -831,8 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -855,9 +855,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -903,7 +903,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -917,8 +917,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -942,9 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -1006,9 +1010,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1111,9 +1113,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1218,9 +1218,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,9 +1323,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1583,9 +1579,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1687,9 +1681,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1777,7 +1769,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1791,8 +1783,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1816,13 +1816,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1869,7 +1869,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1884,8 +1884,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1910,13 +1918,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1963,7 +1971,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1978,8 +1986,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2004,13 +2020,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2057,7 +2073,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2073,8 +2089,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2100,13 +2124,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2153,7 +2177,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -2168,13 +2192,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2201,9 +2227,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); @@ -2251,7 +2277,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2267,13 +2293,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2301,9 +2329,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs index e8bed0a150ec..1ffc5a694f5b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -364,9 +364,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -434,9 +432,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -775,9 +771,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -849,9 +843,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index 8efb827cdc00..3a89a6e99556 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -552,9 +552,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -623,9 +621,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -694,9 +690,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -765,9 +759,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -836,9 +828,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -907,9 +897,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -978,9 +966,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1048,9 +1034,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1119,9 +1103,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1192,9 +1174,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1267,15 +1247,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1349,15 +1325,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1552,15 +1524,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1632,15 +1600,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index a55d7f34afc6..9c2644600398 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -32,6 +32,7 @@ using Polly; using Org.OpenAPITools.Client.Auth; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -51,7 +52,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -185,7 +187,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..722d06c6b323 --- /dev/null +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,124 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + Type innerType = value.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 08a39249cb82..64ec72ede072 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class Activity : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// activityOutputs. - public Activity(Dictionary> activityOutputs = default(Dictionary>)) + public Activity(Option>> activityOutputs = default(Option>>)) { + // to ensure "activityOutputs" (not nullable) is not null + if (activityOutputs.IsSet && activityOutputs.Value == null) + { + throw new ArgumentNullException("activityOutputs isn't a nullable property for Activity and cannot be null"); + } this.ActivityOutputs = activityOutputs; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class Activity : IEquatable, IValidatableObject /// Gets or Sets ActivityOutputs /// [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] - public Dictionary> ActivityOutputs { get; set; } + public Option>> ActivityOutputs { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActivityOutputs != null) + if (this.ActivityOutputs.IsSet && this.ActivityOutputs.Value != null) { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); + hashCode = (hashCode * 59) + this.ActivityOutputs.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index dce3f9134dbb..1b186a8771ed 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class ActivityOutputElementRepresentation : IEquatable /// prop1. /// prop2. - public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + public ActivityOutputElementRepresentation(Option prop1 = default(Option), Option prop2 = default(Option)) { + // to ensure "prop1" (not nullable) is not null + if (prop1.IsSet && prop1.Value == null) + { + throw new ArgumentNullException("prop1 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } + // to ensure "prop2" (not nullable) is not null + if (prop2.IsSet && prop2.Value == null) + { + throw new ArgumentNullException("prop2 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } this.Prop1 = prop1; this.Prop2 = prop2; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class ActivityOutputElementRepresentation : IEquatable [DataMember(Name = "prop1", EmitDefaultValue = false)] - public string Prop1 { get; set; } + public Option Prop1 { get; set; } /// /// Gets or Sets Prop2 /// [DataMember(Name = "prop2", EmitDefaultValue = false)] - public Object Prop2 { get; set; } + public Option Prop2 { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Prop1 != null) + if (this.Prop1.IsSet && this.Prop1.Value != null) { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop1.Value.GetHashCode(); } - if (this.Prop2 != null) + if (this.Prop2.IsSet && this.Prop2.Value != null) { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop2.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index c83597fc607e..c84fba57b967 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,8 +44,43 @@ public partial class AdditionalPropertiesClass : IEquatablemapWithUndeclaredPropertiesAnytype3. /// an object with no declared properties and no undeclared properties, hence it's an empty map.. /// mapWithUndeclaredPropertiesString. - public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) + public AdditionalPropertiesClass(Option> mapProperty = default(Option>), Option>> mapOfMapProperty = default(Option>>), Option anytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype2 = default(Option), Option> mapWithUndeclaredPropertiesAnytype3 = default(Option>), Option emptyMap = default(Option), Option> mapWithUndeclaredPropertiesString = default(Option>)) { + // to ensure "mapProperty" (not nullable) is not null + if (mapProperty.IsSet && mapProperty.Value == null) + { + throw new ArgumentNullException("mapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapOfMapProperty" (not nullable) is not null + if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) + { + throw new ArgumentNullException("mapOfMapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype1" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype2" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype3" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "emptyMap" (not nullable) is not null + if (emptyMap.IsSet && emptyMap.Value == null) + { + throw new ArgumentNullException("emptyMap isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesString" (not nullable) is not null + if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesString isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } this.MapProperty = mapProperty; this.MapOfMapProperty = mapOfMapProperty; this.Anytype1 = anytype1; @@ -60,50 +96,50 @@ public partial class AdditionalPropertiesClass : IEquatable [DataMember(Name = "map_property", EmitDefaultValue = false)] - public Dictionary MapProperty { get; set; } + public Option> MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] - public Dictionary> MapOfMapProperty { get; set; } + public Option>> MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// [DataMember(Name = "anytype_1", EmitDefaultValue = true)] - public Object Anytype1 { get; set; } + public Option Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } + public Option> MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. [DataMember(Name = "empty_map", EmitDefaultValue = false)] - public Object EmptyMap { get; set; } + public Option EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesString { get; set; } + public Option> MapWithUndeclaredPropertiesString { get; set; } /// /// Gets or Sets additional properties @@ -170,37 +206,37 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapProperty != null) + if (this.MapProperty.IsSet && this.MapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapProperty.Value.GetHashCode(); } - if (this.MapOfMapProperty != null) + if (this.MapOfMapProperty.IsSet && this.MapOfMapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfMapProperty.Value.GetHashCode(); } - if (this.Anytype1 != null) + if (this.Anytype1.IsSet && this.Anytype1.Value != null) { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.Anytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) + if (this.MapWithUndeclaredPropertiesAnytype1.IsSet && this.MapWithUndeclaredPropertiesAnytype1.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) + if (this.MapWithUndeclaredPropertiesAnytype2.IsSet && this.MapWithUndeclaredPropertiesAnytype2.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) + if (this.MapWithUndeclaredPropertiesAnytype3.IsSet && this.MapWithUndeclaredPropertiesAnytype3.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.Value.GetHashCode(); } - if (this.EmptyMap != null) + if (this.EmptyMap.IsSet && this.EmptyMap.Value != null) { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); + hashCode = (hashCode * 59) + this.EmptyMap.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesString != null) + if (this.MapWithUndeclaredPropertiesString.IsSet && this.MapWithUndeclaredPropertiesString.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 9ddb56ebad6c..a9332678ea77 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -49,16 +50,20 @@ protected Animal() /// /// className (required). /// color (default to "red"). - public Animal(string className = default(string), string color = @"red") + public Animal(string className = default(string), Option color = default(Option)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Animal and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for Animal and cannot be null"); } this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? @"red"; + this.Color = color.IsSet ? color : new Option(@"red"); this.AdditionalProperties = new Dictionary(); } @@ -72,7 +77,7 @@ protected Animal() /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Gets or Sets additional properties @@ -137,9 +142,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); } - if (this.Color != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index e55d523aad1f..72fba0eefb19 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,18 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// code. /// type. /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) + public ApiResponse(Option code = default(Option), Option type = default(Option), Option message = default(Option)) { + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for ApiResponse and cannot be null"); + } + // to ensure "message" (not nullable) is not null + if (message.IsSet && message.Value == null) + { + throw new ArgumentNullException("message isn't a nullable property for ApiResponse and cannot be null"); + } this.Code = code; this.Type = type; this.Message = message; @@ -50,19 +61,19 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// Gets or Sets Code /// [DataMember(Name = "code", EmitDefaultValue = false)] - public int Code { get; set; } + public Option Code { get; set; } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + public Option Type { get; set; } /// /// Gets or Sets Message /// [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } + public Option Message { get; set; } /// /// Gets or Sets additional properties @@ -124,14 +135,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) + if (this.Code.IsSet) + { + hashCode = (hashCode * 59) + this.Code.Value.GetHashCode(); + } + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.Message != null) + if (this.Message.IsSet && this.Message.Value != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this.Message.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 8d3f9af56df6..f085a6b77f31 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class Apple : IEquatable, IValidatableObject /// cultivar. /// origin. /// colorCode. - public Apple(string cultivar = default(string), string origin = default(string), string colorCode = default(string)) + public Apple(Option cultivar = default(Option), Option origin = default(Option), Option colorCode = default(Option)) { + // to ensure "cultivar" (not nullable) is not null + if (cultivar.IsSet && cultivar.Value == null) + { + throw new ArgumentNullException("cultivar isn't a nullable property for Apple and cannot be null"); + } + // to ensure "origin" (not nullable) is not null + if (origin.IsSet && origin.Value == null) + { + throw new ArgumentNullException("origin isn't a nullable property for Apple and cannot be null"); + } + // to ensure "colorCode" (not nullable) is not null + if (colorCode.IsSet && colorCode.Value == null) + { + throw new ArgumentNullException("colorCode isn't a nullable property for Apple and cannot be null"); + } this.Cultivar = cultivar; this.Origin = origin; this.ColorCode = colorCode; @@ -50,19 +66,19 @@ public partial class Apple : IEquatable, IValidatableObject /// Gets or Sets Cultivar /// [DataMember(Name = "cultivar", EmitDefaultValue = false)] - public string Cultivar { get; set; } + public Option Cultivar { get; set; } /// /// Gets or Sets Origin /// [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin { get; set; } + public Option Origin { get; set; } /// /// Gets or Sets ColorCode /// [DataMember(Name = "color_code", EmitDefaultValue = false)] - public string ColorCode { get; set; } + public Option ColorCode { get; set; } /// /// Gets or Sets additional properties @@ -124,17 +140,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Cultivar != null) + if (this.Cultivar.IsSet && this.Cultivar.Value != null) { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); + hashCode = (hashCode * 59) + this.Cultivar.Value.GetHashCode(); } - if (this.Origin != null) + if (this.Origin.IsSet && this.Origin.Value != null) { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); + hashCode = (hashCode * 59) + this.Origin.Value.GetHashCode(); } - if (this.ColorCode != null) + if (this.ColorCode.IsSet && this.ColorCode.Value != null) { - hashCode = (hashCode * 59) + this.ColorCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorCode.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index 3eef221be3e3..f2a1e63e3787 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,12 +43,12 @@ protected AppleReq() { } /// /// cultivar (required). /// mealy. - public AppleReq(string cultivar = default(string), bool mealy = default(bool)) + public AppleReq(string cultivar = default(string), Option mealy = default(Option)) { - // to ensure "cultivar" is required (not null) + // to ensure "cultivar" (not nullable) is not null if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); + throw new ArgumentNullException("cultivar isn't a nullable property for AppleReq and cannot be null"); } this.Cultivar = cultivar; this.Mealy = mealy; @@ -63,7 +64,7 @@ protected AppleReq() { } /// Gets or Sets Mealy /// [DataMember(Name = "mealy", EmitDefaultValue = true)] - public bool Mealy { get; set; } + public Option Mealy { get; set; } /// /// Returns the string presentation of the object @@ -121,7 +122,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); + if (this.Mealy.IsSet) + { + hashCode = (hashCode * 59) + this.Mealy.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 3e1666ca90f8..7cc2ebed0e24 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable class. /// /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + public ArrayOfArrayOfNumberOnly(Option>> arrayArrayNumber = default(Option>>)) { + // to ensure "arrayArrayNumber" (not nullable) is not null + if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) + { + throw new ArgumentNullException("arrayArrayNumber isn't a nullable property for ArrayOfArrayOfNumberOnly and cannot be null"); + } this.ArrayArrayNumber = arrayArrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] - public List> ArrayArrayNumber { get; set; } + public Option>> ArrayArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayArrayNumber != null) + if (this.ArrayArrayNumber.IsSet && this.ArrayArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index f2946f435b53..7d85fc169003 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Initializes a new instance of the class. /// /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) + public ArrayOfNumberOnly(Option> arrayNumber = default(Option>)) { + // to ensure "arrayNumber" (not nullable) is not null + if (arrayNumber.IsSet && arrayNumber.Value == null) + { + throw new ArgumentNullException("arrayNumber isn't a nullable property for ArrayOfNumberOnly and cannot be null"); + } this.ArrayNumber = arrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Gets or Sets ArrayNumber /// [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] - public List ArrayNumber { get; set; } + public Option> ArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayNumber != null) + if (this.ArrayNumber.IsSet && this.ArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 343e486f6575..119862eca2e8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// arrayOfString. /// arrayArrayOfInteger. /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + public ArrayTest(Option> arrayOfString = default(Option>), Option>> arrayArrayOfInteger = default(Option>>), Option>> arrayArrayOfModel = default(Option>>)) { + // to ensure "arrayOfString" (not nullable) is not null + if (arrayOfString.IsSet && arrayOfString.Value == null) + { + throw new ArgumentNullException("arrayOfString isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfInteger" (not nullable) is not null + if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) + { + throw new ArgumentNullException("arrayArrayOfInteger isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfModel" (not nullable) is not null + if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) + { + throw new ArgumentNullException("arrayArrayOfModel isn't a nullable property for ArrayTest and cannot be null"); + } this.ArrayOfString = arrayOfString; this.ArrayArrayOfInteger = arrayArrayOfInteger; this.ArrayArrayOfModel = arrayArrayOfModel; @@ -50,19 +66,19 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// Gets or Sets ArrayOfString /// [DataMember(Name = "array_of_string", EmitDefaultValue = false)] - public List ArrayOfString { get; set; } + public Option> ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] - public List> ArrayArrayOfInteger { get; set; } + public Option>> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] - public List> ArrayArrayOfModel { get; set; } + public Option>> ArrayArrayOfModel { get; set; } /// /// Gets or Sets additional properties @@ -124,17 +140,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayOfString != null) + if (this.ArrayOfString.IsSet && this.ArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayOfString.Value.GetHashCode(); } - if (this.ArrayArrayOfInteger != null) + if (this.ArrayArrayOfInteger.IsSet && this.ArrayArrayOfInteger.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.Value.GetHashCode(); } - if (this.ArrayArrayOfModel != null) + if (this.ArrayArrayOfModel.IsSet && this.ArrayArrayOfModel.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfModel.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 04d69550656d..3d6f908c4487 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// lengthCm. - public Banana(decimal lengthCm = default(decimal)) + public Banana(Option lengthCm = default(Option)) { this.LengthCm = lengthCm; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Gets or Sets LengthCm /// [DataMember(Name = "lengthCm", EmitDefaultValue = false)] - public decimal LengthCm { get; set; } + public Option LengthCm { get; set; } /// /// Gets or Sets additional properties @@ -106,7 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); + if (this.LengthCm.IsSet) + { + hashCode = (hashCode * 59) + this.LengthCm.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 360cb5281e80..02703e4025a9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,7 +43,7 @@ protected BananaReq() { } /// /// lengthCm (required). /// sweet. - public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool)) + public BananaReq(decimal lengthCm = default(decimal), Option sweet = default(Option)) { this.LengthCm = lengthCm; this.Sweet = sweet; @@ -58,7 +59,7 @@ protected BananaReq() { } /// Gets or Sets Sweet /// [DataMember(Name = "sweet", EmitDefaultValue = true)] - public bool Sweet { get; set; } + public Option Sweet { get; set; } /// /// Returns the string presentation of the object @@ -113,7 +114,10 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); + if (this.Sweet.IsSet) + { + hashCode = (hashCode * 59) + this.Sweet.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index 868cba98eeea..8771aa57a2b8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected BasquePig() /// className (required). public BasquePig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for BasquePig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index f46fffa0ad6c..46478517456c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -41,8 +42,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// capitalSnake. /// sCAETHFlowPoints. /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) + public Capitalization(Option smallCamel = default(Option), Option capitalCamel = default(Option), Option smallSnake = default(Option), Option capitalSnake = default(Option), Option sCAETHFlowPoints = default(Option), Option aTTNAME = default(Option)) { + // to ensure "smallCamel" (not nullable) is not null + if (smallCamel.IsSet && smallCamel.Value == null) + { + throw new ArgumentNullException("smallCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalCamel" (not nullable) is not null + if (capitalCamel.IsSet && capitalCamel.Value == null) + { + throw new ArgumentNullException("capitalCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "smallSnake" (not nullable) is not null + if (smallSnake.IsSet && smallSnake.Value == null) + { + throw new ArgumentNullException("smallSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalSnake" (not nullable) is not null + if (capitalSnake.IsSet && capitalSnake.Value == null) + { + throw new ArgumentNullException("capitalSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "sCAETHFlowPoints" (not nullable) is not null + if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) + { + throw new ArgumentNullException("sCAETHFlowPoints isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "aTTNAME" (not nullable) is not null + if (aTTNAME.IsSet && aTTNAME.Value == null) + { + throw new ArgumentNullException("aTTNAME isn't a nullable property for Capitalization and cannot be null"); + } this.SmallCamel = smallCamel; this.CapitalCamel = capitalCamel; this.SmallSnake = smallSnake; @@ -56,38 +87,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// Gets or Sets SmallCamel /// [DataMember(Name = "smallCamel", EmitDefaultValue = false)] - public string SmallCamel { get; set; } + public Option SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] - public string CapitalCamel { get; set; } + public Option CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// [DataMember(Name = "small_Snake", EmitDefaultValue = false)] - public string SmallSnake { get; set; } + public Option SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] - public string CapitalSnake { get; set; } + public Option CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] - public string SCAETHFlowPoints { get; set; } + public Option SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] - public string ATT_NAME { get; set; } + public Option ATT_NAME { get; set; } /// /// Gets or Sets additional properties @@ -152,29 +183,29 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SmallCamel != null) + if (this.SmallCamel.IsSet && this.SmallCamel.Value != null) { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallCamel.Value.GetHashCode(); } - if (this.CapitalCamel != null) + if (this.CapitalCamel.IsSet && this.CapitalCamel.Value != null) { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalCamel.Value.GetHashCode(); } - if (this.SmallSnake != null) + if (this.SmallSnake.IsSet && this.SmallSnake.Value != null) { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallSnake.Value.GetHashCode(); } - if (this.CapitalSnake != null) + if (this.CapitalSnake.IsSet && this.CapitalSnake.Value != null) { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalSnake.Value.GetHashCode(); } - if (this.SCAETHFlowPoints != null) + if (this.SCAETHFlowPoints.IsSet && this.SCAETHFlowPoints.Value != null) { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); + hashCode = (hashCode * 59) + this.SCAETHFlowPoints.Value.GetHashCode(); } - if (this.ATT_NAME != null) + if (this.ATT_NAME.IsSet && this.ATT_NAME.Value != null) { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); + hashCode = (hashCode * 59) + this.ATT_NAME.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs index a427b55727d7..c2e163db6026 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,7 +49,7 @@ protected Cat() /// declawed. /// className (required) (default to "Cat"). /// color (default to "red"). - public Cat(bool declawed = default(bool), string className = @"Cat", string color = @"red") : base(className, color) + public Cat(Option declawed = default(Option), string className = @"Cat", Option color = default(Option)) : base(className, color) { this.Declawed = declawed; this.AdditionalProperties = new Dictionary(); @@ -58,7 +59,7 @@ protected Cat() /// Gets or Sets Declawed /// [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed { get; set; } + public Option Declawed { get; set; } /// /// Gets or Sets additional properties @@ -119,7 +120,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); + if (this.Declawed.IsSet) + { + hashCode = (hashCode * 59) + this.Declawed.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs index 5edb4edfea4a..fa5cfbd9a2d5 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,15 +46,15 @@ protected Category() /// /// id. /// name (required) (default to "default-name"). - public Category(long id = default(long), string name = @"default-name") + public Category(Option id = default(Option), string name = @"default-name") { - // to ensure "name" is required (not null) + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); } - this.Name = name; this.Id = id; + this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -61,7 +62,7 @@ protected Category() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name @@ -128,7 +129,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index a5d404bd17d6..fd54f56a6ea9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -66,10 +67,15 @@ protected ChildCat() /// /// name. /// petType (required) (default to PetTypeEnum.ChildCat). - public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() + public ChildCat(Option name = default(Option), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.PetType = petType; + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for ChildCat and cannot be null"); + } this.Name = name; + this.PetType = petType; this.AdditionalProperties = new Dictionary(); } @@ -77,7 +83,7 @@ protected ChildCat() /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -139,9 +145,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.PetType.GetHashCode(); if (this.AdditionalProperties != null) diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 7a0846aec4e1..c7e10769716c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClass. - public ClassModel(string varClass = default(string)) + public ClassModel(Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for ClassModel and cannot be null"); + } this.Class = varClass; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Gets or Sets Class /// [DataMember(Name = "_class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Class != null) + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index bbed21283745..fbabd075d34f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected ComplexQuadrilateral() /// quadrilateralType (required). public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 3c81f50d00d7..3816eb30acd4 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected DanishPig() /// className (required). public DanishPig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for DanishPig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 9933ec57ea9e..3b5f665905e4 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// dateOnlyProperty. - public DateOnlyClass(DateTime dateOnlyProperty = default(DateTime)) + public DateOnlyClass(Option dateOnlyProperty = default(Option)) { + // to ensure "dateOnlyProperty" (not nullable) is not null + if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) + { + throw new ArgumentNullException("dateOnlyProperty isn't a nullable property for DateOnlyClass and cannot be null"); + } this.DateOnlyProperty = dateOnlyProperty; this.AdditionalProperties = new Dictionary(); } @@ -48,7 +54,7 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Fri Jul 21 00:00:00 UTC 2017 [DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOnlyProperty { get; set; } + public Option DateOnlyProperty { get; set; } /// /// Gets or Sets additional properties @@ -108,9 +114,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.DateOnlyProperty != null) + if (this.DateOnlyProperty.IsSet && this.DateOnlyProperty.Value != null) { - hashCode = (hashCode * 59) + this.DateOnlyProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.DateOnlyProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 2895d518a81f..d323606d4072 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Initializes a new instance of the class. /// /// name. - public DeprecatedObject(string name = default(string)) + public DeprecatedObject(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for DeprecatedObject and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 44f95fa0fe05..d638ec7f4551 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,8 +49,13 @@ protected Dog() /// breed. /// className (required) (default to "Dog"). /// color (default to "red"). - public Dog(string breed = default(string), string className = @"Dog", string color = @"red") : base(className, color) + public Dog(Option breed = default(Option), string className = @"Dog", Option color = default(Option)) : base(className, color) { + // to ensure "breed" (not nullable) is not null + if (breed.IsSet && breed.Value == null) + { + throw new ArgumentNullException("breed isn't a nullable property for Dog and cannot be null"); + } this.Breed = breed; this.AdditionalProperties = new Dictionary(); } @@ -58,7 +64,7 @@ protected Dog() /// Gets or Sets Breed /// [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed { get; set; } + public Option Breed { get; set; } /// /// Gets or Sets additional properties @@ -119,9 +125,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) + if (this.Breed.IsSet && this.Breed.Value != null) { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); + hashCode = (hashCode * 59) + this.Breed.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 98c683539e6f..bcb1878282cf 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,18 @@ public partial class Drawing : IEquatable, IValidatableObject /// shapeOrNull. /// nullableShape. /// shapes. - public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) + public Drawing(Option mainShape = default(Option), Option shapeOrNull = default(Option), Option nullableShape = default(Option), Option> shapes = default(Option>)) { + // to ensure "mainShape" (not nullable) is not null + if (mainShape.IsSet && mainShape.Value == null) + { + throw new ArgumentNullException("mainShape isn't a nullable property for Drawing and cannot be null"); + } + // to ensure "shapes" (not nullable) is not null + if (shapes.IsSet && shapes.Value == null) + { + throw new ArgumentNullException("shapes isn't a nullable property for Drawing and cannot be null"); + } this.MainShape = mainShape; this.ShapeOrNull = shapeOrNull; this.NullableShape = nullableShape; @@ -52,25 +63,25 @@ public partial class Drawing : IEquatable, IValidatableObject /// Gets or Sets MainShape /// [DataMember(Name = "mainShape", EmitDefaultValue = false)] - public Shape MainShape { get; set; } + public Option MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// [DataMember(Name = "shapeOrNull", EmitDefaultValue = true)] - public ShapeOrNull ShapeOrNull { get; set; } + public Option ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// [DataMember(Name = "nullableShape", EmitDefaultValue = true)] - public NullableShape NullableShape { get; set; } + public Option NullableShape { get; set; } /// /// Gets or Sets Shapes /// [DataMember(Name = "shapes", EmitDefaultValue = false)] - public List Shapes { get; set; } + public Option> Shapes { get; set; } /// /// Gets or Sets additional properties @@ -133,21 +144,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MainShape != null) + if (this.MainShape.IsSet && this.MainShape.Value != null) { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); + hashCode = (hashCode * 59) + this.MainShape.Value.GetHashCode(); } - if (this.ShapeOrNull != null) + if (this.ShapeOrNull.IsSet && this.ShapeOrNull.Value != null) { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); + hashCode = (hashCode * 59) + this.ShapeOrNull.Value.GetHashCode(); } - if (this.NullableShape != null) + if (this.NullableShape.IsSet && this.NullableShape.Value != null) { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableShape.Value.GetHashCode(); } - if (this.Shapes != null) + if (this.Shapes.IsSet && this.Shapes.Value != null) { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); + hashCode = (hashCode * 59) + this.Shapes.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 2bec93345bb7..569a1bbf1ea4 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,7 +57,7 @@ public enum JustSymbolEnum /// Gets or Sets JustSymbol /// [DataMember(Name = "just_symbol", EmitDefaultValue = false)] - public JustSymbolEnum? JustSymbol { get; set; } + public Option JustSymbol { get; set; } /// /// Defines ArrayEnum /// @@ -81,8 +82,13 @@ public enum ArrayEnumEnum /// /// justSymbol. /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) + public EnumArrays(Option justSymbol = default(Option), Option> arrayEnum = default(Option>)) { + // to ensure "arrayEnum" (not nullable) is not null + if (arrayEnum.IsSet && arrayEnum.Value == null) + { + throw new ArgumentNullException("arrayEnum isn't a nullable property for EnumArrays and cannot be null"); + } this.JustSymbol = justSymbol; this.ArrayEnum = arrayEnum; this.AdditionalProperties = new Dictionary(); @@ -92,7 +98,7 @@ public enum ArrayEnumEnum /// Gets or Sets ArrayEnum /// [DataMember(Name = "array_enum", EmitDefaultValue = false)] - public List ArrayEnum { get; set; } + public Option> ArrayEnum { get; set; } /// /// Gets or Sets additional properties @@ -153,10 +159,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) + if (this.JustSymbol.IsSet) + { + hashCode = (hashCode * 59) + this.JustSymbol.Value.GetHashCode(); + } + if (this.ArrayEnum.IsSet && this.ArrayEnum.Value != null) { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayEnum.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs index c47540b557a3..eb2aa0bd1217 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 27d1193954ea..20e394af4bc2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -92,7 +93,7 @@ public enum EnumStringEnum /// Gets or Sets EnumString /// [DataMember(Name = "enum_string", EmitDefaultValue = false)] - public EnumStringEnum? EnumString { get; set; } + public Option EnumString { get; set; } /// /// Defines EnumStringRequired /// @@ -175,7 +176,7 @@ public enum EnumIntegerEnum /// Gets or Sets EnumInteger /// [DataMember(Name = "enum_integer", EmitDefaultValue = false)] - public EnumIntegerEnum? EnumInteger { get; set; } + public Option EnumInteger { get; set; } /// /// Defines EnumIntegerOnly /// @@ -197,7 +198,7 @@ public enum EnumIntegerOnlyEnum /// Gets or Sets EnumIntegerOnly /// [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] - public EnumIntegerOnlyEnum? EnumIntegerOnly { get; set; } + public Option EnumIntegerOnly { get; set; } /// /// Defines EnumNumber /// @@ -222,31 +223,31 @@ public enum EnumNumberEnum /// Gets or Sets EnumNumber /// [DataMember(Name = "enum_number", EmitDefaultValue = false)] - public EnumNumberEnum? EnumNumber { get; set; } + public Option EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// [DataMember(Name = "outerEnum", EmitDefaultValue = true)] - public OuterEnum? OuterEnum { get; set; } + public Option OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] - public OuterEnumInteger? OuterEnumInteger { get; set; } + public Option OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } + public Option OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } + public Option OuterEnumIntegerDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -267,10 +268,10 @@ protected EnumTest() /// outerEnumInteger. /// outerEnumDefaultValue. /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumIntegerOnlyEnum? enumIntegerOnly = default(EnumIntegerOnlyEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) + public EnumTest(Option enumString = default(Option), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), Option enumInteger = default(Option), Option enumIntegerOnly = default(Option), Option enumNumber = default(Option), Option outerEnum = default(Option), Option outerEnumInteger = default(Option), Option outerEnumDefaultValue = default(Option), Option outerEnumIntegerDefaultValue = default(Option)) { - this.EnumStringRequired = enumStringRequired; this.EnumString = enumString; + this.EnumStringRequired = enumStringRequired; this.EnumInteger = enumInteger; this.EnumIntegerOnly = enumIntegerOnly; this.EnumNumber = enumNumber; @@ -347,15 +348,39 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); + if (this.EnumString.IsSet) + { + hashCode = (hashCode * 59) + this.EnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); + if (this.EnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.EnumInteger.Value.GetHashCode(); + } + if (this.EnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.EnumIntegerOnly.Value.GetHashCode(); + } + if (this.EnumNumber.IsSet) + { + hashCode = (hashCode * 59) + this.EnumNumber.Value.GetHashCode(); + } + if (this.OuterEnum.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnum.Value.GetHashCode(); + } + if (this.OuterEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumInteger.Value.GetHashCode(); + } + if (this.OuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.OuterEnumIntegerDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 7fb0e2094548..26e4c5b5984b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected EquilateralTriangle() /// triangleType (required). public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for EquilateralTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for EquilateralTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs index 72b34e492626..3073d9ce4919 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class File : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// Test capitalization. - public File(string sourceURI = default(string)) + public File(Option sourceURI = default(Option)) { + // to ensure "sourceURI" (not nullable) is not null + if (sourceURI.IsSet && sourceURI.Value == null) + { + throw new ArgumentNullException("sourceURI isn't a nullable property for File and cannot be null"); + } this.SourceURI = sourceURI; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class File : IEquatable, IValidatableObject /// /// Test capitalization [DataMember(Name = "sourceURI", EmitDefaultValue = false)] - public string SourceURI { get; set; } + public Option SourceURI { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SourceURI != null) + if (this.SourceURI.IsSet && this.SourceURI.Value != null) { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); + hashCode = (hashCode * 59) + this.SourceURI.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index cd75dba4a925..bdd81d64aace 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// /// file. /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) + public FileSchemaTestClass(Option file = default(Option), Option> files = default(Option>)) { + // to ensure "file" (not nullable) is not null + if (file.IsSet && file.Value == null) + { + throw new ArgumentNullException("file isn't a nullable property for FileSchemaTestClass and cannot be null"); + } + // to ensure "files" (not nullable) is not null + if (files.IsSet && files.Value == null) + { + throw new ArgumentNullException("files isn't a nullable property for FileSchemaTestClass and cannot be null"); + } this.File = file; this.Files = files; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// Gets or Sets File /// [DataMember(Name = "file", EmitDefaultValue = false)] - public File File { get; set; } + public Option File { get; set; } /// /// Gets or Sets Files /// [DataMember(Name = "files", EmitDefaultValue = false)] - public List Files { get; set; } + public Option> Files { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.File != null) + if (this.File.IsSet && this.File.Value != null) { - hashCode = (hashCode * 59) + this.File.GetHashCode(); + hashCode = (hashCode * 59) + this.File.Value.GetHashCode(); } - if (this.Files != null) + if (this.Files.IsSet && this.Files.Value != null) { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); + hashCode = (hashCode * 59) + this.Files.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 3108c8a86913..d899e3f91fa0 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,14 @@ public partial class Foo : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// bar (default to "bar"). - public Foo(string bar = @"bar") + public Foo(Option bar = default(Option)) { - // use default value if no "bar" provided - this.Bar = bar ?? @"bar"; + // to ensure "bar" (not nullable) is not null + if (bar.IsSet && bar.Value == null) + { + throw new ArgumentNullException("bar isn't a nullable property for Foo and cannot be null"); + } + this.Bar = bar.IsSet ? bar : new Option(@"bar"); this.AdditionalProperties = new Dictionary(); } @@ -47,7 +52,7 @@ public Foo(string bar = @"bar") /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; set; } + public Option Bar { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 1ce81eece3ee..3465ee4146ea 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class FooGetDefaultResponse : IEquatable, /// Initializes a new instance of the class. /// /// varString. - public FooGetDefaultResponse(Foo varString = default(Foo)) + public FooGetDefaultResponse(Option varString = default(Option)) { + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FooGetDefaultResponse and cannot be null"); + } this.String = varString; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class FooGetDefaultResponse : IEquatable, /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public Foo String { get; set; } + public Option String { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.String != null) + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 7158640c24e2..63345fa27a20 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,34 +63,74 @@ protected FormatTest() /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(Option integer = default(Option), Option int32 = default(Option), Option unsignedInteger = default(Option), Option int64 = default(Option), Option unsignedLong = default(Option), decimal number = default(decimal), Option varFloat = default(Option), Option varDouble = default(Option), Option varDecimal = default(Option), Option varString = default(Option), byte[] varByte = default(byte[]), Option binary = default(Option), DateTime date = default(DateTime), Option dateTime = default(Option), Option uuid = default(Option), string password = default(string), Option patternWithDigits = default(Option), Option patternWithDigitsAndDelimiter = default(Option), Option patternWithBackslash = default(Option)) { - this.Number = number; - // to ensure "varByte" is required (not null) + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "varByte" (not nullable) is not null if (varByte == null) { - throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("varByte isn't a nullable property for FormatTest and cannot be null"); } - this.Byte = varByte; - this.Date = date; - // to ensure "password" is required (not null) + // to ensure "binary" (not nullable) is not null + if (binary.IsSet && binary.Value == null) + { + throw new ArgumentNullException("binary isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "date" (not nullable) is not null + if (date == null) + { + throw new ArgumentNullException("date isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "password" (not nullable) is not null if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("password isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigits" (not nullable) is not null + if (patternWithDigits.IsSet && patternWithDigits.Value == null) + { + throw new ArgumentNullException("patternWithDigits isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigitsAndDelimiter" (not nullable) is not null + if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) + { + throw new ArgumentNullException("patternWithDigitsAndDelimiter isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithBackslash" (not nullable) is not null + if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) + { + throw new ArgumentNullException("patternWithBackslash isn't a nullable property for FormatTest and cannot be null"); } - this.Password = password; this.Integer = integer; this.Int32 = int32; this.UnsignedInteger = unsignedInteger; this.Int64 = int64; this.UnsignedLong = unsignedLong; + this.Number = number; this.Float = varFloat; this.Double = varDouble; this.Decimal = varDecimal; this.String = varString; + this.Byte = varByte; this.Binary = binary; + this.Date = date; this.DateTime = dateTime; this.Uuid = uuid; + this.Password = password; this.PatternWithDigits = patternWithDigits; this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; this.PatternWithBackslash = patternWithBackslash; @@ -100,31 +141,31 @@ protected FormatTest() /// Gets or Sets Integer /// [DataMember(Name = "integer", EmitDefaultValue = false)] - public int Integer { get; set; } + public Option Integer { get; set; } /// /// Gets or Sets Int32 /// [DataMember(Name = "int32", EmitDefaultValue = false)] - public int Int32 { get; set; } + public Option Int32 { get; set; } /// /// Gets or Sets UnsignedInteger /// [DataMember(Name = "unsigned_integer", EmitDefaultValue = false)] - public uint UnsignedInteger { get; set; } + public Option UnsignedInteger { get; set; } /// /// Gets or Sets Int64 /// [DataMember(Name = "int64", EmitDefaultValue = false)] - public long Int64 { get; set; } + public Option Int64 { get; set; } /// /// Gets or Sets UnsignedLong /// [DataMember(Name = "unsigned_long", EmitDefaultValue = false)] - public ulong UnsignedLong { get; set; } + public Option UnsignedLong { get; set; } /// /// Gets or Sets Number @@ -136,25 +177,25 @@ protected FormatTest() /// Gets or Sets Float /// [DataMember(Name = "float", EmitDefaultValue = false)] - public float Float { get; set; } + public Option Float { get; set; } /// /// Gets or Sets Double /// [DataMember(Name = "double", EmitDefaultValue = false)] - public double Double { get; set; } + public Option Double { get; set; } /// /// Gets or Sets Decimal /// [DataMember(Name = "decimal", EmitDefaultValue = false)] - public decimal Decimal { get; set; } + public Option Decimal { get; set; } /// /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public string String { get; set; } + public Option String { get; set; } /// /// Gets or Sets Byte @@ -166,7 +207,7 @@ protected FormatTest() /// Gets or Sets Binary /// [DataMember(Name = "binary", EmitDefaultValue = false)] - public System.IO.Stream Binary { get; set; } + public Option Binary { get; set; } /// /// Gets or Sets Date @@ -181,14 +222,14 @@ protected FormatTest() /// /// 2007-12-03T10:15:30+01:00 [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Uuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Password @@ -201,21 +242,21 @@ protected FormatTest() /// /// A string that is a 10 digit number. Can have leading zeros. [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] - public string PatternWithDigits { get; set; } + public Option PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] - public string PatternWithDigitsAndDelimiter { get; set; } + public Option PatternWithDigitsAndDelimiter { get; set; } /// /// None /// /// None [DataMember(Name = "pattern_with_backslash", EmitDefaultValue = false)] - public string PatternWithBackslash { get; set; } + public Option PatternWithBackslash { get; set; } /// /// Gets or Sets additional properties @@ -293,54 +334,78 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode(); + if (this.Integer.IsSet) + { + hashCode = (hashCode * 59) + this.Integer.Value.GetHashCode(); + } + if (this.Int32.IsSet) + { + hashCode = (hashCode * 59) + this.Int32.Value.GetHashCode(); + } + if (this.UnsignedInteger.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedInteger.Value.GetHashCode(); + } + if (this.Int64.IsSet) + { + hashCode = (hashCode * 59) + this.Int64.Value.GetHashCode(); + } + if (this.UnsignedLong.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedLong.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.Number.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) + if (this.Float.IsSet) + { + hashCode = (hashCode * 59) + this.Float.Value.GetHashCode(); + } + if (this.Double.IsSet) + { + hashCode = (hashCode * 59) + this.Double.Value.GetHashCode(); + } + if (this.Decimal.IsSet) + { + hashCode = (hashCode * 59) + this.Decimal.Value.GetHashCode(); + } + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.Byte != null) { hashCode = (hashCode * 59) + this.Byte.GetHashCode(); } - if (this.Binary != null) + if (this.Binary.IsSet && this.Binary.Value != null) { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); + hashCode = (hashCode * 59) + this.Binary.Value.GetHashCode(); } if (this.Date != null) { hashCode = (hashCode * 59) + this.Date.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.Password != null) { hashCode = (hashCode * 59) + this.Password.GetHashCode(); } - if (this.PatternWithDigits != null) + if (this.PatternWithDigits.IsSet && this.PatternWithDigits.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigits.Value.GetHashCode(); } - if (this.PatternWithDigitsAndDelimiter != null) + if (this.PatternWithDigitsAndDelimiter.IsSet && this.PatternWithDigitsAndDelimiter.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.Value.GetHashCode(); } - if (this.PatternWithBackslash != null) + if (this.PatternWithBackslash.IsSet && this.PatternWithBackslash.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithBackslash.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithBackslash.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index 5e0d760c369f..637e088e9ea9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs index 3772b99bdb42..5626c5152e3c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index c22ccd6ebb50..bf63b65e7b74 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 75285a73f6ca..a537191d7d12 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -50,10 +51,10 @@ protected GrandparentAnimal() /// petType (required). public GrandparentAnimal(string petType = default(string)) { - // to ensure "petType" is required (not null) + // to ensure "petType" (not nullable) is not null if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); + throw new ArgumentNullException("petType isn't a nullable property for GrandparentAnimal and cannot be null"); } this.PetType = petType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 3c6298d7d8d2..96d854d60872 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,7 +46,7 @@ public HasOnlyReadOnly() /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -59,7 +60,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Foo /// [DataMember(Name = "foo", EmitDefaultValue = false)] - public string Foo { get; private set; } + public Option Foo { get; private set; } /// /// Returns false as Foo should not be serialized given that it's read-only. @@ -128,13 +129,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Foo != null) + if (this.Foo.IsSet && this.Foo.Value != null) { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); + hashCode = (hashCode * 59) + this.Foo.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 6fe074907762..cced5965aa84 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Initializes a new instance of the class. /// /// nullableMessage. - public HealthCheckResult(string nullableMessage = default(string)) + public HealthCheckResult(Option nullableMessage = default(Option)) { this.NullableMessage = nullableMessage; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Gets or Sets NullableMessage /// [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] - public string NullableMessage { get; set; } + public Option NullableMessage { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +107,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.NullableMessage != null) + if (this.NullableMessage.IsSet && this.NullableMessage.Value != null) { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableMessage.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index acf86063d050..9b860ce985ee 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,17 +45,17 @@ protected IsoscelesTriangle() { } /// triangleType (required). public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for IsoscelesTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for IsoscelesTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs index e06a3f381f12..358846cdd689 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class List : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// var123List. - public List(string var123List = default(string)) + public List(Option var123List = default(Option)) { + // to ensure "var123List" (not nullable) is not null + if (var123List.IsSet && var123List.Value == null) + { + throw new ArgumentNullException("var123List isn't a nullable property for List and cannot be null"); + } this.Var123List = var123List; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class List : IEquatable, IValidatableObject /// Gets or Sets Var123List /// [DataMember(Name = "123-list", EmitDefaultValue = false)] - public string Var123List { get; set; } + public Option Var123List { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Var123List != null) + if (this.Var123List.IsSet && this.Var123List.Value != null) { - hashCode = (hashCode * 59) + this.Var123List.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123List.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 57cc8110fbb8..63e1726e5f79 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,12 +38,20 @@ public partial class LiteralStringClass : IEquatable, IValid /// /// escapedLiteralString (default to "C:\\Users\\username"). /// unescapedLiteralString (default to "C:\Users\username"). - public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", string unescapedLiteralString = @"C:\Users\username") + public LiteralStringClass(Option escapedLiteralString = default(Option), Option unescapedLiteralString = default(Option)) { - // use default value if no "escapedLiteralString" provided - this.EscapedLiteralString = escapedLiteralString ?? @"C:\\Users\\username"; - // use default value if no "unescapedLiteralString" provided - this.UnescapedLiteralString = unescapedLiteralString ?? @"C:\Users\username"; + // to ensure "escapedLiteralString" (not nullable) is not null + if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) + { + throw new ArgumentNullException("escapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + // to ensure "unescapedLiteralString" (not nullable) is not null + if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) + { + throw new ArgumentNullException("unescapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + this.EscapedLiteralString = escapedLiteralString.IsSet ? escapedLiteralString : new Option(@"C:\\Users\\username"); + this.UnescapedLiteralString = unescapedLiteralString.IsSet ? unescapedLiteralString : new Option(@"C:\Users\username"); this.AdditionalProperties = new Dictionary(); } @@ -50,13 +59,13 @@ public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", /// Gets or Sets EscapedLiteralString /// [DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)] - public string EscapedLiteralString { get; set; } + public Option EscapedLiteralString { get; set; } /// /// Gets or Sets UnescapedLiteralString /// [DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)] - public string UnescapedLiteralString { get; set; } + public Option UnescapedLiteralString { get; set; } /// /// Gets or Sets additional properties @@ -117,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.EscapedLiteralString != null) + if (this.EscapedLiteralString.IsSet && this.EscapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.EscapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.EscapedLiteralString.Value.GetHashCode(); } - if (this.UnescapedLiteralString != null) + if (this.UnescapedLiteralString.IsSet && this.UnescapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.UnescapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.UnescapedLiteralString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 49a7e091c235..9efc46f30641 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 691f128ea5fb..004bf942c034 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -58,8 +59,28 @@ public enum InnerEnum /// mapOfEnumString. /// directMap. /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + public MapTest(Option>> mapMapOfString = default(Option>>), Option> mapOfEnumString = default(Option>), Option> directMap = default(Option>), Option> indirectMap = default(Option>)) { + // to ensure "mapMapOfString" (not nullable) is not null + if (mapMapOfString.IsSet && mapMapOfString.Value == null) + { + throw new ArgumentNullException("mapMapOfString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "mapOfEnumString" (not nullable) is not null + if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) + { + throw new ArgumentNullException("mapOfEnumString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "directMap" (not nullable) is not null + if (directMap.IsSet && directMap.Value == null) + { + throw new ArgumentNullException("directMap isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "indirectMap" (not nullable) is not null + if (indirectMap.IsSet && indirectMap.Value == null) + { + throw new ArgumentNullException("indirectMap isn't a nullable property for MapTest and cannot be null"); + } this.MapMapOfString = mapMapOfString; this.MapOfEnumString = mapOfEnumString; this.DirectMap = directMap; @@ -71,25 +92,25 @@ public enum InnerEnum /// Gets or Sets MapMapOfString /// [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] - public Dictionary> MapMapOfString { get; set; } + public Option>> MapMapOfString { get; set; } /// /// Gets or Sets MapOfEnumString /// [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] - public Dictionary MapOfEnumString { get; set; } + public Option> MapOfEnumString { get; set; } /// /// Gets or Sets DirectMap /// [DataMember(Name = "direct_map", EmitDefaultValue = false)] - public Dictionary DirectMap { get; set; } + public Option> DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// [DataMember(Name = "indirect_map", EmitDefaultValue = false)] - public Dictionary IndirectMap { get; set; } + public Option> IndirectMap { get; set; } /// /// Gets or Sets additional properties @@ -152,21 +173,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapMapOfString != null) + if (this.MapMapOfString.IsSet && this.MapMapOfString.Value != null) { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapMapOfString.Value.GetHashCode(); } - if (this.MapOfEnumString != null) + if (this.MapOfEnumString.IsSet && this.MapOfEnumString.Value != null) { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfEnumString.Value.GetHashCode(); } - if (this.DirectMap != null) + if (this.DirectMap.IsSet && this.DirectMap.Value != null) { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.DirectMap.Value.GetHashCode(); } - if (this.IndirectMap != null) + if (this.IndirectMap.IsSet && this.IndirectMap.Value != null) { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.IndirectMap.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 2b62d5975478..5dbb7d0ef732 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedAnyOf(MixedAnyOfContent content = default(MixedAnyOfContent)) + public MixedAnyOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedAnyOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedAnyOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs index 49e94cc5e5db..7c4a5791f8e2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index bd0255888b86..f18b4793a139 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedOneOf(MixedOneOfContent content = default(MixedOneOfContent)) + public MixedOneOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedOneOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedOneOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs index e2527cc3c315..77af863c507e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 5f51e31aa034..fc342925735f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,28 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatableuuid. /// dateTime. /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuidWithPattern = default(Guid), Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) + public MixedPropertiesAndAdditionalPropertiesClass(Option uuidWithPattern = default(Option), Option uuid = default(Option), Option dateTime = default(Option), Option> map = default(Option>)) { + // to ensure "uuidWithPattern" (not nullable) is not null + if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) + { + throw new ArgumentNullException("uuidWithPattern isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "map" (not nullable) is not null + if (map.IsSet && map.Value == null) + { + throw new ArgumentNullException("map isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } this.UuidWithPattern = uuidWithPattern; this.Uuid = uuid; this.DateTime = dateTime; @@ -52,25 +73,25 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable [DataMember(Name = "uuid_with_pattern", EmitDefaultValue = false)] - public Guid UuidWithPattern { get; set; } + public Option UuidWithPattern { get; set; } /// /// Gets or Sets Uuid /// [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets DateTime /// [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Map /// [DataMember(Name = "map", EmitDefaultValue = false)] - public Dictionary Map { get; set; } + public Option> Map { get; set; } /// /// Gets or Sets additional properties @@ -133,21 +154,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.UuidWithPattern != null) + if (this.UuidWithPattern.IsSet && this.UuidWithPattern.Value != null) { - hashCode = (hashCode * 59) + this.UuidWithPattern.GetHashCode(); + hashCode = (hashCode * 59) + this.UuidWithPattern.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Map != null) + if (this.Map.IsSet && this.Map.Value != null) { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); + hashCode = (hashCode * 59) + this.Map.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 1906ce0b2709..9d5c0bc35f6f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// id. - public MixedSubId(string id = default(string)) + public MixedSubId(Option id = default(Option)) { + // to ensure "id" (not nullable) is not null + if (id.IsSet && id.Value == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixedSubId and cannot be null"); + } this.Id = id; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Id != null) + if (this.Id.IsSet && this.Id.Value != null) { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index a023e3c3e754..d22b1c824ceb 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Model200Response : IEquatable, IValidatab /// /// name. /// varClass. - public Model200Response(int name = default(int), string varClass = default(string)) + public Model200Response(Option name = default(Option), Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for Model200Response and cannot be null"); + } this.Name = name; this.Class = varClass; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class Model200Response : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public int Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets Class /// [DataMember(Name = "class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) + if (this.Name.IsSet) + { + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); + } + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 690894994947..4c8ff7320d98 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClient. - public ModelClient(string varClient = default(string)) + public ModelClient(Option varClient = default(Option)) { + // to ensure "varClient" (not nullable) is not null + if (varClient.IsSet && varClient.Value == null) + { + throw new ArgumentNullException("varClient isn't a nullable property for ModelClient and cannot be null"); + } this.VarClient = varClient; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public string VarClient { get; set; } + public Option VarClient { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.VarClient != null) + if (this.VarClient.IsSet && this.VarClient.Value != null) { - hashCode = (hashCode * 59) + this.VarClient.GetHashCode(); + hashCode = (hashCode * 59) + this.VarClient.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs index f34052aa706c..10b22f09b12a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,8 +46,13 @@ protected Name() /// /// varName (required). /// property. - public Name(int varName = default(int), string property = default(string)) + public Name(int varName = default(int), Option property = default(Option)) { + // to ensure "property" (not nullable) is not null + if (property.IsSet && property.Value == null) + { + throw new ArgumentNullException("property isn't a nullable property for Name and cannot be null"); + } this.VarName = varName; this.Property = property; this.AdditionalProperties = new Dictionary(); @@ -62,7 +68,7 @@ protected Name() /// Gets or Sets SnakeCase /// [DataMember(Name = "snake_case", EmitDefaultValue = false)] - public int SnakeCase { get; private set; } + public Option SnakeCase { get; private set; } /// /// Returns false as SnakeCase should not be serialized given that it's read-only. @@ -76,13 +82,13 @@ public bool ShouldSerializeSnakeCase() /// Gets or Sets Property /// [DataMember(Name = "property", EmitDefaultValue = false)] - public string Property { get; set; } + public Option Property { get; set; } /// /// Gets or Sets Var123Number /// [DataMember(Name = "123Number", EmitDefaultValue = false)] - public int Var123Number { get; private set; } + public Option Var123Number { get; private set; } /// /// Returns false as Var123Number should not be serialized given that it's read-only. @@ -154,12 +160,18 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.VarName.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) + if (this.SnakeCase.IsSet) + { + hashCode = (hashCode * 59) + this.SnakeCase.Value.GetHashCode(); + } + if (this.Property.IsSet && this.Property.Value != null) + { + hashCode = (hashCode * 59) + this.Property.Value.GetHashCode(); + } + if (this.Var123Number.IsSet) { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123Number.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Var123Number.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 3fbd6e83ef29..b4b03a3be7c9 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,12 +48,12 @@ protected NotificationtestGetElementsV1ResponseMPayload() /// aObjVariableobject (required). public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List> aObjVariableobject = default(List>)) { - this.PkiNotificationtestID = pkiNotificationtestID; - // to ensure "aObjVariableobject" is required (not null) + // to ensure "aObjVariableobject" (not nullable) is not null if (aObjVariableobject == null) { - throw new ArgumentNullException("aObjVariableobject is a required property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); + throw new ArgumentNullException("aObjVariableobject isn't a nullable property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); } + this.PkiNotificationtestID = pkiNotificationtestID; this.AObjVariableobject = aObjVariableobject; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 6e4a6ef50e7b..c384e5bfa54f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,18 @@ public partial class NullableClass : IEquatable, IValidatableObje /// objectNullableProp. /// objectAndItemsNullableProp. /// objectItemsNullable. - public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateTime? dateProp = default(DateTime?), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) + public NullableClass(Option integerProp = default(Option), Option numberProp = default(Option), Option booleanProp = default(Option), Option stringProp = default(Option), Option dateProp = default(Option), Option datetimeProp = default(Option), Option> arrayNullableProp = default(Option>), Option> arrayAndItemsNullableProp = default(Option>), Option> arrayItemsNullable = default(Option>), Option> objectNullableProp = default(Option>), Option> objectAndItemsNullableProp = default(Option>), Option> objectItemsNullable = default(Option>)) { + // to ensure "arrayItemsNullable" (not nullable) is not null + if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) + { + throw new ArgumentNullException("arrayItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } + // to ensure "objectItemsNullable" (not nullable) is not null + if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) + { + throw new ArgumentNullException("objectItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } this.IntegerProp = integerProp; this.NumberProp = numberProp; this.BooleanProp = booleanProp; @@ -68,74 +79,74 @@ public partial class NullableClass : IEquatable, IValidatableObje /// Gets or Sets IntegerProp /// [DataMember(Name = "integer_prop", EmitDefaultValue = true)] - public int? IntegerProp { get; set; } + public Option IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// [DataMember(Name = "number_prop", EmitDefaultValue = true)] - public decimal? NumberProp { get; set; } + public Option NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] - public bool? BooleanProp { get; set; } + public Option BooleanProp { get; set; } /// /// Gets or Sets StringProp /// [DataMember(Name = "string_prop", EmitDefaultValue = true)] - public string StringProp { get; set; } + public Option StringProp { get; set; } /// /// Gets or Sets DateProp /// [DataMember(Name = "date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? DateProp { get; set; } + public Option DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] - public DateTime? DatetimeProp { get; set; } + public Option DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] - public List ArrayNullableProp { get; set; } + public Option> ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] - public List ArrayAndItemsNullableProp { get; set; } + public Option> ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] - public List ArrayItemsNullable { get; set; } + public Option> ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectNullableProp { get; set; } + public Option> ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectAndItemsNullableProp { get; set; } + public Option> ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] - public Dictionary ObjectItemsNullable { get; set; } + public Option> ObjectItemsNullable { get; set; } /// /// Gets or Sets additional properties @@ -206,53 +217,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.IntegerProp != null) + if (this.IntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.IntegerProp.Value.GetHashCode(); } - if (this.NumberProp != null) + if (this.NumberProp.IsSet) { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberProp.Value.GetHashCode(); } - if (this.BooleanProp != null) + if (this.BooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.BooleanProp.Value.GetHashCode(); } - if (this.StringProp != null) + if (this.StringProp.IsSet && this.StringProp.Value != null) { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.StringProp.Value.GetHashCode(); } - if (this.DateProp != null) + if (this.DateProp.IsSet && this.DateProp.Value != null) { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DateProp.Value.GetHashCode(); } - if (this.DatetimeProp != null) + if (this.DatetimeProp.IsSet && this.DatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DatetimeProp.Value.GetHashCode(); } - if (this.ArrayNullableProp != null) + if (this.ArrayNullableProp.IsSet && this.ArrayNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNullableProp.Value.GetHashCode(); } - if (this.ArrayAndItemsNullableProp != null) + if (this.ArrayAndItemsNullableProp.IsSet && this.ArrayAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.Value.GetHashCode(); } - if (this.ArrayItemsNullable != null) + if (this.ArrayItemsNullable.IsSet && this.ArrayItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayItemsNullable.Value.GetHashCode(); } - if (this.ObjectNullableProp != null) + if (this.ObjectNullableProp.IsSet && this.ObjectNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectNullableProp.Value.GetHashCode(); } - if (this.ObjectAndItemsNullableProp != null) + if (this.ObjectAndItemsNullableProp.IsSet && this.ObjectAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.Value.GetHashCode(); } - if (this.ObjectItemsNullable != null) + if (this.ObjectItemsNullable.IsSet && this.ObjectItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectItemsNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 8a3011986ecd..059dd8c09a0b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// Initializes a new instance of the class. /// /// uuid. - public NullableGuidClass(Guid? uuid = default(Guid?)) + public NullableGuidClass(Option uuid = default(Option)) { this.Uuid = uuid; this.AdditionalProperties = new Dictionary(); @@ -47,7 +48,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = true)] - public Guid? Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +108,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index 3c760b3abddf..255842acfbac 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 7218451d9fb0..eabf9cccc135 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,7 +40,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) + public NumberOnly(Option justNumber = default(Option)) { this.JustNumber = justNumber; this.AdditionalProperties = new Dictionary(); @@ -49,7 +50,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Gets or Sets JustNumber /// [DataMember(Name = "JustNumber", EmitDefaultValue = false)] - public decimal JustNumber { get; set; } + public Option JustNumber { get; set; } /// /// Gets or Sets additional properties @@ -109,7 +110,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); + if (this.JustNumber.IsSet) + { + hashCode = (hashCode * 59) + this.JustNumber.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 76faa5154c86..fe77912ea4be 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,23 @@ public partial class ObjectWithDeprecatedFields : IEquatableid. /// deprecatedRef. /// bars. - public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List bars = default(List)) + public ObjectWithDeprecatedFields(Option uuid = default(Option), Option id = default(Option), Option deprecatedRef = default(Option), Option> bars = default(Option>)) { + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "deprecatedRef" (not nullable) is not null + if (deprecatedRef.IsSet && deprecatedRef.Value == null) + { + throw new ArgumentNullException("deprecatedRef isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "bars" (not nullable) is not null + if (bars.IsSet && bars.Value == null) + { + throw new ArgumentNullException("bars isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } this.Uuid = uuid; this.Id = id; this.DeprecatedRef = deprecatedRef; @@ -52,28 +68,28 @@ public partial class ObjectWithDeprecatedFields : IEquatable [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] [Obsolete] - public decimal Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets DeprecatedRef /// [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } + public Option DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// [DataMember(Name = "bars", EmitDefaultValue = false)] [Obsolete] - public List Bars { get; set; } + public Option> Bars { get; set; } /// /// Gets or Sets additional properties @@ -136,18 +152,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) + { + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); + } + if (this.Id.IsSet) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) + if (this.DeprecatedRef.IsSet && this.DeprecatedRef.Value != null) { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); + hashCode = (hashCode * 59) + this.DeprecatedRef.Value.GetHashCode(); } - if (this.Bars != null) + if (this.Bars.IsSet && this.Bars.Value != null) { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); + hashCode = (hashCode * 59) + this.Bars.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs index b7278bd5600e..fc7a1298bc33 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs index e9471d3ba022..22df3b5b7b01 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// Order Status [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -74,14 +75,19 @@ public enum StatusEnum /// shipDate. /// Order Status. /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) + public Order(Option id = default(Option), Option petId = default(Option), Option quantity = default(Option), Option shipDate = default(Option), Option status = default(Option), Option complete = default(Option)) { + // to ensure "shipDate" (not nullable) is not null + if (shipDate.IsSet && shipDate.Value == null) + { + throw new ArgumentNullException("shipDate isn't a nullable property for Order and cannot be null"); + } this.Id = id; this.PetId = petId; this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - this.Complete = complete; + this.Complete = complete.IsSet ? complete : new Option(false); this.AdditionalProperties = new Dictionary(); } @@ -89,32 +95,32 @@ public enum StatusEnum /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets PetId /// [DataMember(Name = "petId", EmitDefaultValue = false)] - public long PetId { get; set; } + public Option PetId { get; set; } /// /// Gets or Sets Quantity /// [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int Quantity { get; set; } + public Option Quantity { get; set; } /// /// Gets or Sets ShipDate /// /// 2020-02-02T20:20:20.000222Z [DataMember(Name = "shipDate", EmitDefaultValue = false)] - public DateTime ShipDate { get; set; } + public Option ShipDate { get; set; } /// /// Gets or Sets Complete /// [DataMember(Name = "complete", EmitDefaultValue = true)] - public bool Complete { get; set; } + public Option Complete { get; set; } /// /// Gets or Sets additional properties @@ -179,15 +185,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.PetId.IsSet) + { + hashCode = (hashCode * 59) + this.PetId.Value.GetHashCode(); + } + if (this.Quantity.IsSet) + { + hashCode = (hashCode * 59) + this.Quantity.Value.GetHashCode(); + } + if (this.ShipDate.IsSet && this.ShipDate.Value != null) + { + hashCode = (hashCode * 59) + this.ShipDate.Value.GetHashCode(); + } + if (this.Status.IsSet) + { + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); + } + if (this.Complete.IsSet) { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); + hashCode = (hashCode * 59) + this.Complete.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 47d598a27e6f..f55b2f8c2454 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,13 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// myNumber. /// myString. /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) + public OuterComposite(Option myNumber = default(Option), Option myString = default(Option), Option myBoolean = default(Option)) { + // to ensure "myString" (not nullable) is not null + if (myString.IsSet && myString.Value == null) + { + throw new ArgumentNullException("myString isn't a nullable property for OuterComposite and cannot be null"); + } this.MyNumber = myNumber; this.MyString = myString; this.MyBoolean = myBoolean; @@ -50,19 +56,19 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// Gets or Sets MyNumber /// [DataMember(Name = "my_number", EmitDefaultValue = false)] - public decimal MyNumber { get; set; } + public Option MyNumber { get; set; } /// /// Gets or Sets MyString /// [DataMember(Name = "my_string", EmitDefaultValue = false)] - public string MyString { get; set; } + public Option MyString { get; set; } /// /// Gets or Sets MyBoolean /// [DataMember(Name = "my_boolean", EmitDefaultValue = true)] - public bool MyBoolean { get; set; } + public Option MyBoolean { get; set; } /// /// Gets or Sets additional properties @@ -124,12 +130,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) + if (this.MyNumber.IsSet) + { + hashCode = (hashCode * 59) + this.MyNumber.Value.GetHashCode(); + } + if (this.MyString.IsSet && this.MyString.Value != null) + { + hashCode = (hashCode * 59) + this.MyString.Value.GetHashCode(); + } + if (this.MyBoolean.IsSet) { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); + hashCode = (hashCode * 59) + this.MyBoolean.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs index 59a9f8e3500a..8d09e4d421bb 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index 40e276b600eb..9217b6a24c9a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 3a70c3716fe2..83a1123c3651 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index 42b36058c031..69a3229977ac 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs index 392e199e137f..5fd8f69243a4 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index 7a7421349903..92b018fe797c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs index e4722f4a5379..bbd65be3d7fd 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -82,22 +83,32 @@ protected Pet() /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), Option category = default(Option), string name = default(string), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this.Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this.PhotoUrls = photoUrls; this.Id = id; this.Category = category; + this.Name = name; + this.PhotoUrls = photoUrls; this.Tags = tags; this.Status = status; this.AdditionalProperties = new Dictionary(); @@ -107,13 +118,13 @@ protected Pet() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category { get; set; } + public Option Category { get; set; } /// /// Gets or Sets Name @@ -132,7 +143,7 @@ protected Pet() /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags { get; set; } + public Option> Tags { get; set; } /// /// Gets or Sets additional properties @@ -197,10 +208,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.Name != null) { @@ -210,11 +224,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 53b52bce70f1..efb16d85c318 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 5e4472118140..fddb8c8500ad 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index 1e12804ecd2a..4b1b8777ee3f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 3a364f98c1e2..3bc8ef02e009 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected QuadrilateralInterface() /// quadrilateralType (required). public QuadrilateralInterface(string quadrilateralType = default(string)) { - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 46ed3b3948c0..d6715914adc5 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// baz. - public ReadOnlyFirst(string baz = default(string)) + public ReadOnlyFirst(Option baz = default(Option)) { + // to ensure "baz" (not nullable) is not null + if (baz.IsSet && baz.Value == null) + { + throw new ArgumentNullException("baz isn't a nullable property for ReadOnlyFirst and cannot be null"); + } this.Baz = baz; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -60,7 +66,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Baz /// [DataMember(Name = "baz", EmitDefaultValue = false)] - public string Baz { get; set; } + public Option Baz { get; set; } /// /// Gets or Sets additional properties @@ -121,13 +127,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Baz != null) + if (this.Baz.IsSet && this.Baz.Value != null) { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); + hashCode = (hashCode * 59) + this.Baz.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index d040204ece33..7fbdfa344d3c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -53,7 +54,7 @@ public enum RequiredNullableEnumIntegerEnum /// Gets or Sets RequiredNullableEnumInteger /// [DataMember(Name = "required_nullable_enum_integer", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerEnum RequiredNullableEnumInteger { get; set; } + public RequiredNullableEnumIntegerEnum? RequiredNullableEnumInteger { get; set; } /// /// Defines RequiredNotnullableEnumInteger /// @@ -97,7 +98,7 @@ public enum NotrequiredNullableEnumIntegerEnum /// Gets or Sets NotrequiredNullableEnumInteger /// [DataMember(Name = "notrequired_nullable_enum_integer", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerEnum? NotrequiredNullableEnumInteger { get; set; } + public Option NotrequiredNullableEnumInteger { get; set; } /// /// Defines NotrequiredNotnullableEnumInteger /// @@ -119,11 +120,10 @@ public enum NotrequiredNotnullableEnumIntegerEnum /// Gets or Sets NotrequiredNotnullableEnumInteger /// [DataMember(Name = "notrequired_notnullable_enum_integer", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerEnum? NotrequiredNotnullableEnumInteger { get; set; } + public Option NotrequiredNotnullableEnumInteger { get; set; } /// /// Defines RequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum RequiredNullableEnumIntegerOnlyEnum { /// @@ -142,7 +142,7 @@ public enum RequiredNullableEnumIntegerOnlyEnum /// Gets or Sets RequiredNullableEnumIntegerOnly /// [DataMember(Name = "required_nullable_enum_integer_only", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnly { get; set; } + public RequiredNullableEnumIntegerOnlyEnum? RequiredNullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumIntegerOnly /// @@ -168,7 +168,6 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum /// /// Defines NotrequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum NotrequiredNullableEnumIntegerOnlyEnum { /// @@ -187,7 +186,7 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNullableEnumIntegerOnly /// [DataMember(Name = "notrequired_nullable_enum_integer_only", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerOnlyEnum? NotrequiredNullableEnumIntegerOnly { get; set; } + public Option NotrequiredNullableEnumIntegerOnly { get; set; } /// /// Defines NotrequiredNotnullableEnumIntegerOnly /// @@ -209,7 +208,7 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNotnullableEnumIntegerOnly /// [DataMember(Name = "notrequired_notnullable_enum_integer_only", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerOnlyEnum? NotrequiredNotnullableEnumIntegerOnly { get; set; } + public Option NotrequiredNotnullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumString /// @@ -331,7 +330,7 @@ public enum RequiredNullableEnumStringEnum /// Gets or Sets RequiredNullableEnumString /// [DataMember(Name = "required_nullable_enum_string", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumStringEnum RequiredNullableEnumString { get; set; } + public RequiredNullableEnumStringEnum? RequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNullableEnumString /// @@ -392,7 +391,7 @@ public enum NotrequiredNullableEnumStringEnum /// Gets or Sets NotrequiredNullableEnumString /// [DataMember(Name = "notrequired_nullable_enum_string", EmitDefaultValue = true)] - public NotrequiredNullableEnumStringEnum? NotrequiredNullableEnumString { get; set; } + public Option NotrequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNotnullableEnumString /// @@ -453,7 +452,7 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNotnullableEnumString /// [DataMember(Name = "notrequired_notnullable_enum_string", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumStringEnum? NotrequiredNotnullableEnumString { get; set; } + public Option NotrequiredNotnullableEnumString { get; set; } /// /// Gets or Sets RequiredNullableOuterEnumDefaultValue @@ -471,13 +470,13 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_nullable_outerEnumDefaultValue", EmitDefaultValue = true)] - public OuterEnumDefaultValue? NotrequiredNullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNullableOuterEnumDefaultValue { get; set; } /// /// Gets or Sets NotrequiredNotnullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_notnullable_outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? NotrequiredNotnullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNotnullableOuterEnumDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -533,95 +532,100 @@ protected RequiredClass() /// requiredNotnullableArrayOfString (required). /// notrequiredNullableArrayOfString. /// notrequiredNotnullableArrayOfString. - public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), int? notRequiredNullableIntegerProp = default(int?), int notRequiredNotnullableintegerProp = default(int), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), string notrequiredNullableStringProp = default(string), string notrequiredNotnullableStringProp = default(string), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), bool? notrequiredNullableBooleanProp = default(bool?), bool notrequiredNotnullableBooleanProp = default(bool), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), DateTime? notRequiredNullableDateProp = default(DateTime?), DateTime notRequiredNotnullableDateProp = default(DateTime), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), DateTime? notrequiredNullableDatetimeProp = default(DateTime?), DateTime notrequiredNotnullableDatetimeProp = default(DateTime), RequiredNullableEnumIntegerEnum requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), NotrequiredNullableEnumIntegerEnum? notrequiredNullableEnumInteger = default(NotrequiredNullableEnumIntegerEnum?), NotrequiredNotnullableEnumIntegerEnum? notrequiredNotnullableEnumInteger = default(NotrequiredNotnullableEnumIntegerEnum?), RequiredNullableEnumIntegerOnlyEnum requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), NotrequiredNullableEnumIntegerOnlyEnum? notrequiredNullableEnumIntegerOnly = default(NotrequiredNullableEnumIntegerOnlyEnum?), NotrequiredNotnullableEnumIntegerOnlyEnum? notrequiredNotnullableEnumIntegerOnly = default(NotrequiredNotnullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum requiredNullableEnumString = default(RequiredNullableEnumStringEnum), NotrequiredNullableEnumStringEnum? notrequiredNullableEnumString = default(NotrequiredNullableEnumStringEnum?), NotrequiredNotnullableEnumStringEnum? notrequiredNotnullableEnumString = default(NotrequiredNotnullableEnumStringEnum?), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue? notrequiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue? notrequiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Guid? notrequiredNullableUuid = default(Guid?), Guid notrequiredNotnullableUuid = default(Guid), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), List notrequiredNullableArrayOfString = default(List), List notrequiredNotnullableArrayOfString = default(List)) + public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), Option notRequiredNullableIntegerProp = default(Option), Option notRequiredNotnullableintegerProp = default(Option), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), Option notrequiredNullableStringProp = default(Option), Option notrequiredNotnullableStringProp = default(Option), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), Option notrequiredNullableBooleanProp = default(Option), Option notrequiredNotnullableBooleanProp = default(Option), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), Option notRequiredNullableDateProp = default(Option), Option notRequiredNotnullableDateProp = default(Option), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), Option notrequiredNullableDatetimeProp = default(Option), Option notrequiredNotnullableDatetimeProp = default(Option), RequiredNullableEnumIntegerEnum? requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum?), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), Option notrequiredNullableEnumInteger = default(Option), Option notrequiredNotnullableEnumInteger = default(Option), RequiredNullableEnumIntegerOnlyEnum? requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), Option notrequiredNullableEnumIntegerOnly = default(Option), Option notrequiredNotnullableEnumIntegerOnly = default(Option), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum? requiredNullableEnumString = default(RequiredNullableEnumStringEnum?), Option notrequiredNullableEnumString = default(Option), Option notrequiredNotnullableEnumString = default(Option), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), Option notrequiredNullableOuterEnumDefaultValue = default(Option), Option notrequiredNotnullableOuterEnumDefaultValue = default(Option), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Option notrequiredNullableUuid = default(Option), Option notrequiredNotnullableUuid = default(Option), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), Option> notrequiredNullableArrayOfString = default(Option>), Option> notrequiredNotnullableArrayOfString = default(Option>)) { - // to ensure "requiredNullableIntegerProp" is required (not null) - if (requiredNullableIntegerProp == null) + // to ensure "requiredNotnullableStringProp" (not nullable) is not null + if (requiredNotnullableStringProp == null) { - throw new ArgumentNullException("requiredNullableIntegerProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableIntegerProp = requiredNullableIntegerProp; - this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; - // to ensure "requiredNullableStringProp" is required (not null) - if (requiredNullableStringProp == null) + // to ensure "notrequiredNotnullableStringProp" (not nullable) is not null + if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) { - throw new ArgumentNullException("requiredNullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableStringProp = requiredNullableStringProp; - // to ensure "requiredNotnullableStringProp" is required (not null) - if (requiredNotnullableStringProp == null) + // to ensure "requiredNotNullableDateProp" (not nullable) is not null + if (requiredNotNullableDateProp == null) { - throw new ArgumentNullException("requiredNotnullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotNullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableStringProp = requiredNotnullableStringProp; - // to ensure "requiredNullableBooleanProp" is required (not null) - if (requiredNullableBooleanProp == null) + // to ensure "notRequiredNotnullableDateProp" (not nullable) is not null + if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) { - throw new ArgumentNullException("requiredNullableBooleanProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notRequiredNotnullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableBooleanProp = requiredNullableBooleanProp; - this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; - // to ensure "requiredNullableDateProp" is required (not null) - if (requiredNullableDateProp == null) + // to ensure "requiredNotnullableDatetimeProp" (not nullable) is not null + if (requiredNotnullableDatetimeProp == null) { - throw new ArgumentNullException("requiredNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDateProp = requiredNullableDateProp; - this.RequiredNotNullableDateProp = requiredNotNullableDateProp; - this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; - // to ensure "requiredNullableDatetimeProp" is required (not null) - if (requiredNullableDatetimeProp == null) + // to ensure "notrequiredNotnullableDatetimeProp" (not nullable) is not null + if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) { - throw new ArgumentNullException("requiredNullableDatetimeProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; - this.RequiredNullableEnumInteger = requiredNullableEnumInteger; - this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; - this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; - this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; - this.RequiredNotnullableEnumString = requiredNotnullableEnumString; - this.RequiredNullableEnumString = requiredNullableEnumString; - this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; - this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; - // to ensure "requiredNullableUuid" is required (not null) - if (requiredNullableUuid == null) + // to ensure "requiredNotnullableUuid" (not nullable) is not null + if (requiredNotnullableUuid == null) { - throw new ArgumentNullException("requiredNullableUuid is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableUuid = requiredNullableUuid; - this.RequiredNotnullableUuid = requiredNotnullableUuid; - // to ensure "requiredNullableArrayOfString" is required (not null) - if (requiredNullableArrayOfString == null) + // to ensure "notrequiredNotnullableUuid" (not nullable) is not null + if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) { - throw new ArgumentNullException("requiredNullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableArrayOfString = requiredNullableArrayOfString; - // to ensure "requiredNotnullableArrayOfString" is required (not null) + // to ensure "requiredNotnullableArrayOfString" (not nullable) is not null if (requiredNotnullableArrayOfString == null) { - throw new ArgumentNullException("requiredNotnullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; + // to ensure "notrequiredNotnullableArrayOfString" (not nullable) is not null + if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) + { + throw new ArgumentNullException("notrequiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); + } + this.RequiredNullableIntegerProp = requiredNullableIntegerProp; + this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; this.NotRequiredNullableIntegerProp = notRequiredNullableIntegerProp; this.NotRequiredNotnullableintegerProp = notRequiredNotnullableintegerProp; + this.RequiredNullableStringProp = requiredNullableStringProp; + this.RequiredNotnullableStringProp = requiredNotnullableStringProp; this.NotrequiredNullableStringProp = notrequiredNullableStringProp; this.NotrequiredNotnullableStringProp = notrequiredNotnullableStringProp; + this.RequiredNullableBooleanProp = requiredNullableBooleanProp; + this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; this.NotrequiredNullableBooleanProp = notrequiredNullableBooleanProp; this.NotrequiredNotnullableBooleanProp = notrequiredNotnullableBooleanProp; + this.RequiredNullableDateProp = requiredNullableDateProp; + this.RequiredNotNullableDateProp = requiredNotNullableDateProp; this.NotRequiredNullableDateProp = notRequiredNullableDateProp; this.NotRequiredNotnullableDateProp = notRequiredNotnullableDateProp; + this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; + this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; this.NotrequiredNullableDatetimeProp = notrequiredNullableDatetimeProp; this.NotrequiredNotnullableDatetimeProp = notrequiredNotnullableDatetimeProp; + this.RequiredNullableEnumInteger = requiredNullableEnumInteger; + this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; this.NotrequiredNullableEnumInteger = notrequiredNullableEnumInteger; this.NotrequiredNotnullableEnumInteger = notrequiredNotnullableEnumInteger; + this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; + this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; this.NotrequiredNullableEnumIntegerOnly = notrequiredNullableEnumIntegerOnly; this.NotrequiredNotnullableEnumIntegerOnly = notrequiredNotnullableEnumIntegerOnly; + this.RequiredNotnullableEnumString = requiredNotnullableEnumString; + this.RequiredNullableEnumString = requiredNullableEnumString; this.NotrequiredNullableEnumString = notrequiredNullableEnumString; this.NotrequiredNotnullableEnumString = notrequiredNotnullableEnumString; + this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; + this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; this.NotrequiredNullableOuterEnumDefaultValue = notrequiredNullableOuterEnumDefaultValue; this.NotrequiredNotnullableOuterEnumDefaultValue = notrequiredNotnullableOuterEnumDefaultValue; + this.RequiredNullableUuid = requiredNullableUuid; + this.RequiredNotnullableUuid = requiredNotnullableUuid; this.NotrequiredNullableUuid = notrequiredNullableUuid; this.NotrequiredNotnullableUuid = notrequiredNotnullableUuid; + this.RequiredNullableArrayOfString = requiredNullableArrayOfString; + this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; this.NotrequiredNullableArrayOfString = notrequiredNullableArrayOfString; this.NotrequiredNotnullableArrayOfString = notrequiredNotnullableArrayOfString; this.AdditionalProperties = new Dictionary(); @@ -643,13 +647,13 @@ protected RequiredClass() /// Gets or Sets NotRequiredNullableIntegerProp /// [DataMember(Name = "not_required_nullable_integer_prop", EmitDefaultValue = true)] - public int? NotRequiredNullableIntegerProp { get; set; } + public Option NotRequiredNullableIntegerProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableintegerProp /// [DataMember(Name = "not_required_notnullableinteger_prop", EmitDefaultValue = false)] - public int NotRequiredNotnullableintegerProp { get; set; } + public Option NotRequiredNotnullableintegerProp { get; set; } /// /// Gets or Sets RequiredNullableStringProp @@ -667,13 +671,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableStringProp /// [DataMember(Name = "notrequired_nullable_string_prop", EmitDefaultValue = true)] - public string NotrequiredNullableStringProp { get; set; } + public Option NotrequiredNullableStringProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableStringProp /// [DataMember(Name = "notrequired_notnullable_string_prop", EmitDefaultValue = false)] - public string NotrequiredNotnullableStringProp { get; set; } + public Option NotrequiredNotnullableStringProp { get; set; } /// /// Gets or Sets RequiredNullableBooleanProp @@ -691,13 +695,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableBooleanProp /// [DataMember(Name = "notrequired_nullable_boolean_prop", EmitDefaultValue = true)] - public bool? NotrequiredNullableBooleanProp { get; set; } + public Option NotrequiredNullableBooleanProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableBooleanProp /// [DataMember(Name = "notrequired_notnullable_boolean_prop", EmitDefaultValue = true)] - public bool NotrequiredNotnullableBooleanProp { get; set; } + public Option NotrequiredNotnullableBooleanProp { get; set; } /// /// Gets or Sets RequiredNullableDateProp @@ -718,14 +722,14 @@ protected RequiredClass() /// [DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? NotRequiredNullableDateProp { get; set; } + public Option NotRequiredNullableDateProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableDateProp /// [DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime NotRequiredNotnullableDateProp { get; set; } + public Option NotRequiredNotnullableDateProp { get; set; } /// /// Gets or Sets RequiredNotnullableDatetimeProp @@ -743,13 +747,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableDatetimeProp /// [DataMember(Name = "notrequired_nullable_datetime_prop", EmitDefaultValue = true)] - public DateTime? NotrequiredNullableDatetimeProp { get; set; } + public Option NotrequiredNullableDatetimeProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableDatetimeProp /// [DataMember(Name = "notrequired_notnullable_datetime_prop", EmitDefaultValue = false)] - public DateTime NotrequiredNotnullableDatetimeProp { get; set; } + public Option NotrequiredNotnullableDatetimeProp { get; set; } /// /// Gets or Sets RequiredNullableUuid @@ -770,14 +774,14 @@ protected RequiredClass() /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_nullable_uuid", EmitDefaultValue = true)] - public Guid? NotrequiredNullableUuid { get; set; } + public Option NotrequiredNullableUuid { get; set; } /// /// Gets or Sets NotrequiredNotnullableUuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_notnullable_uuid", EmitDefaultValue = false)] - public Guid NotrequiredNotnullableUuid { get; set; } + public Option NotrequiredNotnullableUuid { get; set; } /// /// Gets or Sets RequiredNullableArrayOfString @@ -795,13 +799,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableArrayOfString /// [DataMember(Name = "notrequired_nullable_array_of_string", EmitDefaultValue = true)] - public List NotrequiredNullableArrayOfString { get; set; } + public Option> NotrequiredNullableArrayOfString { get; set; } /// /// Gets or Sets NotrequiredNotnullableArrayOfString /// [DataMember(Name = "notrequired_notnullable_array_of_string", EmitDefaultValue = false)] - public List NotrequiredNotnullableArrayOfString { get; set; } + public Option> NotrequiredNotnullableArrayOfString { get; set; } /// /// Gets or Sets additional properties @@ -904,16 +908,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RequiredNullableIntegerProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); + if (this.NotRequiredNullableIntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); - if (this.NotRequiredNullableIntegerProp != null) + if (this.NotRequiredNotnullableintegerProp.IsSet) { - hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.GetHashCode(); if (this.RequiredNullableStringProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableStringProp.GetHashCode(); @@ -922,24 +926,24 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableStringProp.GetHashCode(); } - if (this.NotrequiredNullableStringProp != null) + if (this.NotrequiredNullableStringProp.IsSet && this.NotrequiredNullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableStringProp != null) + if (this.NotrequiredNotnullableStringProp.IsSet && this.NotrequiredNotnullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.Value.GetHashCode(); } - if (this.RequiredNullableBooleanProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); + if (this.NotrequiredNullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); - if (this.NotrequiredNullableBooleanProp != null) + if (this.NotrequiredNotnullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.GetHashCode(); if (this.RequiredNullableDateProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableDateProp.GetHashCode(); @@ -948,13 +952,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotNullableDateProp.GetHashCode(); } - if (this.NotRequiredNullableDateProp != null) + if (this.NotRequiredNullableDateProp.IsSet && this.NotRequiredNullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.Value.GetHashCode(); } - if (this.NotRequiredNotnullableDateProp != null) + if (this.NotRequiredNotnullableDateProp.IsSet && this.NotRequiredNotnullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.Value.GetHashCode(); } if (this.RequiredNotnullableDatetimeProp != null) { @@ -964,30 +968,54 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNullableDatetimeProp.GetHashCode(); } - if (this.NotrequiredNullableDatetimeProp != null) + if (this.NotrequiredNullableDatetimeProp.IsSet && this.NotrequiredNullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableDatetimeProp != null) + if (this.NotrequiredNotnullableDatetimeProp.IsSet && this.NotrequiredNotnullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.RequiredNullableEnumInteger.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.GetHashCode(); + if (this.NotrequiredNullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableEnumIntegerOnly.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.GetHashCode(); + if (this.NotrequiredNullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNotnullableEnumString.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.GetHashCode(); + if (this.NotrequiredNullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableOuterEnumDefaultValue.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.GetHashCode(); + if (this.NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.Value.GetHashCode(); + } if (this.RequiredNullableUuid != null) { hashCode = (hashCode * 59) + this.RequiredNullableUuid.GetHashCode(); @@ -996,13 +1024,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableUuid.GetHashCode(); } - if (this.NotrequiredNullableUuid != null) + if (this.NotrequiredNullableUuid.IsSet && this.NotrequiredNullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.Value.GetHashCode(); } - if (this.NotrequiredNotnullableUuid != null) + if (this.NotrequiredNotnullableUuid.IsSet && this.NotrequiredNotnullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.Value.GetHashCode(); } if (this.RequiredNullableArrayOfString != null) { @@ -1012,13 +1040,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableArrayOfString.GetHashCode(); } - if (this.NotrequiredNullableArrayOfString != null) + if (this.NotrequiredNullableArrayOfString.IsSet && this.NotrequiredNullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.Value.GetHashCode(); } - if (this.NotrequiredNotnullableArrayOfString != null) + if (this.NotrequiredNotnullableArrayOfString.IsSet && this.NotrequiredNotnullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs index fec56c44fa82..077005d6cc27 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class Return : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varReturn. - public Return(int varReturn = default(int)) + public Return(Option varReturn = default(Option)) { this.VarReturn = varReturn; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class Return : IEquatable, IValidatableObject /// Gets or Sets VarReturn /// [DataMember(Name = "return", EmitDefaultValue = false)] - public int VarReturn { get; set; } + public Option VarReturn { get; set; } /// /// Gets or Sets additional properties @@ -106,7 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.VarReturn.GetHashCode(); + if (this.VarReturn.IsSet) + { + hashCode = (hashCode * 59) + this.VarReturn.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 4523238ad385..53d7053be15e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// /// roleUuid. /// role. - public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole)) + public RolesReportsHash(Option roleUuid = default(Option), Option role = default(Option)) { + // to ensure "roleUuid" (not nullable) is not null + if (roleUuid.IsSet && roleUuid.Value == null) + { + throw new ArgumentNullException("roleUuid isn't a nullable property for RolesReportsHash and cannot be null"); + } + // to ensure "role" (not nullable) is not null + if (role.IsSet && role.Value == null) + { + throw new ArgumentNullException("role isn't a nullable property for RolesReportsHash and cannot be null"); + } this.RoleUuid = roleUuid; this.Role = role; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// Gets or Sets RoleUuid /// [DataMember(Name = "role_uuid", EmitDefaultValue = false)] - public Guid RoleUuid { get; set; } + public Option RoleUuid { get; set; } /// /// Gets or Sets Role /// [DataMember(Name = "role", EmitDefaultValue = false)] - public RolesReportsHashRole Role { get; set; } + public Option Role { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RoleUuid != null) + if (this.RoleUuid.IsSet && this.RoleUuid.Value != null) { - hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.RoleUuid.Value.GetHashCode(); } - if (this.Role != null) + if (this.Role.IsSet && this.Role.Value != null) { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); + hashCode = (hashCode * 59) + this.Role.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index ef21c6091f38..177eddaba12d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Initializes a new instance of the class. /// /// name. - public RolesReportsHashRole(string name = default(string)) + public RolesReportsHashRole(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for RolesReportsHashRole and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 1510bd5c512d..a3ba20fa6c48 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected ScaleneTriangle() /// triangleType (required). public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ScaleneTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for ScaleneTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 12e4af151482..f7f7c7dcc627 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 9f8b4dd35b35..52027034071a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected ShapeInterface() /// shapeType (required). public ShapeInterface(string shapeType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 6d8279a8beda..b5fc4a013b0a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 266dcfee794c..1d5698e4b2ba 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected SimpleQuadrilateral() /// quadrilateralType (required). public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 33320b76cf1f..8778d6b6381c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// /// specialPropertyName. /// varSpecialModelName. - public SpecialModelName(long specialPropertyName = default(long), string varSpecialModelName = default(string)) + public SpecialModelName(Option specialPropertyName = default(Option), Option varSpecialModelName = default(Option)) { + // to ensure "varSpecialModelName" (not nullable) is not null + if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) + { + throw new ArgumentNullException("varSpecialModelName isn't a nullable property for SpecialModelName and cannot be null"); + } this.SpecialPropertyName = specialPropertyName; this.VarSpecialModelName = varSpecialModelName; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// Gets or Sets SpecialPropertyName /// [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] - public long SpecialPropertyName { get; set; } + public Option SpecialPropertyName { get; set; } /// /// Gets or Sets VarSpecialModelName /// [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string VarSpecialModelName { get; set; } + public Option VarSpecialModelName { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.VarSpecialModelName != null) + if (this.SpecialPropertyName.IsSet) + { + hashCode = (hashCode * 59) + this.SpecialPropertyName.Value.GetHashCode(); + } + if (this.VarSpecialModelName.IsSet && this.VarSpecialModelName.Value != null) { - hashCode = (hashCode * 59) + this.VarSpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.VarSpecialModelName.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 58eb2c605d15..74c5d5104142 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Tag : IEquatable, IValidatableObject /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this.Id = id; this.Name = name; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class Tag : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index f7782b6fd5a7..72bd1b369aeb 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordList : IEquatable class. /// /// value. - public TestCollectionEndingWithWordList(string value = default(string)) + public TestCollectionEndingWithWordList(Option value = default(Option)) { + // to ensure "value" (not nullable) is not null + if (value.IsSet && value.Value == null) + { + throw new ArgumentNullException("value isn't a nullable property for TestCollectionEndingWithWordList and cannot be null"); + } this.Value = value; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestCollectionEndingWithWordList : IEquatable [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } + public Option Value { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Value != null) + if (this.Value.IsSet && this.Value.Value != null) { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 8498a5eca78f..6e00826d7870 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable class. /// /// testCollectionEndingWithWordList. - public TestCollectionEndingWithWordListObject(List testCollectionEndingWithWordList = default(List)) + public TestCollectionEndingWithWordListObject(Option> testCollectionEndingWithWordList = default(Option>)) { + // to ensure "testCollectionEndingWithWordList" (not nullable) is not null + if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) + { + throw new ArgumentNullException("testCollectionEndingWithWordList isn't a nullable property for TestCollectionEndingWithWordListObject and cannot be null"); + } this.TestCollectionEndingWithWordList = testCollectionEndingWithWordList; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable [DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)] - public List TestCollectionEndingWithWordList { get; set; } + public Option> TestCollectionEndingWithWordList { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.TestCollectionEndingWithWordList != null) + if (this.TestCollectionEndingWithWordList.IsSet && this.TestCollectionEndingWithWordList.Value != null) { - hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.GetHashCode(); + hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 457b88ac9c74..aca5c0652ab6 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Initializes a new instance of the class. /// /// someProperty. - public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) + public TestInlineFreeformAdditionalPropertiesRequest(Option someProperty = default(Option)) { + // to ensure "someProperty" (not nullable) is not null + if (someProperty.IsSet && someProperty.Value == null) + { + throw new ArgumentNullException("someProperty isn't a nullable property for TestInlineFreeformAdditionalPropertiesRequest and cannot be null"); + } this.SomeProperty = someProperty; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Gets or Sets SomeProperty /// [DataMember(Name = "someProperty", EmitDefaultValue = false)] - public string SomeProperty { get; set; } + public Option SomeProperty { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SomeProperty != null) + if (this.SomeProperty.IsSet && this.SomeProperty.Value != null) { - hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.SomeProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 37729a438160..4874223e8554 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index 34fa15105dca..fc45b2b8d370 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected TriangleInterface() /// triangleType (required). public TriangleInterface(string triangleType = default(string)) { - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs index b7911507a704..4c20f415c024 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,43 @@ public partial class User : IEquatable, IValidatableObject /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) + public User(Option id = default(Option), Option username = default(Option), Option firstName = default(Option), Option lastName = default(Option), Option email = default(Option), Option password = default(Option), Option phone = default(Option), Option userStatus = default(Option), Option objectWithNoDeclaredProps = default(Option), Option objectWithNoDeclaredPropsNullable = default(Option), Option anyTypeProp = default(Option), Option anyTypePropNullable = default(Option)) { + // to ensure "username" (not nullable) is not null + if (username.IsSet && username.Value == null) + { + throw new ArgumentNullException("username isn't a nullable property for User and cannot be null"); + } + // to ensure "firstName" (not nullable) is not null + if (firstName.IsSet && firstName.Value == null) + { + throw new ArgumentNullException("firstName isn't a nullable property for User and cannot be null"); + } + // to ensure "lastName" (not nullable) is not null + if (lastName.IsSet && lastName.Value == null) + { + throw new ArgumentNullException("lastName isn't a nullable property for User and cannot be null"); + } + // to ensure "email" (not nullable) is not null + if (email.IsSet && email.Value == null) + { + throw new ArgumentNullException("email isn't a nullable property for User and cannot be null"); + } + // to ensure "password" (not nullable) is not null + if (password.IsSet && password.Value == null) + { + throw new ArgumentNullException("password isn't a nullable property for User and cannot be null"); + } + // to ensure "phone" (not nullable) is not null + if (phone.IsSet && phone.Value == null) + { + throw new ArgumentNullException("phone isn't a nullable property for User and cannot be null"); + } + // to ensure "objectWithNoDeclaredProps" (not nullable) is not null + if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) + { + throw new ArgumentNullException("objectWithNoDeclaredProps isn't a nullable property for User and cannot be null"); + } this.Id = id; this.Username = username; this.FirstName = firstName; @@ -68,78 +104,78 @@ public partial class User : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Username /// [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } + public Option Username { get; set; } /// /// Gets or Sets FirstName /// [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } + public Option FirstName { get; set; } /// /// Gets or Sets LastName /// [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } + public Option LastName { get; set; } /// /// Gets or Sets Email /// [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } + public Option Email { get; set; } /// /// Gets or Sets Password /// [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } + public Option Password { get; set; } /// /// Gets or Sets Phone /// [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } + public Option Phone { get; set; } /// /// User Status /// /// User Status [DataMember(Name = "userStatus", EmitDefaultValue = false)] - public int UserStatus { get; set; } + public Option UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] - public Object ObjectWithNoDeclaredProps { get; set; } + public Option ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] - public Object ObjectWithNoDeclaredPropsNullable { get; set; } + public Option ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] - public Object AnyTypeProp { get; set; } + public Option AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] - public Object AnyTypePropNullable { get; set; } + public Option AnyTypePropNullable { get; set; } /// /// Gets or Sets additional properties @@ -210,47 +246,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Username.IsSet && this.Username.Value != null) + { + hashCode = (hashCode * 59) + this.Username.Value.GetHashCode(); + } + if (this.FirstName.IsSet && this.FirstName.Value != null) { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); + hashCode = (hashCode * 59) + this.FirstName.Value.GetHashCode(); } - if (this.FirstName != null) + if (this.LastName.IsSet && this.LastName.Value != null) { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.LastName.Value.GetHashCode(); } - if (this.LastName != null) + if (this.Email.IsSet && this.Email.Value != null) { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + hashCode = (hashCode * 59) + this.Email.Value.GetHashCode(); } - if (this.Email != null) + if (this.Password.IsSet && this.Password.Value != null) { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); + hashCode = (hashCode * 59) + this.Password.Value.GetHashCode(); } - if (this.Password != null) + if (this.Phone.IsSet && this.Phone.Value != null) { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); + hashCode = (hashCode * 59) + this.Phone.Value.GetHashCode(); } - if (this.Phone != null) + if (this.UserStatus.IsSet) { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); + hashCode = (hashCode * 59) + this.UserStatus.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) + if (this.ObjectWithNoDeclaredProps.IsSet && this.ObjectWithNoDeclaredProps.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.Value.GetHashCode(); } - if (this.ObjectWithNoDeclaredPropsNullable != null) + if (this.ObjectWithNoDeclaredPropsNullable.IsSet && this.ObjectWithNoDeclaredPropsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.Value.GetHashCode(); } - if (this.AnyTypeProp != null) + if (this.AnyTypeProp.IsSet && this.AnyTypeProp.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypeProp.Value.GetHashCode(); } - if (this.AnyTypePropNullable != null) + if (this.AnyTypePropNullable.IsSet && this.AnyTypePropNullable.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypePropNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 50119ed39e76..2038fc78e8db 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,16 +47,16 @@ protected Whale() /// hasBaleen. /// hasTeeth. /// className (required). - public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) + public Whale(Option hasBaleen = default(Option), Option hasTeeth = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Whale and cannot be null"); } - this.ClassName = className; this.HasBaleen = hasBaleen; this.HasTeeth = hasTeeth; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -63,13 +64,13 @@ protected Whale() /// Gets or Sets HasBaleen /// [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] - public bool HasBaleen { get; set; } + public Option HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] - public bool HasTeeth { get; set; } + public Option HasTeeth { get; set; } /// /// Gets or Sets ClassName @@ -137,8 +138,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); + if (this.HasBaleen.IsSet) + { + hashCode = (hashCode * 59) + this.HasBaleen.Value.GetHashCode(); + } + if (this.HasTeeth.IsSet) + { + hashCode = (hashCode * 59) + this.HasTeeth.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 314fae589fc5..3bb224da1e43 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,7 +63,7 @@ public enum TypeEnum /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } + public Option Type { get; set; } /// /// Initializes a new instance of the class. /// @@ -76,15 +77,15 @@ protected Zebra() /// /// type. /// className (required). - public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) + public Zebra(Option type = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Zebra and cannot be null"); } - this.ClassName = className; this.Type = type; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -153,7 +154,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Type.IsSet) + { + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs index b4ff8d51adb7..15c623dc8d8f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 617dcd5f7a09..daccbc984737 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,12 +57,12 @@ public enum ZeroBasedEnumEnum /// Gets or Sets ZeroBasedEnum /// [DataMember(Name = "ZeroBasedEnum", EmitDefaultValue = false)] - public ZeroBasedEnumEnum? ZeroBasedEnum { get; set; } + public Option ZeroBasedEnum { get; set; } /// /// Initializes a new instance of the class. /// /// zeroBasedEnum. - public ZeroBasedEnumClass(ZeroBasedEnumEnum? zeroBasedEnum = default(ZeroBasedEnumEnum?)) + public ZeroBasedEnumClass(Option zeroBasedEnum = default(Option)) { this.ZeroBasedEnum = zeroBasedEnum; this.AdditionalProperties = new Dictionary(); @@ -125,7 +126,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.ZeroBasedEnum.GetHashCode(); + if (this.ZeroBasedEnum.IsSet) + { + hashCode = (hashCode * 59) + this.ZeroBasedEnum.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/.openapi-generator/FILES index 7ba297eae0fc..9e52698a89d0 100644 --- a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/.openapi-generator/FILES @@ -23,6 +23,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Api/FakeApi.cs index f61afa1411b3..9d09cffce8a0 100644 --- a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Api/FakeApi.cs @@ -242,21 +242,15 @@ public Org.OpenAPITools.Client.ApiResponse GetParameterNameMappingWithHttpI { // verify the required parameter 'type' is set if (type == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'type' when calling FakeApi->GetParameterNameMapping"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'type' when calling FakeApi->GetParameterNameMapping"); // verify the required parameter 'TypeWithUnderscore' is set if (TypeWithUnderscore == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'TypeWithUnderscore' when calling FakeApi->GetParameterNameMapping"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'TypeWithUnderscore' when calling FakeApi->GetParameterNameMapping"); // verify the required parameter 'httpDebugOption' is set if (httpDebugOption == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'httpDebugOption' when calling FakeApi->GetParameterNameMapping"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'httpDebugOption' when calling FakeApi->GetParameterNameMapping"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -335,21 +329,15 @@ public Org.OpenAPITools.Client.ApiResponse GetParameterNameMappingWithHttpI { // verify the required parameter 'type' is set if (type == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'type' when calling FakeApi->GetParameterNameMapping"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'type' when calling FakeApi->GetParameterNameMapping"); // verify the required parameter 'TypeWithUnderscore' is set if (TypeWithUnderscore == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'TypeWithUnderscore' when calling FakeApi->GetParameterNameMapping"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'TypeWithUnderscore' when calling FakeApi->GetParameterNameMapping"); // verify the required parameter 'httpDebugOption' is set if (httpDebugOption == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'httpDebugOption' when calling FakeApi->GetParameterNameMapping"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'httpDebugOption' when calling FakeApi->GetParameterNameMapping"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Client/ApiClient.cs index fe40f39ad5b3..5f09d00d33ed 100644 --- a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Client/ApiClient.cs @@ -30,6 +30,7 @@ using FileIO = System.IO.File; using Polly; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -49,7 +50,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -183,7 +185,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..c2774d4970d2 --- /dev/null +++ b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,126 @@ +// +/* + * Dummy + * + * To test name, parameter mapping options + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + +#nullable enable + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + Type innerType = value?.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType)!; + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/Env.cs b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/Env.cs index ea3d938c159a..14c7607811c1 100644 --- a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/Env.cs +++ b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/Env.cs @@ -22,6 +22,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -35,8 +36,13 @@ public partial class Env : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// dummy. - public Env(string dummy = default(string)) + public Env(Option dummy = default(Option)) { + // to ensure "dummy" (not nullable) is not null + if (dummy.IsSet && dummy.Value == null) + { + throw new ArgumentNullException("dummy isn't a nullable property for Env and cannot be null"); + } this.Dummy = dummy; } @@ -44,7 +50,7 @@ public partial class Env : IEquatable, IValidatableObject /// Gets or Sets Dummy /// [DataMember(Name = "dummy", EmitDefaultValue = false)] - public string Dummy { get; set; } + public Option Dummy { get; set; } /// /// Returns the string presentation of the object @@ -91,9 +97,8 @@ public bool Equals(Env input) } return ( - this.Dummy == input.Dummy || - (this.Dummy != null && - this.Dummy.Equals(input.Dummy)) + + this.Dummy.Equals(input.Dummy) ); } @@ -106,9 +111,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Dummy != null) + if (this.Dummy.IsSet && this.Dummy.Value != null) { - hashCode = (hashCode * 59) + this.Dummy.GetHashCode(); + hashCode = (hashCode * 59) + this.Dummy.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/PropertyNameMapping.cs b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/PropertyNameMapping.cs index 597e015588f8..3e7a2d37d3cd 100644 --- a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/PropertyNameMapping.cs +++ b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/PropertyNameMapping.cs @@ -22,6 +22,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,28 @@ public partial class PropertyNameMapping : IEquatable, IVal /// underscoreType. /// type. /// typeWithUnderscore. - public PropertyNameMapping(string httpDebugOperation = default(string), string underscoreType = default(string), string type = default(string), string typeWithUnderscore = default(string)) + public PropertyNameMapping(Option httpDebugOperation = default(Option), Option underscoreType = default(Option), Option type = default(Option), Option typeWithUnderscore = default(Option)) { + // to ensure "httpDebugOperation" (not nullable) is not null + if (httpDebugOperation.IsSet && httpDebugOperation.Value == null) + { + throw new ArgumentNullException("httpDebugOperation isn't a nullable property for PropertyNameMapping and cannot be null"); + } + // to ensure "underscoreType" (not nullable) is not null + if (underscoreType.IsSet && underscoreType.Value == null) + { + throw new ArgumentNullException("underscoreType isn't a nullable property for PropertyNameMapping and cannot be null"); + } + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for PropertyNameMapping and cannot be null"); + } + // to ensure "typeWithUnderscore" (not nullable) is not null + if (typeWithUnderscore.IsSet && typeWithUnderscore.Value == null) + { + throw new ArgumentNullException("typeWithUnderscore isn't a nullable property for PropertyNameMapping and cannot be null"); + } this.HttpDebugOperation = httpDebugOperation; this.UnderscoreType = underscoreType; this.Type = type; @@ -50,25 +71,25 @@ public partial class PropertyNameMapping : IEquatable, IVal /// Gets or Sets HttpDebugOperation /// [DataMember(Name = "http_debug_operation", EmitDefaultValue = false)] - public string HttpDebugOperation { get; set; } + public Option HttpDebugOperation { get; set; } /// /// Gets or Sets UnderscoreType /// [DataMember(Name = "_type", EmitDefaultValue = false)] - public string UnderscoreType { get; set; } + public Option UnderscoreType { get; set; } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + public Option Type { get; set; } /// /// Gets or Sets TypeWithUnderscore /// [DataMember(Name = "type_", EmitDefaultValue = false)] - public string TypeWithUnderscore { get; set; } + public Option TypeWithUnderscore { get; set; } /// /// Returns the string presentation of the object @@ -118,24 +139,20 @@ public bool Equals(PropertyNameMapping input) } return ( - this.HttpDebugOperation == input.HttpDebugOperation || - (this.HttpDebugOperation != null && - this.HttpDebugOperation.Equals(input.HttpDebugOperation)) + + this.HttpDebugOperation.Equals(input.HttpDebugOperation) ) && ( - this.UnderscoreType == input.UnderscoreType || - (this.UnderscoreType != null && - this.UnderscoreType.Equals(input.UnderscoreType)) + + this.UnderscoreType.Equals(input.UnderscoreType) ) && ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) + + this.Type.Equals(input.Type) ) && ( - this.TypeWithUnderscore == input.TypeWithUnderscore || - (this.TypeWithUnderscore != null && - this.TypeWithUnderscore.Equals(input.TypeWithUnderscore)) + + this.TypeWithUnderscore.Equals(input.TypeWithUnderscore) ); } @@ -148,21 +165,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.HttpDebugOperation != null) + if (this.HttpDebugOperation.IsSet && this.HttpDebugOperation.Value != null) { - hashCode = (hashCode * 59) + this.HttpDebugOperation.GetHashCode(); + hashCode = (hashCode * 59) + this.HttpDebugOperation.Value.GetHashCode(); } - if (this.UnderscoreType != null) + if (this.UnderscoreType.IsSet && this.UnderscoreType.Value != null) { - hashCode = (hashCode * 59) + this.UnderscoreType.GetHashCode(); + hashCode = (hashCode * 59) + this.UnderscoreType.Value.GetHashCode(); } - if (this.Type != null) + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.TypeWithUnderscore != null) + if (this.TypeWithUnderscore.IsSet && this.TypeWithUnderscore.Value != null) { - hashCode = (hashCode * 59) + this.TypeWithUnderscore.GetHashCode(); + hashCode = (hashCode * 59) + this.TypeWithUnderscore.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/.openapi-generator/FILES index c6424794961a..e662c2362228 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/.openapi-generator/FILES @@ -132,6 +132,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/AdditionalPropertiesClass.md index c40cd0f8accb..b7f89fdf61d0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/AdditionalPropertiesClass.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MapProperty** | **Dictionary<string, string>** | | [optional] **MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**Anytype1** | **Object** | | [optional] +**Anytype1** | **Object?** | | [optional] **MapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype3** | **Dictionary<string, Object>** | | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/EnumTest.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/EnumTest.md index 5ce3c4addd9b..34121fad769e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/EnumTest.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/EnumTest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **EnumInteger** | **int** | | [optional] **EnumIntegerOnly** | **int** | | [optional] **EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [optional] +**OuterEnum** | **OuterEnum?** | | [optional] **OuterEnumInteger** | **OuterEnumInteger** | | [optional] **OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] **OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/FakeApi.md index 933fb1c7cad3..f45d0a14d397 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool? body = null) +> bool FakeOuterBooleanSerialize (bool body = null) @@ -134,7 +134,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = true; // bool? | Input boolean as post body (optional) + var body = true; // bool | Input boolean as post body (optional) try { @@ -175,7 +175,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **bool?** | Input boolean as post body | [optional] | +| **body** | **bool** | Input boolean as post body | [optional] | ### Return type @@ -200,7 +200,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite? outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) @@ -223,7 +223,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var outerComposite = new OuterComposite?(); // OuterComposite? | Input composite as post body (optional) + var outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body (optional) try { @@ -264,7 +264,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **outerComposite** | [**OuterComposite?**](OuterComposite?.md) | Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] | ### Return type @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal? body = null) +> decimal FakeOuterNumberSerialize (decimal body = null) @@ -312,7 +312,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14D; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal | Input number as post body (optional) try { @@ -353,7 +353,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **decimal?** | Input number as post body | [optional] | +| **body** | **decimal** | Input number as post body | [optional] | ### Return type @@ -378,7 +378,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string? body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) @@ -402,7 +402,7 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var requiredStringUuid = "requiredStringUuid_example"; // Guid | Required UUID String - var body = "body_example"; // string? | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -444,7 +444,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **requiredStringUuid** | **Guid** | Required UUID String | | -| **body** | **string?** | Input string as post body | [optional] | +| **body** | **string** | Input string as post body | [optional] | ### Return type @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string? varString = null, System.IO.Stream? binary = null, DateOnly? date = null, DateTime? dateTime = null, string? password = null, string? callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateOnly date = null, DateTime dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1098,16 +1098,16 @@ namespace Example var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789L; // long? | None (optional) - var varFloat = 3.4F; // float? | None (optional) - var varString = "varString_example"; // string? | None (optional) - var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | None (optional) - var date = DateOnly.Parse("2013-10-20"); // DateOnly? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") - var password = "password_example"; // string? | None (optional) - var callback = "callback_example"; // string? | None (optional) + var integer = 56; // int | None (optional) + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var date = DateOnly.Parse("2013-10-20"); // DateOnly | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -1150,16 +1150,16 @@ catch (ApiException e) | **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int?** | None | [optional] | -| **int32** | **int?** | None | [optional] | -| **int64** | **long?** | None | [optional] | -| **varFloat** | **float?** | None | [optional] | -| **varString** | **string?** | None | [optional] | -| **binary** | **System.IO.Stream?****System.IO.Stream?** | None | [optional] | -| **date** | **DateOnly?** | None | [optional] | -| **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | -| **password** | **string?** | None | [optional] | -| **callback** | **string?** | None | [optional] | +| **integer** | **int** | None | [optional] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | +| **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **date** | **DateOnly** | None | [optional] | +| **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **password** | **string** | None | [optional] | +| **callback** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -1208,14 +1208,14 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List?(); // List? | Header parameter enum test (string array) (optional) - var enumHeaderString = "_abc"; // string? | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List?(); // List? | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string? | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List?(); // List? | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string? | Form parameter enum test (string) (optional) (default to -efg) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<string>?**](string.md) | Header parameter enum test (string array) | [optional] | -| **enumHeaderString** | **string?** | Header parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryStringArray** | [**List<string>?**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **string?** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | -| **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>?**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | -| **enumFormString** | **string?** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | +| **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | +| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) Fake endpoint to test group parameters (optional) @@ -1316,9 +1316,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789L; // long? | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) + var booleanGroup = true; // bool | Boolean in group parameters (optional) + var int64Group = 789L; // long | Integer in group parameters (optional) try { @@ -1360,9 +1360,9 @@ catch (ApiException e) | **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | -| **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | -| **int64Group** | **long?** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | +| **booleanGroup** | **bool** | Boolean in group parameters | [optional] | +| **int64Group** | **long** | Integer in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = null, string? notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) @@ -1674,8 +1674,8 @@ namespace Example var context = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | var requiredNullable = "requiredNullable_example"; // string | - var notRequiredNotNullable = "notRequiredNotNullable_example"; // string? | (optional) - var notRequiredNullable = "notRequiredNullable_example"; // string? | (optional) + var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) + var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) try { @@ -1719,8 +1719,8 @@ catch (ApiException e) | **context** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | | **requiredNullable** | **string** | | | -| **notRequiredNotNullable** | **string?** | | [optional] | -| **notRequiredNullable** | **string?** | | [optional] | +| **notRequiredNotNullable** | **string** | | [optional] | +| **notRequiredNullable** | **string** | | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/HealthCheckResult.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/HealthCheckResult.md index f7d1a7eb6886..154fd14dcc7d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/HealthCheckResult.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/HealthCheckResult.md @@ -5,7 +5,7 @@ Just a string to inform instance is up and running. Make it nullable in hope to Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**NullableMessage** | **string** | | [optional] +**NullableMessage** | **string?** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/NullableClass.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/NullableClass.md index 67c1052fca9d..673080737fca 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/NullableClass.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/NullableClass.md @@ -7,15 +7,15 @@ Name | Type | Description | Notes **IntegerProp** | **int?** | | [optional] **NumberProp** | **decimal?** | | [optional] **BooleanProp** | **bool?** | | [optional] -**StringProp** | **string** | | [optional] -**DateProp** | **DateOnly** | | [optional] +**StringProp** | **string?** | | [optional] +**DateProp** | **DateOnly?** | | [optional] **DatetimeProp** | **DateTime?** | | [optional] -**ArrayNullableProp** | **List<Object>** | | [optional] -**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] -**ArrayItemsNullable** | **List<Object>** | | [optional] -**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] -**ObjectAndItemsNullableProp** | **Dictionary<string, Object>** | | [optional] -**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional] +**ArrayNullableProp** | **List<Object>?** | | [optional] +**ArrayAndItemsNullableProp** | **List<Object?>?** | | [optional] +**ArrayItemsNullable** | **List<Object?>** | | [optional] +**ObjectNullableProp** | **Dictionary<string, Object>?** | | [optional] +**ObjectAndItemsNullableProp** | **Dictionary<string, Object?>?** | | [optional] +**ObjectItemsNullable** | **Dictionary<string, Object?>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/PetApi.md index 417e0ab80207..220b1ae30105 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/PetApi.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string? apiKey = null) +> void DeletePet (long petId, string apiKey = null) Deletes a pet @@ -129,7 +129,7 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | Pet id to delete - var apiKey = "apiKey_example"; // string? | (optional) + var apiKey = "apiKey_example"; // string | (optional) try { @@ -169,7 +169,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | Pet id to delete | | -| **apiKey** | **string?** | | [optional] | +| **apiKey** | **string** | | [optional] | ### Return type @@ -576,7 +576,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string? name = null, string? status = null) +> void UpdatePetWithForm (long petId, string name = null, string status = null) Updates a pet in the store with form data @@ -601,8 +601,8 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet that needs to be updated - var name = "name_example"; // string? | Updated name of the pet (optional) - var status = "status_example"; // string? | Updated status of the pet (optional) + var name = "name_example"; // string | Updated name of the pet (optional) + var status = "status_example"; // string | Updated status of the pet (optional) try { @@ -642,8 +642,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | ID of pet that needs to be updated | | -| **name** | **string?** | Updated name of the pet | [optional] | -| **status** | **string?** | Updated status of the pet | [optional] | +| **name** | **string** | Updated name of the pet | [optional] | +| **status** | **string** | Updated status of the pet | [optional] | ### Return type @@ -668,7 +668,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string? additionalMetadata = null, System.IO.Stream? file = null) +> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) uploads an image @@ -693,8 +693,8 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet to update - var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional) - var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | file to upload (optional) + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) try { @@ -738,8 +738,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | ID of pet to update | | -| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] | -| **file** | **System.IO.Stream?****System.IO.Stream?** | file to upload | [optional] | +| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | +| **file** | **System.IO.Stream****System.IO.Stream** | file to upload | [optional] | ### Return type @@ -764,7 +764,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string? additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) uploads an image (required) @@ -790,7 +790,7 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet to update var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload - var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional) + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { @@ -835,7 +835,7 @@ catch (ApiException e) |------|------|-------------|-------| | **petId** | **long** | ID of pet to update | | | **requiredFile** | **System.IO.Stream****System.IO.Stream** | file to upload | | -| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] | +| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/RequiredClass.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/RequiredClass.md index 685c1c51e031..67336a3fa42a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/RequiredClass.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/RequiredClass.md @@ -8,17 +8,17 @@ Name | Type | Description | Notes **RequiredNotnullableintegerProp** | **int** | | **NotRequiredNullableIntegerProp** | **int?** | | [optional] **NotRequiredNotnullableintegerProp** | **int** | | [optional] -**RequiredNullableStringProp** | **string** | | +**RequiredNullableStringProp** | **string?** | | **RequiredNotnullableStringProp** | **string** | | -**NotrequiredNullableStringProp** | **string** | | [optional] +**NotrequiredNullableStringProp** | **string?** | | [optional] **NotrequiredNotnullableStringProp** | **string** | | [optional] **RequiredNullableBooleanProp** | **bool?** | | **RequiredNotnullableBooleanProp** | **bool** | | **NotrequiredNullableBooleanProp** | **bool?** | | [optional] **NotrequiredNotnullableBooleanProp** | **bool** | | [optional] -**RequiredNullableDateProp** | **DateOnly** | | +**RequiredNullableDateProp** | **DateOnly?** | | **RequiredNotNullableDateProp** | **DateOnly** | | -**NotRequiredNullableDateProp** | **DateOnly** | | [optional] +**NotRequiredNullableDateProp** | **DateOnly?** | | [optional] **NotRequiredNotnullableDateProp** | **DateOnly** | | [optional] **RequiredNotnullableDatetimeProp** | **DateTime** | | **RequiredNullableDatetimeProp** | **DateTime?** | | @@ -33,20 +33,20 @@ Name | Type | Description | Notes **NotrequiredNullableEnumIntegerOnly** | **int?** | | [optional] **NotrequiredNotnullableEnumIntegerOnly** | **int** | | [optional] **RequiredNotnullableEnumString** | **string** | | -**RequiredNullableEnumString** | **string** | | -**NotrequiredNullableEnumString** | **string** | | [optional] +**RequiredNullableEnumString** | **string?** | | +**NotrequiredNullableEnumString** | **string?** | | [optional] **NotrequiredNotnullableEnumString** | **string** | | [optional] -**RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | +**RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue?** | | **RequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | -**NotrequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] +**NotrequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue?** | | [optional] **NotrequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] **RequiredNullableUuid** | **Guid?** | | **RequiredNotnullableUuid** | **Guid** | | **NotrequiredNullableUuid** | **Guid?** | | [optional] **NotrequiredNotnullableUuid** | **Guid** | | [optional] -**RequiredNullableArrayOfString** | **List<string>** | | +**RequiredNullableArrayOfString** | **List<string>?** | | **RequiredNotnullableArrayOfString** | **List<string>** | | -**NotrequiredNullableArrayOfString** | **List<string>** | | [optional] +**NotrequiredNullableArrayOfString** | **List<string>?** | | [optional] **NotrequiredNotnullableArrayOfString** | **List<string>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/User.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/User.md index b0cd4dc042bf..00831ade51d5 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/User.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/User.md @@ -13,9 +13,9 @@ Name | Type | Description | Notes **Phone** | **string** | | [optional] **UserStatus** | **int** | User Status | [optional] **ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] -**AnyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] -**AnyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] +**ObjectWithNoDeclaredPropsNullable** | **Object?** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**AnyTypeProp** | **Object?** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] +**AnyTypePropNullable** | **Object?** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 95d41fcbd942..3437138cacd2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -301,9 +299,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/DefaultApi.cs index 354f9eb6d9f2..11aeb829749a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -517,9 +517,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -588,9 +586,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/FakeApi.cs index d2863e79474b..bff4a966dfeb 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/FakeApi.cs @@ -55,7 +55,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); + bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -67,7 +67,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -78,7 +78,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0); + OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0); /// /// @@ -90,7 +90,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0); /// /// /// @@ -101,7 +101,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); + decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -113,7 +113,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -125,7 +125,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// string - string FakeOuterStringSerialize(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0); + string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// @@ -138,7 +138,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0); + ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// Array of Enums /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0); + void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -329,7 +329,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// To test enum parameters /// @@ -347,7 +347,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - void TestEnumParameters(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0); + void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// To test enum parameters @@ -366,7 +366,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0); + ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -382,7 +382,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -399,7 +399,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// test inline additionalProperties /// @@ -480,7 +480,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// @@ -500,7 +500,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// test referenced string map /// @@ -564,7 +564,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -577,7 +577,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -589,7 +589,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -602,7 +602,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -614,7 +614,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -627,7 +627,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -640,7 +640,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -654,7 +654,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -850,7 +850,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -876,7 +876,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -895,7 +895,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -915,7 +915,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -932,7 +932,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -950,7 +950,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -1047,7 +1047,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -1068,7 +1068,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test referenced string map /// @@ -1347,7 +1347,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) + public bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1360,7 +1360,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1413,7 +1413,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1427,7 +1427,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1481,7 +1481,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0) + public OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1494,8 +1494,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1547,7 +1551,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1561,8 +1565,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1615,7 +1623,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) + public decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1628,7 +1636,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1681,7 +1689,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1695,7 +1703,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1750,7 +1758,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0) + public string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, body); return localVarResponse.Data; @@ -1764,8 +1772,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1819,7 +1835,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(requiredStringUuid, body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1834,8 +1850,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2283,9 +2307,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2354,9 +2376,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2425,9 +2445,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2496,9 +2514,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2569,15 +2585,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2649,15 +2661,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2728,9 +2736,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2801,9 +2807,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2870,7 +2874,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0) + public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); } @@ -2895,19 +2899,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2931,49 +2955,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3021,7 +3045,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEndpointParametersWithHttpInfoAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3047,19 +3071,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3084,49 +3128,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3168,7 +3212,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - public void TestEnumParameters(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0) + public void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -3187,8 +3231,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -3211,37 +3279,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3277,7 +3345,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3297,8 +3365,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3322,37 +3414,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3386,7 +3478,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -3403,7 +3495,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3428,18 +3520,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3479,7 +3571,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3497,7 +3589,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3523,18 +3615,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3585,9 +3677,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3656,9 +3746,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3727,9 +3815,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3798,9 +3884,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3871,15 +3955,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3951,15 +4031,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4021,7 +4097,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } @@ -4041,49 +4117,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4113,13 +4183,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4156,7 +4226,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -4177,49 +4247,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4250,13 +4314,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4301,9 +4365,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4372,9 +4434,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index dd74c66d1544..9f168cc6adb2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -306,9 +304,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/PetApi.cs index f86ff3fb795e..20b583356df9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/PetApi.cs @@ -55,7 +55,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void DeletePet(long petId, string? apiKey = default(string?), int operationIndex = 0); + void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Deletes a pet @@ -68,7 +68,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string? apiKey = default(string?), int operationIndex = 0); + ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Finds Pets by status /// @@ -169,7 +169,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0); + void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -183,7 +183,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// uploads an image /// @@ -193,7 +193,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0); + ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image @@ -207,7 +207,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0); + ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image (required) /// @@ -217,7 +217,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); /// /// uploads an image (required) @@ -231,7 +231,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -278,7 +278,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -292,7 +292,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -408,7 +408,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -423,7 +423,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -437,7 +437,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -452,7 +452,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -466,7 +466,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -481,7 +481,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -625,9 +625,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -729,9 +727,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -818,7 +814,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// - public void DeletePet(long petId, string? apiKey = default(string?), int operationIndex = 0) + public void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -831,8 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string? apiKey = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -855,9 +855,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -903,7 +903,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -917,8 +917,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -942,9 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -1006,9 +1010,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1111,9 +1113,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1218,9 +1218,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,9 +1323,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1583,9 +1579,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1687,9 +1681,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1777,7 +1769,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0) + public void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1791,8 +1783,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1816,13 +1816,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1869,7 +1869,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1884,8 +1884,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1910,13 +1918,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1963,7 +1971,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0) + public ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1978,8 +1986,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2004,13 +2020,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2057,7 +2073,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2073,8 +2089,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2100,13 +2124,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2153,7 +2177,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -2168,13 +2192,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2201,9 +2227,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); @@ -2251,7 +2277,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2267,13 +2293,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2301,9 +2329,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/StoreApi.cs index e8bed0a150ec..1ffc5a694f5b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/StoreApi.cs @@ -364,9 +364,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -434,9 +432,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -775,9 +771,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -849,9 +843,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/UserApi.cs index 8efb827cdc00..3a89a6e99556 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Api/UserApi.cs @@ -552,9 +552,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -623,9 +621,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -694,9 +690,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -765,9 +759,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -836,9 +828,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -907,9 +897,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -978,9 +966,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1048,9 +1034,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1119,9 +1103,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1192,9 +1174,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1267,15 +1247,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1349,15 +1325,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1552,15 +1524,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1632,15 +1600,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs index 05e2ddb4de86..123e3ea02d56 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs @@ -31,6 +31,7 @@ using Polly; using Org.OpenAPITools.Client.Auth; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -50,7 +51,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -184,7 +186,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..0667fd28e770 --- /dev/null +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,126 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + +#nullable enable + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + Type innerType = value?.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType)!; + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Activity.cs index 08a39249cb82..64ec72ede072 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Activity.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class Activity : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// activityOutputs. - public Activity(Dictionary> activityOutputs = default(Dictionary>)) + public Activity(Option>> activityOutputs = default(Option>>)) { + // to ensure "activityOutputs" (not nullable) is not null + if (activityOutputs.IsSet && activityOutputs.Value == null) + { + throw new ArgumentNullException("activityOutputs isn't a nullable property for Activity and cannot be null"); + } this.ActivityOutputs = activityOutputs; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class Activity : IEquatable, IValidatableObject /// Gets or Sets ActivityOutputs /// [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] - public Dictionary> ActivityOutputs { get; set; } + public Option>> ActivityOutputs { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActivityOutputs != null) + if (this.ActivityOutputs.IsSet && this.ActivityOutputs.Value != null) { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); + hashCode = (hashCode * 59) + this.ActivityOutputs.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index dce3f9134dbb..1b186a8771ed 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class ActivityOutputElementRepresentation : IEquatable /// prop1. /// prop2. - public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + public ActivityOutputElementRepresentation(Option prop1 = default(Option), Option prop2 = default(Option)) { + // to ensure "prop1" (not nullable) is not null + if (prop1.IsSet && prop1.Value == null) + { + throw new ArgumentNullException("prop1 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } + // to ensure "prop2" (not nullable) is not null + if (prop2.IsSet && prop2.Value == null) + { + throw new ArgumentNullException("prop2 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } this.Prop1 = prop1; this.Prop2 = prop2; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class ActivityOutputElementRepresentation : IEquatable [DataMember(Name = "prop1", EmitDefaultValue = false)] - public string Prop1 { get; set; } + public Option Prop1 { get; set; } /// /// Gets or Sets Prop2 /// [DataMember(Name = "prop2", EmitDefaultValue = false)] - public Object Prop2 { get; set; } + public Option Prop2 { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Prop1 != null) + if (this.Prop1.IsSet && this.Prop1.Value != null) { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop1.Value.GetHashCode(); } - if (this.Prop2 != null) + if (this.Prop2.IsSet && this.Prop2.Value != null) { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop2.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index c83597fc607e..7ad6ecce1c83 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,8 +44,43 @@ public partial class AdditionalPropertiesClass : IEquatablemapWithUndeclaredPropertiesAnytype3. /// an object with no declared properties and no undeclared properties, hence it's an empty map.. /// mapWithUndeclaredPropertiesString. - public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) + public AdditionalPropertiesClass(Option> mapProperty = default(Option>), Option>> mapOfMapProperty = default(Option>>), Option anytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype2 = default(Option), Option> mapWithUndeclaredPropertiesAnytype3 = default(Option>), Option emptyMap = default(Option), Option> mapWithUndeclaredPropertiesString = default(Option>)) { + // to ensure "mapProperty" (not nullable) is not null + if (mapProperty.IsSet && mapProperty.Value == null) + { + throw new ArgumentNullException("mapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapOfMapProperty" (not nullable) is not null + if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) + { + throw new ArgumentNullException("mapOfMapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype1" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype2" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype3" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "emptyMap" (not nullable) is not null + if (emptyMap.IsSet && emptyMap.Value == null) + { + throw new ArgumentNullException("emptyMap isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesString" (not nullable) is not null + if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesString isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } this.MapProperty = mapProperty; this.MapOfMapProperty = mapOfMapProperty; this.Anytype1 = anytype1; @@ -60,50 +96,50 @@ public partial class AdditionalPropertiesClass : IEquatable [DataMember(Name = "map_property", EmitDefaultValue = false)] - public Dictionary MapProperty { get; set; } + public Option> MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] - public Dictionary> MapOfMapProperty { get; set; } + public Option>> MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// [DataMember(Name = "anytype_1", EmitDefaultValue = true)] - public Object Anytype1 { get; set; } + public Option Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } + public Option> MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. [DataMember(Name = "empty_map", EmitDefaultValue = false)] - public Object EmptyMap { get; set; } + public Option EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesString { get; set; } + public Option> MapWithUndeclaredPropertiesString { get; set; } /// /// Gets or Sets additional properties @@ -170,37 +206,37 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapProperty != null) + if (this.MapProperty.IsSet && this.MapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapProperty.Value.GetHashCode(); } - if (this.MapOfMapProperty != null) + if (this.MapOfMapProperty.IsSet && this.MapOfMapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfMapProperty.Value.GetHashCode(); } - if (this.Anytype1 != null) + if (this.Anytype1.IsSet && this.Anytype1.Value != null) { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.Anytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) + if (this.MapWithUndeclaredPropertiesAnytype1.IsSet && this.MapWithUndeclaredPropertiesAnytype1.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) + if (this.MapWithUndeclaredPropertiesAnytype2.IsSet && this.MapWithUndeclaredPropertiesAnytype2.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) + if (this.MapWithUndeclaredPropertiesAnytype3.IsSet && this.MapWithUndeclaredPropertiesAnytype3.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.Value.GetHashCode(); } - if (this.EmptyMap != null) + if (this.EmptyMap.IsSet && this.EmptyMap.Value != null) { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); + hashCode = (hashCode * 59) + this.EmptyMap.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesString != null) + if (this.MapWithUndeclaredPropertiesString.IsSet && this.MapWithUndeclaredPropertiesString.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Animal.cs index 9ddb56ebad6c..a9332678ea77 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Animal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -49,16 +50,20 @@ protected Animal() /// /// className (required). /// color (default to "red"). - public Animal(string className = default(string), string color = @"red") + public Animal(string className = default(string), Option color = default(Option)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Animal and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for Animal and cannot be null"); } this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? @"red"; + this.Color = color.IsSet ? color : new Option(@"red"); this.AdditionalProperties = new Dictionary(); } @@ -72,7 +77,7 @@ protected Animal() /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Gets or Sets additional properties @@ -137,9 +142,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); } - if (this.Color != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ApiResponse.cs index e55d523aad1f..72fba0eefb19 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,18 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// code. /// type. /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) + public ApiResponse(Option code = default(Option), Option type = default(Option), Option message = default(Option)) { + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for ApiResponse and cannot be null"); + } + // to ensure "message" (not nullable) is not null + if (message.IsSet && message.Value == null) + { + throw new ArgumentNullException("message isn't a nullable property for ApiResponse and cannot be null"); + } this.Code = code; this.Type = type; this.Message = message; @@ -50,19 +61,19 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// Gets or Sets Code /// [DataMember(Name = "code", EmitDefaultValue = false)] - public int Code { get; set; } + public Option Code { get; set; } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + public Option Type { get; set; } /// /// Gets or Sets Message /// [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } + public Option Message { get; set; } /// /// Gets or Sets additional properties @@ -124,14 +135,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) + if (this.Code.IsSet) + { + hashCode = (hashCode * 59) + this.Code.Value.GetHashCode(); + } + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.Message != null) + if (this.Message.IsSet && this.Message.Value != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this.Message.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Apple.cs index 8d3f9af56df6..f085a6b77f31 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Apple.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class Apple : IEquatable, IValidatableObject /// cultivar. /// origin. /// colorCode. - public Apple(string cultivar = default(string), string origin = default(string), string colorCode = default(string)) + public Apple(Option cultivar = default(Option), Option origin = default(Option), Option colorCode = default(Option)) { + // to ensure "cultivar" (not nullable) is not null + if (cultivar.IsSet && cultivar.Value == null) + { + throw new ArgumentNullException("cultivar isn't a nullable property for Apple and cannot be null"); + } + // to ensure "origin" (not nullable) is not null + if (origin.IsSet && origin.Value == null) + { + throw new ArgumentNullException("origin isn't a nullable property for Apple and cannot be null"); + } + // to ensure "colorCode" (not nullable) is not null + if (colorCode.IsSet && colorCode.Value == null) + { + throw new ArgumentNullException("colorCode isn't a nullable property for Apple and cannot be null"); + } this.Cultivar = cultivar; this.Origin = origin; this.ColorCode = colorCode; @@ -50,19 +66,19 @@ public partial class Apple : IEquatable, IValidatableObject /// Gets or Sets Cultivar /// [DataMember(Name = "cultivar", EmitDefaultValue = false)] - public string Cultivar { get; set; } + public Option Cultivar { get; set; } /// /// Gets or Sets Origin /// [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin { get; set; } + public Option Origin { get; set; } /// /// Gets or Sets ColorCode /// [DataMember(Name = "color_code", EmitDefaultValue = false)] - public string ColorCode { get; set; } + public Option ColorCode { get; set; } /// /// Gets or Sets additional properties @@ -124,17 +140,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Cultivar != null) + if (this.Cultivar.IsSet && this.Cultivar.Value != null) { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); + hashCode = (hashCode * 59) + this.Cultivar.Value.GetHashCode(); } - if (this.Origin != null) + if (this.Origin.IsSet && this.Origin.Value != null) { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); + hashCode = (hashCode * 59) + this.Origin.Value.GetHashCode(); } - if (this.ColorCode != null) + if (this.ColorCode.IsSet && this.ColorCode.Value != null) { - hashCode = (hashCode * 59) + this.ColorCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorCode.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AppleReq.cs index 3eef221be3e3..f2a1e63e3787 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AppleReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,12 +43,12 @@ protected AppleReq() { } /// /// cultivar (required). /// mealy. - public AppleReq(string cultivar = default(string), bool mealy = default(bool)) + public AppleReq(string cultivar = default(string), Option mealy = default(Option)) { - // to ensure "cultivar" is required (not null) + // to ensure "cultivar" (not nullable) is not null if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); + throw new ArgumentNullException("cultivar isn't a nullable property for AppleReq and cannot be null"); } this.Cultivar = cultivar; this.Mealy = mealy; @@ -63,7 +64,7 @@ protected AppleReq() { } /// Gets or Sets Mealy /// [DataMember(Name = "mealy", EmitDefaultValue = true)] - public bool Mealy { get; set; } + public Option Mealy { get; set; } /// /// Returns the string presentation of the object @@ -121,7 +122,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); + if (this.Mealy.IsSet) + { + hashCode = (hashCode * 59) + this.Mealy.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 3e1666ca90f8..7cc2ebed0e24 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable class. /// /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + public ArrayOfArrayOfNumberOnly(Option>> arrayArrayNumber = default(Option>>)) { + // to ensure "arrayArrayNumber" (not nullable) is not null + if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) + { + throw new ArgumentNullException("arrayArrayNumber isn't a nullable property for ArrayOfArrayOfNumberOnly and cannot be null"); + } this.ArrayArrayNumber = arrayArrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] - public List> ArrayArrayNumber { get; set; } + public Option>> ArrayArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayArrayNumber != null) + if (this.ArrayArrayNumber.IsSet && this.ArrayArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index f2946f435b53..7d85fc169003 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Initializes a new instance of the class. /// /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) + public ArrayOfNumberOnly(Option> arrayNumber = default(Option>)) { + // to ensure "arrayNumber" (not nullable) is not null + if (arrayNumber.IsSet && arrayNumber.Value == null) + { + throw new ArgumentNullException("arrayNumber isn't a nullable property for ArrayOfNumberOnly and cannot be null"); + } this.ArrayNumber = arrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Gets or Sets ArrayNumber /// [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] - public List ArrayNumber { get; set; } + public Option> ArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayNumber != null) + if (this.ArrayNumber.IsSet && this.ArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayTest.cs index 343e486f6575..119862eca2e8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// arrayOfString. /// arrayArrayOfInteger. /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + public ArrayTest(Option> arrayOfString = default(Option>), Option>> arrayArrayOfInteger = default(Option>>), Option>> arrayArrayOfModel = default(Option>>)) { + // to ensure "arrayOfString" (not nullable) is not null + if (arrayOfString.IsSet && arrayOfString.Value == null) + { + throw new ArgumentNullException("arrayOfString isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfInteger" (not nullable) is not null + if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) + { + throw new ArgumentNullException("arrayArrayOfInteger isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfModel" (not nullable) is not null + if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) + { + throw new ArgumentNullException("arrayArrayOfModel isn't a nullable property for ArrayTest and cannot be null"); + } this.ArrayOfString = arrayOfString; this.ArrayArrayOfInteger = arrayArrayOfInteger; this.ArrayArrayOfModel = arrayArrayOfModel; @@ -50,19 +66,19 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// Gets or Sets ArrayOfString /// [DataMember(Name = "array_of_string", EmitDefaultValue = false)] - public List ArrayOfString { get; set; } + public Option> ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] - public List> ArrayArrayOfInteger { get; set; } + public Option>> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] - public List> ArrayArrayOfModel { get; set; } + public Option>> ArrayArrayOfModel { get; set; } /// /// Gets or Sets additional properties @@ -124,17 +140,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayOfString != null) + if (this.ArrayOfString.IsSet && this.ArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayOfString.Value.GetHashCode(); } - if (this.ArrayArrayOfInteger != null) + if (this.ArrayArrayOfInteger.IsSet && this.ArrayArrayOfInteger.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.Value.GetHashCode(); } - if (this.ArrayArrayOfModel != null) + if (this.ArrayArrayOfModel.IsSet && this.ArrayArrayOfModel.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfModel.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Banana.cs index 04d69550656d..3d6f908c4487 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Banana.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// lengthCm. - public Banana(decimal lengthCm = default(decimal)) + public Banana(Option lengthCm = default(Option)) { this.LengthCm = lengthCm; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Gets or Sets LengthCm /// [DataMember(Name = "lengthCm", EmitDefaultValue = false)] - public decimal LengthCm { get; set; } + public Option LengthCm { get; set; } /// /// Gets or Sets additional properties @@ -106,7 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); + if (this.LengthCm.IsSet) + { + hashCode = (hashCode * 59) + this.LengthCm.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BananaReq.cs index 360cb5281e80..02703e4025a9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BananaReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,7 +43,7 @@ protected BananaReq() { } /// /// lengthCm (required). /// sweet. - public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool)) + public BananaReq(decimal lengthCm = default(decimal), Option sweet = default(Option)) { this.LengthCm = lengthCm; this.Sweet = sweet; @@ -58,7 +59,7 @@ protected BananaReq() { } /// Gets or Sets Sweet /// [DataMember(Name = "sweet", EmitDefaultValue = true)] - public bool Sweet { get; set; } + public Option Sweet { get; set; } /// /// Returns the string presentation of the object @@ -113,7 +114,10 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); + if (this.Sweet.IsSet) + { + hashCode = (hashCode * 59) + this.Sweet.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BasquePig.cs index 868cba98eeea..8771aa57a2b8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BasquePig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected BasquePig() /// className (required). public BasquePig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for BasquePig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Capitalization.cs index f46fffa0ad6c..46478517456c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Capitalization.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -41,8 +42,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// capitalSnake. /// sCAETHFlowPoints. /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) + public Capitalization(Option smallCamel = default(Option), Option capitalCamel = default(Option), Option smallSnake = default(Option), Option capitalSnake = default(Option), Option sCAETHFlowPoints = default(Option), Option aTTNAME = default(Option)) { + // to ensure "smallCamel" (not nullable) is not null + if (smallCamel.IsSet && smallCamel.Value == null) + { + throw new ArgumentNullException("smallCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalCamel" (not nullable) is not null + if (capitalCamel.IsSet && capitalCamel.Value == null) + { + throw new ArgumentNullException("capitalCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "smallSnake" (not nullable) is not null + if (smallSnake.IsSet && smallSnake.Value == null) + { + throw new ArgumentNullException("smallSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalSnake" (not nullable) is not null + if (capitalSnake.IsSet && capitalSnake.Value == null) + { + throw new ArgumentNullException("capitalSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "sCAETHFlowPoints" (not nullable) is not null + if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) + { + throw new ArgumentNullException("sCAETHFlowPoints isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "aTTNAME" (not nullable) is not null + if (aTTNAME.IsSet && aTTNAME.Value == null) + { + throw new ArgumentNullException("aTTNAME isn't a nullable property for Capitalization and cannot be null"); + } this.SmallCamel = smallCamel; this.CapitalCamel = capitalCamel; this.SmallSnake = smallSnake; @@ -56,38 +87,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// Gets or Sets SmallCamel /// [DataMember(Name = "smallCamel", EmitDefaultValue = false)] - public string SmallCamel { get; set; } + public Option SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] - public string CapitalCamel { get; set; } + public Option CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// [DataMember(Name = "small_Snake", EmitDefaultValue = false)] - public string SmallSnake { get; set; } + public Option SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] - public string CapitalSnake { get; set; } + public Option CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] - public string SCAETHFlowPoints { get; set; } + public Option SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] - public string ATT_NAME { get; set; } + public Option ATT_NAME { get; set; } /// /// Gets or Sets additional properties @@ -152,29 +183,29 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SmallCamel != null) + if (this.SmallCamel.IsSet && this.SmallCamel.Value != null) { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallCamel.Value.GetHashCode(); } - if (this.CapitalCamel != null) + if (this.CapitalCamel.IsSet && this.CapitalCamel.Value != null) { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalCamel.Value.GetHashCode(); } - if (this.SmallSnake != null) + if (this.SmallSnake.IsSet && this.SmallSnake.Value != null) { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallSnake.Value.GetHashCode(); } - if (this.CapitalSnake != null) + if (this.CapitalSnake.IsSet && this.CapitalSnake.Value != null) { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalSnake.Value.GetHashCode(); } - if (this.SCAETHFlowPoints != null) + if (this.SCAETHFlowPoints.IsSet && this.SCAETHFlowPoints.Value != null) { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); + hashCode = (hashCode * 59) + this.SCAETHFlowPoints.Value.GetHashCode(); } - if (this.ATT_NAME != null) + if (this.ATT_NAME.IsSet && this.ATT_NAME.Value != null) { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); + hashCode = (hashCode * 59) + this.ATT_NAME.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Cat.cs index a427b55727d7..c2e163db6026 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Cat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,7 +49,7 @@ protected Cat() /// declawed. /// className (required) (default to "Cat"). /// color (default to "red"). - public Cat(bool declawed = default(bool), string className = @"Cat", string color = @"red") : base(className, color) + public Cat(Option declawed = default(Option), string className = @"Cat", Option color = default(Option)) : base(className, color) { this.Declawed = declawed; this.AdditionalProperties = new Dictionary(); @@ -58,7 +59,7 @@ protected Cat() /// Gets or Sets Declawed /// [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed { get; set; } + public Option Declawed { get; set; } /// /// Gets or Sets additional properties @@ -119,7 +120,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); + if (this.Declawed.IsSet) + { + hashCode = (hashCode * 59) + this.Declawed.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Category.cs index 5edb4edfea4a..fa5cfbd9a2d5 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Category.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,15 +46,15 @@ protected Category() /// /// id. /// name (required) (default to "default-name"). - public Category(long id = default(long), string name = @"default-name") + public Category(Option id = default(Option), string name = @"default-name") { - // to ensure "name" is required (not null) + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); } - this.Name = name; this.Id = id; + this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -61,7 +62,7 @@ protected Category() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name @@ -128,7 +129,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ChildCat.cs index a5d404bd17d6..fd54f56a6ea9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ChildCat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -66,10 +67,15 @@ protected ChildCat() /// /// name. /// petType (required) (default to PetTypeEnum.ChildCat). - public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() + public ChildCat(Option name = default(Option), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.PetType = petType; + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for ChildCat and cannot be null"); + } this.Name = name; + this.PetType = petType; this.AdditionalProperties = new Dictionary(); } @@ -77,7 +83,7 @@ protected ChildCat() /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -139,9 +145,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.PetType.GetHashCode(); if (this.AdditionalProperties != null) diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ClassModel.cs index 7a0846aec4e1..c7e10769716c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ClassModel.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClass. - public ClassModel(string varClass = default(string)) + public ClassModel(Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for ClassModel and cannot be null"); + } this.Class = varClass; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Gets or Sets Class /// [DataMember(Name = "_class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Class != null) + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index bbed21283745..fbabd075d34f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected ComplexQuadrilateral() /// quadrilateralType (required). public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DanishPig.cs index 3c81f50d00d7..3816eb30acd4 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DanishPig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected DanishPig() /// className (required). public DanishPig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for DanishPig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 0ae21e98fd84..a0cd5a24c145 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// dateOnlyProperty. - public DateOnlyClass(DateOnly dateOnlyProperty = default(DateOnly)) + public DateOnlyClass(Option dateOnlyProperty = default(Option)) { + // to ensure "dateOnlyProperty" (not nullable) is not null + if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) + { + throw new ArgumentNullException("dateOnlyProperty isn't a nullable property for DateOnlyClass and cannot be null"); + } this.DateOnlyProperty = dateOnlyProperty; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// /// Fri Jul 21 00:00:00 UTC 2017 [DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)] - public DateOnly DateOnlyProperty { get; set; } + public Option DateOnlyProperty { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.DateOnlyProperty != null) + if (this.DateOnlyProperty.IsSet && this.DateOnlyProperty.Value != null) { - hashCode = (hashCode * 59) + this.DateOnlyProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.DateOnlyProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 2895d518a81f..d323606d4072 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Initializes a new instance of the class. /// /// name. - public DeprecatedObject(string name = default(string)) + public DeprecatedObject(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for DeprecatedObject and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Dog.cs index 44f95fa0fe05..d638ec7f4551 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Dog.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,8 +49,13 @@ protected Dog() /// breed. /// className (required) (default to "Dog"). /// color (default to "red"). - public Dog(string breed = default(string), string className = @"Dog", string color = @"red") : base(className, color) + public Dog(Option breed = default(Option), string className = @"Dog", Option color = default(Option)) : base(className, color) { + // to ensure "breed" (not nullable) is not null + if (breed.IsSet && breed.Value == null) + { + throw new ArgumentNullException("breed isn't a nullable property for Dog and cannot be null"); + } this.Breed = breed; this.AdditionalProperties = new Dictionary(); } @@ -58,7 +64,7 @@ protected Dog() /// Gets or Sets Breed /// [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed { get; set; } + public Option Breed { get; set; } /// /// Gets or Sets additional properties @@ -119,9 +125,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) + if (this.Breed.IsSet && this.Breed.Value != null) { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); + hashCode = (hashCode * 59) + this.Breed.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Drawing.cs index 98c683539e6f..64341b1a550e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Drawing.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,18 @@ public partial class Drawing : IEquatable, IValidatableObject /// shapeOrNull. /// nullableShape. /// shapes. - public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) + public Drawing(Option mainShape = default(Option), Option shapeOrNull = default(Option), Option nullableShape = default(Option), Option> shapes = default(Option>)) { + // to ensure "mainShape" (not nullable) is not null + if (mainShape.IsSet && mainShape.Value == null) + { + throw new ArgumentNullException("mainShape isn't a nullable property for Drawing and cannot be null"); + } + // to ensure "shapes" (not nullable) is not null + if (shapes.IsSet && shapes.Value == null) + { + throw new ArgumentNullException("shapes isn't a nullable property for Drawing and cannot be null"); + } this.MainShape = mainShape; this.ShapeOrNull = shapeOrNull; this.NullableShape = nullableShape; @@ -52,25 +63,25 @@ public partial class Drawing : IEquatable, IValidatableObject /// Gets or Sets MainShape /// [DataMember(Name = "mainShape", EmitDefaultValue = false)] - public Shape MainShape { get; set; } + public Option MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// [DataMember(Name = "shapeOrNull", EmitDefaultValue = true)] - public ShapeOrNull ShapeOrNull { get; set; } + public Option ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// [DataMember(Name = "nullableShape", EmitDefaultValue = true)] - public NullableShape NullableShape { get; set; } + public Option NullableShape { get; set; } /// /// Gets or Sets Shapes /// [DataMember(Name = "shapes", EmitDefaultValue = false)] - public List Shapes { get; set; } + public Option> Shapes { get; set; } /// /// Gets or Sets additional properties @@ -133,21 +144,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MainShape != null) + if (this.MainShape.IsSet && this.MainShape.Value != null) { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); + hashCode = (hashCode * 59) + this.MainShape.Value.GetHashCode(); } - if (this.ShapeOrNull != null) + if (this.ShapeOrNull.IsSet && this.ShapeOrNull.Value != null) { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); + hashCode = (hashCode * 59) + this.ShapeOrNull.Value.GetHashCode(); } - if (this.NullableShape != null) + if (this.NullableShape.IsSet && this.NullableShape.Value != null) { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableShape.Value.GetHashCode(); } - if (this.Shapes != null) + if (this.Shapes.IsSet && this.Shapes.Value != null) { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); + hashCode = (hashCode * 59) + this.Shapes.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumArrays.cs index 2bec93345bb7..569a1bbf1ea4 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,7 +57,7 @@ public enum JustSymbolEnum /// Gets or Sets JustSymbol /// [DataMember(Name = "just_symbol", EmitDefaultValue = false)] - public JustSymbolEnum? JustSymbol { get; set; } + public Option JustSymbol { get; set; } /// /// Defines ArrayEnum /// @@ -81,8 +82,13 @@ public enum ArrayEnumEnum /// /// justSymbol. /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) + public EnumArrays(Option justSymbol = default(Option), Option> arrayEnum = default(Option>)) { + // to ensure "arrayEnum" (not nullable) is not null + if (arrayEnum.IsSet && arrayEnum.Value == null) + { + throw new ArgumentNullException("arrayEnum isn't a nullable property for EnumArrays and cannot be null"); + } this.JustSymbol = justSymbol; this.ArrayEnum = arrayEnum; this.AdditionalProperties = new Dictionary(); @@ -92,7 +98,7 @@ public enum ArrayEnumEnum /// Gets or Sets ArrayEnum /// [DataMember(Name = "array_enum", EmitDefaultValue = false)] - public List ArrayEnum { get; set; } + public Option> ArrayEnum { get; set; } /// /// Gets or Sets additional properties @@ -153,10 +159,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) + if (this.JustSymbol.IsSet) + { + hashCode = (hashCode * 59) + this.JustSymbol.Value.GetHashCode(); + } + if (this.ArrayEnum.IsSet && this.ArrayEnum.Value != null) { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayEnum.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumClass.cs index c47540b557a3..eb2aa0bd1217 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs index 27d1193954ea..db5927382fe1 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -92,7 +93,7 @@ public enum EnumStringEnum /// Gets or Sets EnumString /// [DataMember(Name = "enum_string", EmitDefaultValue = false)] - public EnumStringEnum? EnumString { get; set; } + public Option EnumString { get; set; } /// /// Defines EnumStringRequired /// @@ -175,7 +176,7 @@ public enum EnumIntegerEnum /// Gets or Sets EnumInteger /// [DataMember(Name = "enum_integer", EmitDefaultValue = false)] - public EnumIntegerEnum? EnumInteger { get; set; } + public Option EnumInteger { get; set; } /// /// Defines EnumIntegerOnly /// @@ -197,7 +198,7 @@ public enum EnumIntegerOnlyEnum /// Gets or Sets EnumIntegerOnly /// [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] - public EnumIntegerOnlyEnum? EnumIntegerOnly { get; set; } + public Option EnumIntegerOnly { get; set; } /// /// Defines EnumNumber /// @@ -222,31 +223,31 @@ public enum EnumNumberEnum /// Gets or Sets EnumNumber /// [DataMember(Name = "enum_number", EmitDefaultValue = false)] - public EnumNumberEnum? EnumNumber { get; set; } + public Option EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// [DataMember(Name = "outerEnum", EmitDefaultValue = true)] - public OuterEnum? OuterEnum { get; set; } + public Option OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] - public OuterEnumInteger? OuterEnumInteger { get; set; } + public Option OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } + public Option OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } + public Option OuterEnumIntegerDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -267,10 +268,10 @@ protected EnumTest() /// outerEnumInteger. /// outerEnumDefaultValue. /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumIntegerOnlyEnum? enumIntegerOnly = default(EnumIntegerOnlyEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) + public EnumTest(Option enumString = default(Option), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), Option enumInteger = default(Option), Option enumIntegerOnly = default(Option), Option enumNumber = default(Option), Option outerEnum = default(Option), Option outerEnumInteger = default(Option), Option outerEnumDefaultValue = default(Option), Option outerEnumIntegerDefaultValue = default(Option)) { - this.EnumStringRequired = enumStringRequired; this.EnumString = enumString; + this.EnumStringRequired = enumStringRequired; this.EnumInteger = enumInteger; this.EnumIntegerOnly = enumIntegerOnly; this.EnumNumber = enumNumber; @@ -347,15 +348,39 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); + if (this.EnumString.IsSet) + { + hashCode = (hashCode * 59) + this.EnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); + if (this.EnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.EnumInteger.Value.GetHashCode(); + } + if (this.EnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.EnumIntegerOnly.Value.GetHashCode(); + } + if (this.EnumNumber.IsSet) + { + hashCode = (hashCode * 59) + this.EnumNumber.Value.GetHashCode(); + } + if (this.OuterEnum.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnum.Value.GetHashCode(); + } + if (this.OuterEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumInteger.Value.GetHashCode(); + } + if (this.OuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.OuterEnumIntegerDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 7fb0e2094548..26e4c5b5984b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected EquilateralTriangle() /// triangleType (required). public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for EquilateralTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for EquilateralTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/File.cs index 72b34e492626..3073d9ce4919 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/File.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class File : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// Test capitalization. - public File(string sourceURI = default(string)) + public File(Option sourceURI = default(Option)) { + // to ensure "sourceURI" (not nullable) is not null + if (sourceURI.IsSet && sourceURI.Value == null) + { + throw new ArgumentNullException("sourceURI isn't a nullable property for File and cannot be null"); + } this.SourceURI = sourceURI; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class File : IEquatable, IValidatableObject /// /// Test capitalization [DataMember(Name = "sourceURI", EmitDefaultValue = false)] - public string SourceURI { get; set; } + public Option SourceURI { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SourceURI != null) + if (this.SourceURI.IsSet && this.SourceURI.Value != null) { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); + hashCode = (hashCode * 59) + this.SourceURI.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index cd75dba4a925..bdd81d64aace 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// /// file. /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) + public FileSchemaTestClass(Option file = default(Option), Option> files = default(Option>)) { + // to ensure "file" (not nullable) is not null + if (file.IsSet && file.Value == null) + { + throw new ArgumentNullException("file isn't a nullable property for FileSchemaTestClass and cannot be null"); + } + // to ensure "files" (not nullable) is not null + if (files.IsSet && files.Value == null) + { + throw new ArgumentNullException("files isn't a nullable property for FileSchemaTestClass and cannot be null"); + } this.File = file; this.Files = files; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// Gets or Sets File /// [DataMember(Name = "file", EmitDefaultValue = false)] - public File File { get; set; } + public Option File { get; set; } /// /// Gets or Sets Files /// [DataMember(Name = "files", EmitDefaultValue = false)] - public List Files { get; set; } + public Option> Files { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.File != null) + if (this.File.IsSet && this.File.Value != null) { - hashCode = (hashCode * 59) + this.File.GetHashCode(); + hashCode = (hashCode * 59) + this.File.Value.GetHashCode(); } - if (this.Files != null) + if (this.Files.IsSet && this.Files.Value != null) { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); + hashCode = (hashCode * 59) + this.Files.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Foo.cs index 3108c8a86913..d899e3f91fa0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Foo.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,14 @@ public partial class Foo : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// bar (default to "bar"). - public Foo(string bar = @"bar") + public Foo(Option bar = default(Option)) { - // use default value if no "bar" provided - this.Bar = bar ?? @"bar"; + // to ensure "bar" (not nullable) is not null + if (bar.IsSet && bar.Value == null) + { + throw new ArgumentNullException("bar isn't a nullable property for Foo and cannot be null"); + } + this.Bar = bar.IsSet ? bar : new Option(@"bar"); this.AdditionalProperties = new Dictionary(); } @@ -47,7 +52,7 @@ public Foo(string bar = @"bar") /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; set; } + public Option Bar { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 1ce81eece3ee..3465ee4146ea 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class FooGetDefaultResponse : IEquatable, /// Initializes a new instance of the class. /// /// varString. - public FooGetDefaultResponse(Foo varString = default(Foo)) + public FooGetDefaultResponse(Option varString = default(Option)) { + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FooGetDefaultResponse and cannot be null"); + } this.String = varString; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class FooGetDefaultResponse : IEquatable, /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public Foo String { get; set; } + public Option String { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.String != null) + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs index 8cac7d740ff8..7abaa614cd4e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,39 +63,74 @@ protected FormatTest() /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(Option integer = default(Option), Option int32 = default(Option), Option unsignedInteger = default(Option), Option int64 = default(Option), Option unsignedLong = default(Option), decimal number = default(decimal), Option varFloat = default(Option), Option varDouble = default(Option), Option varDecimal = default(Option), Option varString = default(Option), byte[] varByte = default(byte[]), Option binary = default(Option), DateOnly date = default(DateOnly), Option dateTime = default(Option), Option uuid = default(Option), string password = default(string), Option patternWithDigits = default(Option), Option patternWithDigitsAndDelimiter = default(Option), Option patternWithBackslash = default(Option)) { - this.Number = number; - // to ensure "varByte" is required (not null) + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "varByte" (not nullable) is not null if (varByte == null) { - throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("varByte isn't a nullable property for FormatTest and cannot be null"); } - this.Byte = varByte; - // to ensure "date" is required (not null) + // to ensure "binary" (not nullable) is not null + if (binary.IsSet && binary.Value == null) + { + throw new ArgumentNullException("binary isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "date" (not nullable) is not null if (date == null) { - throw new ArgumentNullException("date is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("date isn't a nullable property for FormatTest and cannot be null"); } - this.Date = date; - // to ensure "password" is required (not null) + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "password" (not nullable) is not null if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("password isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigits" (not nullable) is not null + if (patternWithDigits.IsSet && patternWithDigits.Value == null) + { + throw new ArgumentNullException("patternWithDigits isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigitsAndDelimiter" (not nullable) is not null + if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) + { + throw new ArgumentNullException("patternWithDigitsAndDelimiter isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithBackslash" (not nullable) is not null + if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) + { + throw new ArgumentNullException("patternWithBackslash isn't a nullable property for FormatTest and cannot be null"); } - this.Password = password; this.Integer = integer; this.Int32 = int32; this.UnsignedInteger = unsignedInteger; this.Int64 = int64; this.UnsignedLong = unsignedLong; + this.Number = number; this.Float = varFloat; this.Double = varDouble; this.Decimal = varDecimal; this.String = varString; + this.Byte = varByte; this.Binary = binary; + this.Date = date; this.DateTime = dateTime; this.Uuid = uuid; + this.Password = password; this.PatternWithDigits = patternWithDigits; this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; this.PatternWithBackslash = patternWithBackslash; @@ -105,31 +141,31 @@ protected FormatTest() /// Gets or Sets Integer /// [DataMember(Name = "integer", EmitDefaultValue = false)] - public int Integer { get; set; } + public Option Integer { get; set; } /// /// Gets or Sets Int32 /// [DataMember(Name = "int32", EmitDefaultValue = false)] - public int Int32 { get; set; } + public Option Int32 { get; set; } /// /// Gets or Sets UnsignedInteger /// [DataMember(Name = "unsigned_integer", EmitDefaultValue = false)] - public uint UnsignedInteger { get; set; } + public Option UnsignedInteger { get; set; } /// /// Gets or Sets Int64 /// [DataMember(Name = "int64", EmitDefaultValue = false)] - public long Int64 { get; set; } + public Option Int64 { get; set; } /// /// Gets or Sets UnsignedLong /// [DataMember(Name = "unsigned_long", EmitDefaultValue = false)] - public ulong UnsignedLong { get; set; } + public Option UnsignedLong { get; set; } /// /// Gets or Sets Number @@ -141,25 +177,25 @@ protected FormatTest() /// Gets or Sets Float /// [DataMember(Name = "float", EmitDefaultValue = false)] - public float Float { get; set; } + public Option Float { get; set; } /// /// Gets or Sets Double /// [DataMember(Name = "double", EmitDefaultValue = false)] - public double Double { get; set; } + public Option Double { get; set; } /// /// Gets or Sets Decimal /// [DataMember(Name = "decimal", EmitDefaultValue = false)] - public decimal Decimal { get; set; } + public Option Decimal { get; set; } /// /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public string String { get; set; } + public Option String { get; set; } /// /// Gets or Sets Byte @@ -171,7 +207,7 @@ protected FormatTest() /// Gets or Sets Binary /// [DataMember(Name = "binary", EmitDefaultValue = false)] - public System.IO.Stream Binary { get; set; } + public Option Binary { get; set; } /// /// Gets or Sets Date @@ -185,14 +221,14 @@ protected FormatTest() /// /// 2007-12-03T10:15:30+01:00 [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Uuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Password @@ -205,21 +241,21 @@ protected FormatTest() /// /// A string that is a 10 digit number. Can have leading zeros. [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] - public string PatternWithDigits { get; set; } + public Option PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] - public string PatternWithDigitsAndDelimiter { get; set; } + public Option PatternWithDigitsAndDelimiter { get; set; } /// /// None /// /// None [DataMember(Name = "pattern_with_backslash", EmitDefaultValue = false)] - public string PatternWithBackslash { get; set; } + public Option PatternWithBackslash { get; set; } /// /// Gets or Sets additional properties @@ -297,54 +333,78 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode(); + if (this.Integer.IsSet) + { + hashCode = (hashCode * 59) + this.Integer.Value.GetHashCode(); + } + if (this.Int32.IsSet) + { + hashCode = (hashCode * 59) + this.Int32.Value.GetHashCode(); + } + if (this.UnsignedInteger.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedInteger.Value.GetHashCode(); + } + if (this.Int64.IsSet) + { + hashCode = (hashCode * 59) + this.Int64.Value.GetHashCode(); + } + if (this.UnsignedLong.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedLong.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.Number.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) + if (this.Float.IsSet) + { + hashCode = (hashCode * 59) + this.Float.Value.GetHashCode(); + } + if (this.Double.IsSet) + { + hashCode = (hashCode * 59) + this.Double.Value.GetHashCode(); + } + if (this.Decimal.IsSet) + { + hashCode = (hashCode * 59) + this.Decimal.Value.GetHashCode(); + } + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.Byte != null) { hashCode = (hashCode * 59) + this.Byte.GetHashCode(); } - if (this.Binary != null) + if (this.Binary.IsSet && this.Binary.Value != null) { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); + hashCode = (hashCode * 59) + this.Binary.Value.GetHashCode(); } if (this.Date != null) { hashCode = (hashCode * 59) + this.Date.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.Password != null) { hashCode = (hashCode * 59) + this.Password.GetHashCode(); } - if (this.PatternWithDigits != null) + if (this.PatternWithDigits.IsSet && this.PatternWithDigits.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigits.Value.GetHashCode(); } - if (this.PatternWithDigitsAndDelimiter != null) + if (this.PatternWithDigitsAndDelimiter.IsSet && this.PatternWithDigitsAndDelimiter.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.Value.GetHashCode(); } - if (this.PatternWithBackslash != null) + if (this.PatternWithBackslash.IsSet && this.PatternWithBackslash.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithBackslash.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithBackslash.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Fruit.cs index 5e0d760c369f..637e088e9ea9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Fruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FruitReq.cs index 3772b99bdb42..5626c5152e3c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FruitReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/GmFruit.cs index c22ccd6ebb50..bf63b65e7b74 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/GmFruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 75285a73f6ca..a537191d7d12 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -50,10 +51,10 @@ protected GrandparentAnimal() /// petType (required). public GrandparentAnimal(string petType = default(string)) { - // to ensure "petType" is required (not null) + // to ensure "petType" (not nullable) is not null if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); + throw new ArgumentNullException("petType isn't a nullable property for GrandparentAnimal and cannot be null"); } this.PetType = petType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 3c6298d7d8d2..96d854d60872 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,7 +46,7 @@ public HasOnlyReadOnly() /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -59,7 +60,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Foo /// [DataMember(Name = "foo", EmitDefaultValue = false)] - public string Foo { get; private set; } + public Option Foo { get; private set; } /// /// Returns false as Foo should not be serialized given that it's read-only. @@ -128,13 +129,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Foo != null) + if (this.Foo.IsSet && this.Foo.Value != null) { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); + hashCode = (hashCode * 59) + this.Foo.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 6fe074907762..9fb95d139666 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Initializes a new instance of the class. /// /// nullableMessage. - public HealthCheckResult(string nullableMessage = default(string)) + public HealthCheckResult(Option nullableMessage = default(Option)) { this.NullableMessage = nullableMessage; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Gets or Sets NullableMessage /// [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] - public string NullableMessage { get; set; } + public Option NullableMessage { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +107,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.NullableMessage != null) + if (this.NullableMessage.IsSet && this.NullableMessage.Value != null) { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableMessage.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index acf86063d050..9b860ce985ee 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,17 +45,17 @@ protected IsoscelesTriangle() { } /// triangleType (required). public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for IsoscelesTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for IsoscelesTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/List.cs index e06a3f381f12..358846cdd689 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/List.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class List : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// var123List. - public List(string var123List = default(string)) + public List(Option var123List = default(Option)) { + // to ensure "var123List" (not nullable) is not null + if (var123List.IsSet && var123List.Value == null) + { + throw new ArgumentNullException("var123List isn't a nullable property for List and cannot be null"); + } this.Var123List = var123List; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class List : IEquatable, IValidatableObject /// Gets or Sets Var123List /// [DataMember(Name = "123-list", EmitDefaultValue = false)] - public string Var123List { get; set; } + public Option Var123List { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Var123List != null) + if (this.Var123List.IsSet && this.Var123List.Value != null) { - hashCode = (hashCode * 59) + this.Var123List.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123List.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 57cc8110fbb8..63e1726e5f79 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,12 +38,20 @@ public partial class LiteralStringClass : IEquatable, IValid /// /// escapedLiteralString (default to "C:\\Users\\username"). /// unescapedLiteralString (default to "C:\Users\username"). - public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", string unescapedLiteralString = @"C:\Users\username") + public LiteralStringClass(Option escapedLiteralString = default(Option), Option unescapedLiteralString = default(Option)) { - // use default value if no "escapedLiteralString" provided - this.EscapedLiteralString = escapedLiteralString ?? @"C:\\Users\\username"; - // use default value if no "unescapedLiteralString" provided - this.UnescapedLiteralString = unescapedLiteralString ?? @"C:\Users\username"; + // to ensure "escapedLiteralString" (not nullable) is not null + if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) + { + throw new ArgumentNullException("escapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + // to ensure "unescapedLiteralString" (not nullable) is not null + if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) + { + throw new ArgumentNullException("unescapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + this.EscapedLiteralString = escapedLiteralString.IsSet ? escapedLiteralString : new Option(@"C:\\Users\\username"); + this.UnescapedLiteralString = unescapedLiteralString.IsSet ? unescapedLiteralString : new Option(@"C:\Users\username"); this.AdditionalProperties = new Dictionary(); } @@ -50,13 +59,13 @@ public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", /// Gets or Sets EscapedLiteralString /// [DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)] - public string EscapedLiteralString { get; set; } + public Option EscapedLiteralString { get; set; } /// /// Gets or Sets UnescapedLiteralString /// [DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)] - public string UnescapedLiteralString { get; set; } + public Option UnescapedLiteralString { get; set; } /// /// Gets or Sets additional properties @@ -117,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.EscapedLiteralString != null) + if (this.EscapedLiteralString.IsSet && this.EscapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.EscapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.EscapedLiteralString.Value.GetHashCode(); } - if (this.UnescapedLiteralString != null) + if (this.UnescapedLiteralString.IsSet && this.UnescapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.UnescapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.UnescapedLiteralString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Mammal.cs index 49a7e091c235..9efc46f30641 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Mammal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MapTest.cs index 691f128ea5fb..004bf942c034 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MapTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -58,8 +59,28 @@ public enum InnerEnum /// mapOfEnumString. /// directMap. /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + public MapTest(Option>> mapMapOfString = default(Option>>), Option> mapOfEnumString = default(Option>), Option> directMap = default(Option>), Option> indirectMap = default(Option>)) { + // to ensure "mapMapOfString" (not nullable) is not null + if (mapMapOfString.IsSet && mapMapOfString.Value == null) + { + throw new ArgumentNullException("mapMapOfString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "mapOfEnumString" (not nullable) is not null + if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) + { + throw new ArgumentNullException("mapOfEnumString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "directMap" (not nullable) is not null + if (directMap.IsSet && directMap.Value == null) + { + throw new ArgumentNullException("directMap isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "indirectMap" (not nullable) is not null + if (indirectMap.IsSet && indirectMap.Value == null) + { + throw new ArgumentNullException("indirectMap isn't a nullable property for MapTest and cannot be null"); + } this.MapMapOfString = mapMapOfString; this.MapOfEnumString = mapOfEnumString; this.DirectMap = directMap; @@ -71,25 +92,25 @@ public enum InnerEnum /// Gets or Sets MapMapOfString /// [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] - public Dictionary> MapMapOfString { get; set; } + public Option>> MapMapOfString { get; set; } /// /// Gets or Sets MapOfEnumString /// [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] - public Dictionary MapOfEnumString { get; set; } + public Option> MapOfEnumString { get; set; } /// /// Gets or Sets DirectMap /// [DataMember(Name = "direct_map", EmitDefaultValue = false)] - public Dictionary DirectMap { get; set; } + public Option> DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// [DataMember(Name = "indirect_map", EmitDefaultValue = false)] - public Dictionary IndirectMap { get; set; } + public Option> IndirectMap { get; set; } /// /// Gets or Sets additional properties @@ -152,21 +173,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapMapOfString != null) + if (this.MapMapOfString.IsSet && this.MapMapOfString.Value != null) { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapMapOfString.Value.GetHashCode(); } - if (this.MapOfEnumString != null) + if (this.MapOfEnumString.IsSet && this.MapOfEnumString.Value != null) { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfEnumString.Value.GetHashCode(); } - if (this.DirectMap != null) + if (this.DirectMap.IsSet && this.DirectMap.Value != null) { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.DirectMap.Value.GetHashCode(); } - if (this.IndirectMap != null) + if (this.IndirectMap.IsSet && this.IndirectMap.Value != null) { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.IndirectMap.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 2b62d5975478..5dbb7d0ef732 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedAnyOf(MixedAnyOfContent content = default(MixedAnyOfContent)) + public MixedAnyOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedAnyOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedAnyOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs index 49e94cc5e5db..7c4a5791f8e2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOf.cs index bd0255888b86..f18b4793a139 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedOneOf(MixedOneOfContent content = default(MixedOneOfContent)) + public MixedOneOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedOneOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedOneOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOfContent.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOfContent.cs index e2527cc3c315..77af863c507e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 5f51e31aa034..fc342925735f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,28 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatableuuid. /// dateTime. /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuidWithPattern = default(Guid), Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) + public MixedPropertiesAndAdditionalPropertiesClass(Option uuidWithPattern = default(Option), Option uuid = default(Option), Option dateTime = default(Option), Option> map = default(Option>)) { + // to ensure "uuidWithPattern" (not nullable) is not null + if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) + { + throw new ArgumentNullException("uuidWithPattern isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "map" (not nullable) is not null + if (map.IsSet && map.Value == null) + { + throw new ArgumentNullException("map isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } this.UuidWithPattern = uuidWithPattern; this.Uuid = uuid; this.DateTime = dateTime; @@ -52,25 +73,25 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable [DataMember(Name = "uuid_with_pattern", EmitDefaultValue = false)] - public Guid UuidWithPattern { get; set; } + public Option UuidWithPattern { get; set; } /// /// Gets or Sets Uuid /// [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets DateTime /// [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Map /// [DataMember(Name = "map", EmitDefaultValue = false)] - public Dictionary Map { get; set; } + public Option> Map { get; set; } /// /// Gets or Sets additional properties @@ -133,21 +154,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.UuidWithPattern != null) + if (this.UuidWithPattern.IsSet && this.UuidWithPattern.Value != null) { - hashCode = (hashCode * 59) + this.UuidWithPattern.GetHashCode(); + hashCode = (hashCode * 59) + this.UuidWithPattern.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Map != null) + if (this.Map.IsSet && this.Map.Value != null) { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); + hashCode = (hashCode * 59) + this.Map.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedSubId.cs index 1906ce0b2709..9d5c0bc35f6f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// id. - public MixedSubId(string id = default(string)) + public MixedSubId(Option id = default(Option)) { + // to ensure "id" (not nullable) is not null + if (id.IsSet && id.Value == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixedSubId and cannot be null"); + } this.Id = id; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Id != null) + if (this.Id.IsSet && this.Id.Value != null) { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Model200Response.cs index a023e3c3e754..d22b1c824ceb 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Model200Response.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Model200Response : IEquatable, IValidatab /// /// name. /// varClass. - public Model200Response(int name = default(int), string varClass = default(string)) + public Model200Response(Option name = default(Option), Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for Model200Response and cannot be null"); + } this.Name = name; this.Class = varClass; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class Model200Response : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public int Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets Class /// [DataMember(Name = "class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) + if (this.Name.IsSet) + { + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); + } + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ModelClient.cs index 690894994947..4c8ff7320d98 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ModelClient.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClient. - public ModelClient(string varClient = default(string)) + public ModelClient(Option varClient = default(Option)) { + // to ensure "varClient" (not nullable) is not null + if (varClient.IsSet && varClient.Value == null) + { + throw new ArgumentNullException("varClient isn't a nullable property for ModelClient and cannot be null"); + } this.VarClient = varClient; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public string VarClient { get; set; } + public Option VarClient { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.VarClient != null) + if (this.VarClient.IsSet && this.VarClient.Value != null) { - hashCode = (hashCode * 59) + this.VarClient.GetHashCode(); + hashCode = (hashCode * 59) + this.VarClient.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Name.cs index f34052aa706c..10b22f09b12a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Name.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,8 +46,13 @@ protected Name() /// /// varName (required). /// property. - public Name(int varName = default(int), string property = default(string)) + public Name(int varName = default(int), Option property = default(Option)) { + // to ensure "property" (not nullable) is not null + if (property.IsSet && property.Value == null) + { + throw new ArgumentNullException("property isn't a nullable property for Name and cannot be null"); + } this.VarName = varName; this.Property = property; this.AdditionalProperties = new Dictionary(); @@ -62,7 +68,7 @@ protected Name() /// Gets or Sets SnakeCase /// [DataMember(Name = "snake_case", EmitDefaultValue = false)] - public int SnakeCase { get; private set; } + public Option SnakeCase { get; private set; } /// /// Returns false as SnakeCase should not be serialized given that it's read-only. @@ -76,13 +82,13 @@ public bool ShouldSerializeSnakeCase() /// Gets or Sets Property /// [DataMember(Name = "property", EmitDefaultValue = false)] - public string Property { get; set; } + public Option Property { get; set; } /// /// Gets or Sets Var123Number /// [DataMember(Name = "123Number", EmitDefaultValue = false)] - public int Var123Number { get; private set; } + public Option Var123Number { get; private set; } /// /// Returns false as Var123Number should not be serialized given that it's read-only. @@ -154,12 +160,18 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.VarName.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) + if (this.SnakeCase.IsSet) + { + hashCode = (hashCode * 59) + this.SnakeCase.Value.GetHashCode(); + } + if (this.Property.IsSet && this.Property.Value != null) + { + hashCode = (hashCode * 59) + this.Property.Value.GetHashCode(); + } + if (this.Var123Number.IsSet) { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123Number.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Var123Number.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 3fbd6e83ef29..b4b03a3be7c9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,12 +48,12 @@ protected NotificationtestGetElementsV1ResponseMPayload() /// aObjVariableobject (required). public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List> aObjVariableobject = default(List>)) { - this.PkiNotificationtestID = pkiNotificationtestID; - // to ensure "aObjVariableobject" is required (not null) + // to ensure "aObjVariableobject" (not nullable) is not null if (aObjVariableobject == null) { - throw new ArgumentNullException("aObjVariableobject is a required property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); + throw new ArgumentNullException("aObjVariableobject isn't a nullable property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); } + this.PkiNotificationtestID = pkiNotificationtestID; this.AObjVariableobject = aObjVariableobject; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs index 1ae27f1846d9..7d1a62b2dc89 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,18 @@ public partial class NullableClass : IEquatable, IValidatableObje /// objectNullableProp. /// objectAndItemsNullableProp. /// objectItemsNullable. - public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateOnly dateProp = default(DateOnly), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) + public NullableClass(Option integerProp = default(Option), Option numberProp = default(Option), Option booleanProp = default(Option), Option stringProp = default(Option), Option dateProp = default(Option), Option datetimeProp = default(Option), Option?> arrayNullableProp = default(Option?>), Option?> arrayAndItemsNullableProp = default(Option?>), Option> arrayItemsNullable = default(Option>), Option?> objectNullableProp = default(Option?>), Option?> objectAndItemsNullableProp = default(Option?>), Option> objectItemsNullable = default(Option>)) { + // to ensure "arrayItemsNullable" (not nullable) is not null + if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) + { + throw new ArgumentNullException("arrayItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } + // to ensure "objectItemsNullable" (not nullable) is not null + if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) + { + throw new ArgumentNullException("objectItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } this.IntegerProp = integerProp; this.NumberProp = numberProp; this.BooleanProp = booleanProp; @@ -68,73 +79,73 @@ public partial class NullableClass : IEquatable, IValidatableObje /// Gets or Sets IntegerProp /// [DataMember(Name = "integer_prop", EmitDefaultValue = true)] - public int? IntegerProp { get; set; } + public Option IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// [DataMember(Name = "number_prop", EmitDefaultValue = true)] - public decimal? NumberProp { get; set; } + public Option NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] - public bool? BooleanProp { get; set; } + public Option BooleanProp { get; set; } /// /// Gets or Sets StringProp /// [DataMember(Name = "string_prop", EmitDefaultValue = true)] - public string StringProp { get; set; } + public Option StringProp { get; set; } /// /// Gets or Sets DateProp /// [DataMember(Name = "date_prop", EmitDefaultValue = true)] - public DateOnly DateProp { get; set; } + public Option DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] - public DateTime? DatetimeProp { get; set; } + public Option DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] - public List ArrayNullableProp { get; set; } + public Option?> ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] - public List ArrayAndItemsNullableProp { get; set; } + public Option?> ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] - public List ArrayItemsNullable { get; set; } + public Option> ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectNullableProp { get; set; } + public Option?> ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectAndItemsNullableProp { get; set; } + public Option?> ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] - public Dictionary ObjectItemsNullable { get; set; } + public Option> ObjectItemsNullable { get; set; } /// /// Gets or Sets additional properties @@ -205,53 +216,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.IntegerProp != null) + if (this.IntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.IntegerProp.Value.GetHashCode(); } - if (this.NumberProp != null) + if (this.NumberProp.IsSet) { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberProp.Value.GetHashCode(); } - if (this.BooleanProp != null) + if (this.BooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.BooleanProp.Value.GetHashCode(); } - if (this.StringProp != null) + if (this.StringProp.IsSet && this.StringProp.Value != null) { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.StringProp.Value.GetHashCode(); } - if (this.DateProp != null) + if (this.DateProp.IsSet && this.DateProp.Value != null) { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DateProp.Value.GetHashCode(); } - if (this.DatetimeProp != null) + if (this.DatetimeProp.IsSet && this.DatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DatetimeProp.Value.GetHashCode(); } - if (this.ArrayNullableProp != null) + if (this.ArrayNullableProp.IsSet && this.ArrayNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNullableProp.Value.GetHashCode(); } - if (this.ArrayAndItemsNullableProp != null) + if (this.ArrayAndItemsNullableProp.IsSet && this.ArrayAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.Value.GetHashCode(); } - if (this.ArrayItemsNullable != null) + if (this.ArrayItemsNullable.IsSet && this.ArrayItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayItemsNullable.Value.GetHashCode(); } - if (this.ObjectNullableProp != null) + if (this.ObjectNullableProp.IsSet && this.ObjectNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectNullableProp.Value.GetHashCode(); } - if (this.ObjectAndItemsNullableProp != null) + if (this.ObjectAndItemsNullableProp.IsSet && this.ObjectAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.Value.GetHashCode(); } - if (this.ObjectItemsNullable != null) + if (this.ObjectItemsNullable.IsSet && this.ObjectItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectItemsNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 8a3011986ecd..059dd8c09a0b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// Initializes a new instance of the class. /// /// uuid. - public NullableGuidClass(Guid? uuid = default(Guid?)) + public NullableGuidClass(Option uuid = default(Option)) { this.Uuid = uuid; this.AdditionalProperties = new Dictionary(); @@ -47,7 +48,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = true)] - public Guid? Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +108,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableShape.cs index 3c760b3abddf..255842acfbac 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableShape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NumberOnly.cs index 7218451d9fb0..eabf9cccc135 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,7 +40,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) + public NumberOnly(Option justNumber = default(Option)) { this.JustNumber = justNumber; this.AdditionalProperties = new Dictionary(); @@ -49,7 +50,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Gets or Sets JustNumber /// [DataMember(Name = "JustNumber", EmitDefaultValue = false)] - public decimal JustNumber { get; set; } + public Option JustNumber { get; set; } /// /// Gets or Sets additional properties @@ -109,7 +110,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); + if (this.JustNumber.IsSet) + { + hashCode = (hashCode * 59) + this.JustNumber.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 76faa5154c86..fe77912ea4be 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,23 @@ public partial class ObjectWithDeprecatedFields : IEquatableid. /// deprecatedRef. /// bars. - public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List bars = default(List)) + public ObjectWithDeprecatedFields(Option uuid = default(Option), Option id = default(Option), Option deprecatedRef = default(Option), Option> bars = default(Option>)) { + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "deprecatedRef" (not nullable) is not null + if (deprecatedRef.IsSet && deprecatedRef.Value == null) + { + throw new ArgumentNullException("deprecatedRef isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "bars" (not nullable) is not null + if (bars.IsSet && bars.Value == null) + { + throw new ArgumentNullException("bars isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } this.Uuid = uuid; this.Id = id; this.DeprecatedRef = deprecatedRef; @@ -52,28 +68,28 @@ public partial class ObjectWithDeprecatedFields : IEquatable [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] [Obsolete] - public decimal Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets DeprecatedRef /// [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } + public Option DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// [DataMember(Name = "bars", EmitDefaultValue = false)] [Obsolete] - public List Bars { get; set; } + public Option> Bars { get; set; } /// /// Gets or Sets additional properties @@ -136,18 +152,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) + { + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); + } + if (this.Id.IsSet) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) + if (this.DeprecatedRef.IsSet && this.DeprecatedRef.Value != null) { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); + hashCode = (hashCode * 59) + this.DeprecatedRef.Value.GetHashCode(); } - if (this.Bars != null) + if (this.Bars.IsSet && this.Bars.Value != null) { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); + hashCode = (hashCode * 59) + this.Bars.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OneOfString.cs index b7278bd5600e..fc7a1298bc33 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OneOfString.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Order.cs index 22c7153ace7b..c7665143aa17 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Order.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// Order Status [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -74,14 +75,19 @@ public enum StatusEnum /// shipDate. /// Order Status. /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) + public Order(Option id = default(Option), Option petId = default(Option), Option quantity = default(Option), Option shipDate = default(Option), Option status = default(Option), Option complete = default(Option)) { + // to ensure "shipDate" (not nullable) is not null + if (shipDate.IsSet && shipDate.Value == null) + { + throw new ArgumentNullException("shipDate isn't a nullable property for Order and cannot be null"); + } this.Id = id; this.PetId = petId; this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - this.Complete = complete; + this.Complete = complete.IsSet ? complete : new Option(false); this.AdditionalProperties = new Dictionary(); } @@ -89,32 +95,32 @@ public enum StatusEnum /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets PetId /// [DataMember(Name = "petId", EmitDefaultValue = false)] - public long PetId { get; set; } + public Option PetId { get; set; } /// /// Gets or Sets Quantity /// [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int Quantity { get; set; } + public Option Quantity { get; set; } /// /// Gets or Sets ShipDate /// /// 2020-02-02T20:20:20.000222Z [DataMember(Name = "shipDate", EmitDefaultValue = false)] - public DateTime ShipDate { get; set; } + public Option ShipDate { get; set; } /// /// Gets or Sets Complete /// [DataMember(Name = "complete", EmitDefaultValue = true)] - public bool Complete { get; set; } + public Option Complete { get; set; } /// /// Gets or Sets additional properties @@ -179,15 +185,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.PetId.IsSet) + { + hashCode = (hashCode * 59) + this.PetId.Value.GetHashCode(); + } + if (this.Quantity.IsSet) + { + hashCode = (hashCode * 59) + this.Quantity.Value.GetHashCode(); + } + if (this.ShipDate.IsSet && this.ShipDate.Value != null) + { + hashCode = (hashCode * 59) + this.ShipDate.Value.GetHashCode(); + } + if (this.Status.IsSet) + { + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); + } + if (this.Complete.IsSet) { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); + hashCode = (hashCode * 59) + this.Complete.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterComposite.cs index 47d598a27e6f..f55b2f8c2454 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,13 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// myNumber. /// myString. /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) + public OuterComposite(Option myNumber = default(Option), Option myString = default(Option), Option myBoolean = default(Option)) { + // to ensure "myString" (not nullable) is not null + if (myString.IsSet && myString.Value == null) + { + throw new ArgumentNullException("myString isn't a nullable property for OuterComposite and cannot be null"); + } this.MyNumber = myNumber; this.MyString = myString; this.MyBoolean = myBoolean; @@ -50,19 +56,19 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// Gets or Sets MyNumber /// [DataMember(Name = "my_number", EmitDefaultValue = false)] - public decimal MyNumber { get; set; } + public Option MyNumber { get; set; } /// /// Gets or Sets MyString /// [DataMember(Name = "my_string", EmitDefaultValue = false)] - public string MyString { get; set; } + public Option MyString { get; set; } /// /// Gets or Sets MyBoolean /// [DataMember(Name = "my_boolean", EmitDefaultValue = true)] - public bool MyBoolean { get; set; } + public Option MyBoolean { get; set; } /// /// Gets or Sets additional properties @@ -124,12 +130,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) + if (this.MyNumber.IsSet) + { + hashCode = (hashCode * 59) + this.MyNumber.Value.GetHashCode(); + } + if (this.MyString.IsSet && this.MyString.Value != null) + { + hashCode = (hashCode * 59) + this.MyString.Value.GetHashCode(); + } + if (this.MyBoolean.IsSet) { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); + hashCode = (hashCode * 59) + this.MyBoolean.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnum.cs index 7cacd79e3e6a..9ee5f7b00771 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index d6790731adb7..b0622874e83a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 3a70c3716fe2..83a1123c3651 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index 42b36058c031..69a3229977ac 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumTest.cs index 392e199e137f..5fd8f69243a4 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterEnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ParentPet.cs index 7a7421349903..92b018fe797c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ParentPet.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pet.cs index e4722f4a5379..bbd65be3d7fd 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pet.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -82,22 +83,32 @@ protected Pet() /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), Option category = default(Option), string name = default(string), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this.Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this.PhotoUrls = photoUrls; this.Id = id; this.Category = category; + this.Name = name; + this.PhotoUrls = photoUrls; this.Tags = tags; this.Status = status; this.AdditionalProperties = new Dictionary(); @@ -107,13 +118,13 @@ protected Pet() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category { get; set; } + public Option Category { get; set; } /// /// Gets or Sets Name @@ -132,7 +143,7 @@ protected Pet() /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags { get; set; } + public Option> Tags { get; set; } /// /// Gets or Sets additional properties @@ -197,10 +208,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.Name != null) { @@ -210,11 +224,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pig.cs index 53b52bce70f1..efb16d85c318 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pig.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 5e4472118140..fddb8c8500ad 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Quadrilateral.cs index 1e12804ecd2a..4b1b8777ee3f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 3a364f98c1e2..3bc8ef02e009 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected QuadrilateralInterface() /// quadrilateralType (required). public QuadrilateralInterface(string quadrilateralType = default(string)) { - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 46ed3b3948c0..d6715914adc5 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// baz. - public ReadOnlyFirst(string baz = default(string)) + public ReadOnlyFirst(Option baz = default(Option)) { + // to ensure "baz" (not nullable) is not null + if (baz.IsSet && baz.Value == null) + { + throw new ArgumentNullException("baz isn't a nullable property for ReadOnlyFirst and cannot be null"); + } this.Baz = baz; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -60,7 +66,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Baz /// [DataMember(Name = "baz", EmitDefaultValue = false)] - public string Baz { get; set; } + public Option Baz { get; set; } /// /// Gets or Sets additional properties @@ -121,13 +127,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Baz != null) + if (this.Baz.IsSet && this.Baz.Value != null) { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); + hashCode = (hashCode * 59) + this.Baz.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs index d8230f423177..aa89e5a7386e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -53,7 +54,7 @@ public enum RequiredNullableEnumIntegerEnum /// Gets or Sets RequiredNullableEnumInteger /// [DataMember(Name = "required_nullable_enum_integer", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerEnum RequiredNullableEnumInteger { get; set; } + public RequiredNullableEnumIntegerEnum? RequiredNullableEnumInteger { get; set; } /// /// Defines RequiredNotnullableEnumInteger /// @@ -97,7 +98,7 @@ public enum NotrequiredNullableEnumIntegerEnum /// Gets or Sets NotrequiredNullableEnumInteger /// [DataMember(Name = "notrequired_nullable_enum_integer", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerEnum? NotrequiredNullableEnumInteger { get; set; } + public Option NotrequiredNullableEnumInteger { get; set; } /// /// Defines NotrequiredNotnullableEnumInteger /// @@ -119,11 +120,10 @@ public enum NotrequiredNotnullableEnumIntegerEnum /// Gets or Sets NotrequiredNotnullableEnumInteger /// [DataMember(Name = "notrequired_notnullable_enum_integer", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerEnum? NotrequiredNotnullableEnumInteger { get; set; } + public Option NotrequiredNotnullableEnumInteger { get; set; } /// /// Defines RequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum RequiredNullableEnumIntegerOnlyEnum { /// @@ -142,7 +142,7 @@ public enum RequiredNullableEnumIntegerOnlyEnum /// Gets or Sets RequiredNullableEnumIntegerOnly /// [DataMember(Name = "required_nullable_enum_integer_only", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnly { get; set; } + public RequiredNullableEnumIntegerOnlyEnum? RequiredNullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumIntegerOnly /// @@ -168,7 +168,6 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum /// /// Defines NotrequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum NotrequiredNullableEnumIntegerOnlyEnum { /// @@ -187,7 +186,7 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNullableEnumIntegerOnly /// [DataMember(Name = "notrequired_nullable_enum_integer_only", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerOnlyEnum? NotrequiredNullableEnumIntegerOnly { get; set; } + public Option NotrequiredNullableEnumIntegerOnly { get; set; } /// /// Defines NotrequiredNotnullableEnumIntegerOnly /// @@ -209,7 +208,7 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNotnullableEnumIntegerOnly /// [DataMember(Name = "notrequired_notnullable_enum_integer_only", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerOnlyEnum? NotrequiredNotnullableEnumIntegerOnly { get; set; } + public Option NotrequiredNotnullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumString /// @@ -331,7 +330,7 @@ public enum RequiredNullableEnumStringEnum /// Gets or Sets RequiredNullableEnumString /// [DataMember(Name = "required_nullable_enum_string", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumStringEnum RequiredNullableEnumString { get; set; } + public RequiredNullableEnumStringEnum? RequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNullableEnumString /// @@ -392,7 +391,7 @@ public enum NotrequiredNullableEnumStringEnum /// Gets or Sets NotrequiredNullableEnumString /// [DataMember(Name = "notrequired_nullable_enum_string", EmitDefaultValue = true)] - public NotrequiredNullableEnumStringEnum? NotrequiredNullableEnumString { get; set; } + public Option NotrequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNotnullableEnumString /// @@ -453,13 +452,13 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNotnullableEnumString /// [DataMember(Name = "notrequired_notnullable_enum_string", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumStringEnum? NotrequiredNotnullableEnumString { get; set; } + public Option NotrequiredNotnullableEnumString { get; set; } /// /// Gets or Sets RequiredNullableOuterEnumDefaultValue /// [DataMember(Name = "required_nullable_outerEnumDefaultValue", IsRequired = true, EmitDefaultValue = true)] - public OuterEnumDefaultValue RequiredNullableOuterEnumDefaultValue { get; set; } + public OuterEnumDefaultValue? RequiredNullableOuterEnumDefaultValue { get; set; } /// /// Gets or Sets RequiredNotnullableOuterEnumDefaultValue @@ -471,13 +470,13 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_nullable_outerEnumDefaultValue", EmitDefaultValue = true)] - public OuterEnumDefaultValue? NotrequiredNullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNullableOuterEnumDefaultValue { get; set; } /// /// Gets or Sets NotrequiredNotnullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_notnullable_outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? NotrequiredNotnullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNotnullableOuterEnumDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -533,100 +532,100 @@ protected RequiredClass() /// requiredNotnullableArrayOfString (required). /// notrequiredNullableArrayOfString. /// notrequiredNotnullableArrayOfString. - public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), int? notRequiredNullableIntegerProp = default(int?), int notRequiredNotnullableintegerProp = default(int), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), string notrequiredNullableStringProp = default(string), string notrequiredNotnullableStringProp = default(string), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), bool? notrequiredNullableBooleanProp = default(bool?), bool notrequiredNotnullableBooleanProp = default(bool), DateOnly requiredNullableDateProp = default(DateOnly), DateOnly requiredNotNullableDateProp = default(DateOnly), DateOnly notRequiredNullableDateProp = default(DateOnly), DateOnly notRequiredNotnullableDateProp = default(DateOnly), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), DateTime? notrequiredNullableDatetimeProp = default(DateTime?), DateTime notrequiredNotnullableDatetimeProp = default(DateTime), RequiredNullableEnumIntegerEnum requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), NotrequiredNullableEnumIntegerEnum? notrequiredNullableEnumInteger = default(NotrequiredNullableEnumIntegerEnum?), NotrequiredNotnullableEnumIntegerEnum? notrequiredNotnullableEnumInteger = default(NotrequiredNotnullableEnumIntegerEnum?), RequiredNullableEnumIntegerOnlyEnum requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), NotrequiredNullableEnumIntegerOnlyEnum? notrequiredNullableEnumIntegerOnly = default(NotrequiredNullableEnumIntegerOnlyEnum?), NotrequiredNotnullableEnumIntegerOnlyEnum? notrequiredNotnullableEnumIntegerOnly = default(NotrequiredNotnullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum requiredNullableEnumString = default(RequiredNullableEnumStringEnum), NotrequiredNullableEnumStringEnum? notrequiredNullableEnumString = default(NotrequiredNullableEnumStringEnum?), NotrequiredNotnullableEnumStringEnum? notrequiredNotnullableEnumString = default(NotrequiredNotnullableEnumStringEnum?), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue? notrequiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue? notrequiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Guid? notrequiredNullableUuid = default(Guid?), Guid notrequiredNotnullableUuid = default(Guid), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), List notrequiredNullableArrayOfString = default(List), List notrequiredNotnullableArrayOfString = default(List)) + public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), Option notRequiredNullableIntegerProp = default(Option), Option notRequiredNotnullableintegerProp = default(Option), string? requiredNullableStringProp = default(string?), string requiredNotnullableStringProp = default(string), Option notrequiredNullableStringProp = default(Option), Option notrequiredNotnullableStringProp = default(Option), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), Option notrequiredNullableBooleanProp = default(Option), Option notrequiredNotnullableBooleanProp = default(Option), DateOnly? requiredNullableDateProp = default(DateOnly?), DateOnly requiredNotNullableDateProp = default(DateOnly), Option notRequiredNullableDateProp = default(Option), Option notRequiredNotnullableDateProp = default(Option), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), Option notrequiredNullableDatetimeProp = default(Option), Option notrequiredNotnullableDatetimeProp = default(Option), RequiredNullableEnumIntegerEnum? requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum?), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), Option notrequiredNullableEnumInteger = default(Option), Option notrequiredNotnullableEnumInteger = default(Option), RequiredNullableEnumIntegerOnlyEnum? requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), Option notrequiredNullableEnumIntegerOnly = default(Option), Option notrequiredNotnullableEnumIntegerOnly = default(Option), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum? requiredNullableEnumString = default(RequiredNullableEnumStringEnum?), Option notrequiredNullableEnumString = default(Option), Option notrequiredNotnullableEnumString = default(Option), OuterEnumDefaultValue? requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), Option notrequiredNullableOuterEnumDefaultValue = default(Option), Option notrequiredNotnullableOuterEnumDefaultValue = default(Option), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Option notrequiredNullableUuid = default(Option), Option notrequiredNotnullableUuid = default(Option), List? requiredNullableArrayOfString = default(List?), List requiredNotnullableArrayOfString = default(List), Option?> notrequiredNullableArrayOfString = default(Option?>), Option> notrequiredNotnullableArrayOfString = default(Option>)) { - // to ensure "requiredNullableIntegerProp" is required (not null) - if (requiredNullableIntegerProp == null) + // to ensure "requiredNotnullableStringProp" (not nullable) is not null + if (requiredNotnullableStringProp == null) { - throw new ArgumentNullException("requiredNullableIntegerProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableIntegerProp = requiredNullableIntegerProp; - this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; - // to ensure "requiredNullableStringProp" is required (not null) - if (requiredNullableStringProp == null) + // to ensure "notrequiredNotnullableStringProp" (not nullable) is not null + if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) { - throw new ArgumentNullException("requiredNullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableStringProp = requiredNullableStringProp; - // to ensure "requiredNotnullableStringProp" is required (not null) - if (requiredNotnullableStringProp == null) + // to ensure "requiredNotNullableDateProp" (not nullable) is not null + if (requiredNotNullableDateProp == null) { - throw new ArgumentNullException("requiredNotnullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotNullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableStringProp = requiredNotnullableStringProp; - // to ensure "requiredNullableBooleanProp" is required (not null) - if (requiredNullableBooleanProp == null) + // to ensure "notRequiredNotnullableDateProp" (not nullable) is not null + if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) { - throw new ArgumentNullException("requiredNullableBooleanProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notRequiredNotnullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableBooleanProp = requiredNullableBooleanProp; - this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; - // to ensure "requiredNullableDateProp" is required (not null) - if (requiredNullableDateProp == null) + // to ensure "requiredNotnullableDatetimeProp" (not nullable) is not null + if (requiredNotnullableDatetimeProp == null) { - throw new ArgumentNullException("requiredNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDateProp = requiredNullableDateProp; - // to ensure "requiredNotNullableDateProp" is required (not null) - if (requiredNotNullableDateProp == null) + // to ensure "notrequiredNotnullableDatetimeProp" (not nullable) is not null + if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) { - throw new ArgumentNullException("requiredNotNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotNullableDateProp = requiredNotNullableDateProp; - this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; - // to ensure "requiredNullableDatetimeProp" is required (not null) - if (requiredNullableDatetimeProp == null) + // to ensure "requiredNotnullableUuid" (not nullable) is not null + if (requiredNotnullableUuid == null) { - throw new ArgumentNullException("requiredNullableDatetimeProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; - this.RequiredNullableEnumInteger = requiredNullableEnumInteger; - this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; - this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; - this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; - this.RequiredNotnullableEnumString = requiredNotnullableEnumString; - this.RequiredNullableEnumString = requiredNullableEnumString; - this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; - this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; - // to ensure "requiredNullableUuid" is required (not null) - if (requiredNullableUuid == null) + // to ensure "notrequiredNotnullableUuid" (not nullable) is not null + if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) { - throw new ArgumentNullException("requiredNullableUuid is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableUuid = requiredNullableUuid; - this.RequiredNotnullableUuid = requiredNotnullableUuid; - // to ensure "requiredNullableArrayOfString" is required (not null) - if (requiredNullableArrayOfString == null) + // to ensure "requiredNotnullableArrayOfString" (not nullable) is not null + if (requiredNotnullableArrayOfString == null) { - throw new ArgumentNullException("requiredNullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableArrayOfString = requiredNullableArrayOfString; - // to ensure "requiredNotnullableArrayOfString" is required (not null) - if (requiredNotnullableArrayOfString == null) + // to ensure "notrequiredNotnullableArrayOfString" (not nullable) is not null + if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) { - throw new ArgumentNullException("requiredNotnullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; + this.RequiredNullableIntegerProp = requiredNullableIntegerProp; + this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; this.NotRequiredNullableIntegerProp = notRequiredNullableIntegerProp; this.NotRequiredNotnullableintegerProp = notRequiredNotnullableintegerProp; + this.RequiredNullableStringProp = requiredNullableStringProp; + this.RequiredNotnullableStringProp = requiredNotnullableStringProp; this.NotrequiredNullableStringProp = notrequiredNullableStringProp; this.NotrequiredNotnullableStringProp = notrequiredNotnullableStringProp; + this.RequiredNullableBooleanProp = requiredNullableBooleanProp; + this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; this.NotrequiredNullableBooleanProp = notrequiredNullableBooleanProp; this.NotrequiredNotnullableBooleanProp = notrequiredNotnullableBooleanProp; + this.RequiredNullableDateProp = requiredNullableDateProp; + this.RequiredNotNullableDateProp = requiredNotNullableDateProp; this.NotRequiredNullableDateProp = notRequiredNullableDateProp; this.NotRequiredNotnullableDateProp = notRequiredNotnullableDateProp; + this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; + this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; this.NotrequiredNullableDatetimeProp = notrequiredNullableDatetimeProp; this.NotrequiredNotnullableDatetimeProp = notrequiredNotnullableDatetimeProp; + this.RequiredNullableEnumInteger = requiredNullableEnumInteger; + this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; this.NotrequiredNullableEnumInteger = notrequiredNullableEnumInteger; this.NotrequiredNotnullableEnumInteger = notrequiredNotnullableEnumInteger; + this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; + this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; this.NotrequiredNullableEnumIntegerOnly = notrequiredNullableEnumIntegerOnly; this.NotrequiredNotnullableEnumIntegerOnly = notrequiredNotnullableEnumIntegerOnly; + this.RequiredNotnullableEnumString = requiredNotnullableEnumString; + this.RequiredNullableEnumString = requiredNullableEnumString; this.NotrequiredNullableEnumString = notrequiredNullableEnumString; this.NotrequiredNotnullableEnumString = notrequiredNotnullableEnumString; + this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; + this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; this.NotrequiredNullableOuterEnumDefaultValue = notrequiredNullableOuterEnumDefaultValue; this.NotrequiredNotnullableOuterEnumDefaultValue = notrequiredNotnullableOuterEnumDefaultValue; + this.RequiredNullableUuid = requiredNullableUuid; + this.RequiredNotnullableUuid = requiredNotnullableUuid; this.NotrequiredNullableUuid = notrequiredNullableUuid; this.NotrequiredNotnullableUuid = notrequiredNotnullableUuid; + this.RequiredNullableArrayOfString = requiredNullableArrayOfString; + this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; this.NotrequiredNullableArrayOfString = notrequiredNullableArrayOfString; this.NotrequiredNotnullableArrayOfString = notrequiredNotnullableArrayOfString; this.AdditionalProperties = new Dictionary(); @@ -648,19 +647,19 @@ protected RequiredClass() /// Gets or Sets NotRequiredNullableIntegerProp /// [DataMember(Name = "not_required_nullable_integer_prop", EmitDefaultValue = true)] - public int? NotRequiredNullableIntegerProp { get; set; } + public Option NotRequiredNullableIntegerProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableintegerProp /// [DataMember(Name = "not_required_notnullableinteger_prop", EmitDefaultValue = false)] - public int NotRequiredNotnullableintegerProp { get; set; } + public Option NotRequiredNotnullableintegerProp { get; set; } /// /// Gets or Sets RequiredNullableStringProp /// [DataMember(Name = "required_nullable_string_prop", IsRequired = true, EmitDefaultValue = true)] - public string RequiredNullableStringProp { get; set; } + public string? RequiredNullableStringProp { get; set; } /// /// Gets or Sets RequiredNotnullableStringProp @@ -672,13 +671,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableStringProp /// [DataMember(Name = "notrequired_nullable_string_prop", EmitDefaultValue = true)] - public string NotrequiredNullableStringProp { get; set; } + public Option NotrequiredNullableStringProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableStringProp /// [DataMember(Name = "notrequired_notnullable_string_prop", EmitDefaultValue = false)] - public string NotrequiredNotnullableStringProp { get; set; } + public Option NotrequiredNotnullableStringProp { get; set; } /// /// Gets or Sets RequiredNullableBooleanProp @@ -696,19 +695,19 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableBooleanProp /// [DataMember(Name = "notrequired_nullable_boolean_prop", EmitDefaultValue = true)] - public bool? NotrequiredNullableBooleanProp { get; set; } + public Option NotrequiredNullableBooleanProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableBooleanProp /// [DataMember(Name = "notrequired_notnullable_boolean_prop", EmitDefaultValue = true)] - public bool NotrequiredNotnullableBooleanProp { get; set; } + public Option NotrequiredNotnullableBooleanProp { get; set; } /// /// Gets or Sets RequiredNullableDateProp /// [DataMember(Name = "required_nullable_date_prop", IsRequired = true, EmitDefaultValue = true)] - public DateOnly RequiredNullableDateProp { get; set; } + public DateOnly? RequiredNullableDateProp { get; set; } /// /// Gets or Sets RequiredNotNullableDateProp @@ -720,13 +719,13 @@ protected RequiredClass() /// Gets or Sets NotRequiredNullableDateProp /// [DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)] - public DateOnly NotRequiredNullableDateProp { get; set; } + public Option NotRequiredNullableDateProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableDateProp /// [DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)] - public DateOnly NotRequiredNotnullableDateProp { get; set; } + public Option NotRequiredNotnullableDateProp { get; set; } /// /// Gets or Sets RequiredNotnullableDatetimeProp @@ -744,13 +743,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableDatetimeProp /// [DataMember(Name = "notrequired_nullable_datetime_prop", EmitDefaultValue = true)] - public DateTime? NotrequiredNullableDatetimeProp { get; set; } + public Option NotrequiredNullableDatetimeProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableDatetimeProp /// [DataMember(Name = "notrequired_notnullable_datetime_prop", EmitDefaultValue = false)] - public DateTime NotrequiredNotnullableDatetimeProp { get; set; } + public Option NotrequiredNotnullableDatetimeProp { get; set; } /// /// Gets or Sets RequiredNullableUuid @@ -771,20 +770,20 @@ protected RequiredClass() /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_nullable_uuid", EmitDefaultValue = true)] - public Guid? NotrequiredNullableUuid { get; set; } + public Option NotrequiredNullableUuid { get; set; } /// /// Gets or Sets NotrequiredNotnullableUuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_notnullable_uuid", EmitDefaultValue = false)] - public Guid NotrequiredNotnullableUuid { get; set; } + public Option NotrequiredNotnullableUuid { get; set; } /// /// Gets or Sets RequiredNullableArrayOfString /// [DataMember(Name = "required_nullable_array_of_string", IsRequired = true, EmitDefaultValue = true)] - public List RequiredNullableArrayOfString { get; set; } + public List? RequiredNullableArrayOfString { get; set; } /// /// Gets or Sets RequiredNotnullableArrayOfString @@ -796,13 +795,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableArrayOfString /// [DataMember(Name = "notrequired_nullable_array_of_string", EmitDefaultValue = true)] - public List NotrequiredNullableArrayOfString { get; set; } + public Option?> NotrequiredNullableArrayOfString { get; set; } /// /// Gets or Sets NotrequiredNotnullableArrayOfString /// [DataMember(Name = "notrequired_notnullable_array_of_string", EmitDefaultValue = false)] - public List NotrequiredNotnullableArrayOfString { get; set; } + public Option> NotrequiredNotnullableArrayOfString { get; set; } /// /// Gets or Sets additional properties @@ -905,16 +904,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RequiredNullableIntegerProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); + if (this.NotRequiredNullableIntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); - if (this.NotRequiredNullableIntegerProp != null) + if (this.NotRequiredNotnullableintegerProp.IsSet) { - hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.GetHashCode(); if (this.RequiredNullableStringProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableStringProp.GetHashCode(); @@ -923,24 +922,24 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableStringProp.GetHashCode(); } - if (this.NotrequiredNullableStringProp != null) + if (this.NotrequiredNullableStringProp.IsSet && this.NotrequiredNullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableStringProp != null) + if (this.NotrequiredNotnullableStringProp.IsSet && this.NotrequiredNotnullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.Value.GetHashCode(); } - if (this.RequiredNullableBooleanProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); + if (this.NotrequiredNullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); - if (this.NotrequiredNullableBooleanProp != null) + if (this.NotrequiredNotnullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.GetHashCode(); if (this.RequiredNullableDateProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableDateProp.GetHashCode(); @@ -949,13 +948,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotNullableDateProp.GetHashCode(); } - if (this.NotRequiredNullableDateProp != null) + if (this.NotRequiredNullableDateProp.IsSet && this.NotRequiredNullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.Value.GetHashCode(); } - if (this.NotRequiredNotnullableDateProp != null) + if (this.NotRequiredNotnullableDateProp.IsSet && this.NotRequiredNotnullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.Value.GetHashCode(); } if (this.RequiredNotnullableDatetimeProp != null) { @@ -965,30 +964,54 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNullableDatetimeProp.GetHashCode(); } - if (this.NotrequiredNullableDatetimeProp != null) + if (this.NotrequiredNullableDatetimeProp.IsSet && this.NotrequiredNullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableDatetimeProp != null) + if (this.NotrequiredNotnullableDatetimeProp.IsSet && this.NotrequiredNotnullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.RequiredNullableEnumInteger.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.GetHashCode(); + if (this.NotrequiredNullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableEnumIntegerOnly.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.GetHashCode(); + if (this.NotrequiredNullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNotnullableEnumString.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.GetHashCode(); + if (this.NotrequiredNullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableOuterEnumDefaultValue.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.GetHashCode(); + if (this.NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.Value.GetHashCode(); + } if (this.RequiredNullableUuid != null) { hashCode = (hashCode * 59) + this.RequiredNullableUuid.GetHashCode(); @@ -997,13 +1020,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableUuid.GetHashCode(); } - if (this.NotrequiredNullableUuid != null) + if (this.NotrequiredNullableUuid.IsSet && this.NotrequiredNullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.Value.GetHashCode(); } - if (this.NotrequiredNotnullableUuid != null) + if (this.NotrequiredNotnullableUuid.IsSet && this.NotrequiredNotnullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.Value.GetHashCode(); } if (this.RequiredNullableArrayOfString != null) { @@ -1013,13 +1036,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableArrayOfString.GetHashCode(); } - if (this.NotrequiredNullableArrayOfString != null) + if (this.NotrequiredNullableArrayOfString.IsSet && this.NotrequiredNullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.Value.GetHashCode(); } - if (this.NotrequiredNotnullableArrayOfString != null) + if (this.NotrequiredNotnullableArrayOfString.IsSet && this.NotrequiredNotnullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Return.cs index fec56c44fa82..077005d6cc27 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Return.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class Return : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varReturn. - public Return(int varReturn = default(int)) + public Return(Option varReturn = default(Option)) { this.VarReturn = varReturn; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class Return : IEquatable, IValidatableObject /// Gets or Sets VarReturn /// [DataMember(Name = "return", EmitDefaultValue = false)] - public int VarReturn { get; set; } + public Option VarReturn { get; set; } /// /// Gets or Sets additional properties @@ -106,7 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.VarReturn.GetHashCode(); + if (this.VarReturn.IsSet) + { + hashCode = (hashCode * 59) + this.VarReturn.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 4523238ad385..53d7053be15e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// /// roleUuid. /// role. - public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole)) + public RolesReportsHash(Option roleUuid = default(Option), Option role = default(Option)) { + // to ensure "roleUuid" (not nullable) is not null + if (roleUuid.IsSet && roleUuid.Value == null) + { + throw new ArgumentNullException("roleUuid isn't a nullable property for RolesReportsHash and cannot be null"); + } + // to ensure "role" (not nullable) is not null + if (role.IsSet && role.Value == null) + { + throw new ArgumentNullException("role isn't a nullable property for RolesReportsHash and cannot be null"); + } this.RoleUuid = roleUuid; this.Role = role; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// Gets or Sets RoleUuid /// [DataMember(Name = "role_uuid", EmitDefaultValue = false)] - public Guid RoleUuid { get; set; } + public Option RoleUuid { get; set; } /// /// Gets or Sets Role /// [DataMember(Name = "role", EmitDefaultValue = false)] - public RolesReportsHashRole Role { get; set; } + public Option Role { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RoleUuid != null) + if (this.RoleUuid.IsSet && this.RoleUuid.Value != null) { - hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.RoleUuid.Value.GetHashCode(); } - if (this.Role != null) + if (this.Role.IsSet && this.Role.Value != null) { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); + hashCode = (hashCode * 59) + this.Role.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index ef21c6091f38..177eddaba12d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Initializes a new instance of the class. /// /// name. - public RolesReportsHashRole(string name = default(string)) + public RolesReportsHashRole(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for RolesReportsHashRole and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 1510bd5c512d..a3ba20fa6c48 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected ScaleneTriangle() /// triangleType (required). public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ScaleneTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for ScaleneTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Shape.cs index 12e4af151482..f7f7c7dcc627 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Shape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ShapeInterface.cs index 9f8b4dd35b35..52027034071a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected ShapeInterface() /// shapeType (required). public ShapeInterface(string shapeType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 6d8279a8beda..b5fc4a013b0a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 266dcfee794c..1d5698e4b2ba 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected SimpleQuadrilateral() /// quadrilateralType (required). public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SpecialModelName.cs index 33320b76cf1f..8778d6b6381c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// /// specialPropertyName. /// varSpecialModelName. - public SpecialModelName(long specialPropertyName = default(long), string varSpecialModelName = default(string)) + public SpecialModelName(Option specialPropertyName = default(Option), Option varSpecialModelName = default(Option)) { + // to ensure "varSpecialModelName" (not nullable) is not null + if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) + { + throw new ArgumentNullException("varSpecialModelName isn't a nullable property for SpecialModelName and cannot be null"); + } this.SpecialPropertyName = specialPropertyName; this.VarSpecialModelName = varSpecialModelName; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// Gets or Sets SpecialPropertyName /// [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] - public long SpecialPropertyName { get; set; } + public Option SpecialPropertyName { get; set; } /// /// Gets or Sets VarSpecialModelName /// [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string VarSpecialModelName { get; set; } + public Option VarSpecialModelName { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.VarSpecialModelName != null) + if (this.SpecialPropertyName.IsSet) + { + hashCode = (hashCode * 59) + this.SpecialPropertyName.Value.GetHashCode(); + } + if (this.VarSpecialModelName.IsSet && this.VarSpecialModelName.Value != null) { - hashCode = (hashCode * 59) + this.VarSpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.VarSpecialModelName.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Tag.cs index 58eb2c605d15..74c5d5104142 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Tag.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Tag : IEquatable, IValidatableObject /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this.Id = id; this.Name = name; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class Tag : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index f7782b6fd5a7..72bd1b369aeb 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordList : IEquatable class. /// /// value. - public TestCollectionEndingWithWordList(string value = default(string)) + public TestCollectionEndingWithWordList(Option value = default(Option)) { + // to ensure "value" (not nullable) is not null + if (value.IsSet && value.Value == null) + { + throw new ArgumentNullException("value isn't a nullable property for TestCollectionEndingWithWordList and cannot be null"); + } this.Value = value; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestCollectionEndingWithWordList : IEquatable [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } + public Option Value { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Value != null) + if (this.Value.IsSet && this.Value.Value != null) { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 8498a5eca78f..6e00826d7870 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable class. /// /// testCollectionEndingWithWordList. - public TestCollectionEndingWithWordListObject(List testCollectionEndingWithWordList = default(List)) + public TestCollectionEndingWithWordListObject(Option> testCollectionEndingWithWordList = default(Option>)) { + // to ensure "testCollectionEndingWithWordList" (not nullable) is not null + if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) + { + throw new ArgumentNullException("testCollectionEndingWithWordList isn't a nullable property for TestCollectionEndingWithWordListObject and cannot be null"); + } this.TestCollectionEndingWithWordList = testCollectionEndingWithWordList; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable [DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)] - public List TestCollectionEndingWithWordList { get; set; } + public Option> TestCollectionEndingWithWordList { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.TestCollectionEndingWithWordList != null) + if (this.TestCollectionEndingWithWordList.IsSet && this.TestCollectionEndingWithWordList.Value != null) { - hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.GetHashCode(); + hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 457b88ac9c74..aca5c0652ab6 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Initializes a new instance of the class. /// /// someProperty. - public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) + public TestInlineFreeformAdditionalPropertiesRequest(Option someProperty = default(Option)) { + // to ensure "someProperty" (not nullable) is not null + if (someProperty.IsSet && someProperty.Value == null) + { + throw new ArgumentNullException("someProperty isn't a nullable property for TestInlineFreeformAdditionalPropertiesRequest and cannot be null"); + } this.SomeProperty = someProperty; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Gets or Sets SomeProperty /// [DataMember(Name = "someProperty", EmitDefaultValue = false)] - public string SomeProperty { get; set; } + public Option SomeProperty { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SomeProperty != null) + if (this.SomeProperty.IsSet && this.SomeProperty.Value != null) { - hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.SomeProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Triangle.cs index 37729a438160..4874223e8554 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Triangle.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TriangleInterface.cs index 34fa15105dca..fc45b2b8d370 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected TriangleInterface() /// triangleType (required). public TriangleInterface(string triangleType = default(string)) { - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/User.cs index b7911507a704..ed08e1b0126a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/User.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,43 @@ public partial class User : IEquatable, IValidatableObject /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) + public User(Option id = default(Option), Option username = default(Option), Option firstName = default(Option), Option lastName = default(Option), Option email = default(Option), Option password = default(Option), Option phone = default(Option), Option userStatus = default(Option), Option objectWithNoDeclaredProps = default(Option), Option objectWithNoDeclaredPropsNullable = default(Option), Option anyTypeProp = default(Option), Option anyTypePropNullable = default(Option)) { + // to ensure "username" (not nullable) is not null + if (username.IsSet && username.Value == null) + { + throw new ArgumentNullException("username isn't a nullable property for User and cannot be null"); + } + // to ensure "firstName" (not nullable) is not null + if (firstName.IsSet && firstName.Value == null) + { + throw new ArgumentNullException("firstName isn't a nullable property for User and cannot be null"); + } + // to ensure "lastName" (not nullable) is not null + if (lastName.IsSet && lastName.Value == null) + { + throw new ArgumentNullException("lastName isn't a nullable property for User and cannot be null"); + } + // to ensure "email" (not nullable) is not null + if (email.IsSet && email.Value == null) + { + throw new ArgumentNullException("email isn't a nullable property for User and cannot be null"); + } + // to ensure "password" (not nullable) is not null + if (password.IsSet && password.Value == null) + { + throw new ArgumentNullException("password isn't a nullable property for User and cannot be null"); + } + // to ensure "phone" (not nullable) is not null + if (phone.IsSet && phone.Value == null) + { + throw new ArgumentNullException("phone isn't a nullable property for User and cannot be null"); + } + // to ensure "objectWithNoDeclaredProps" (not nullable) is not null + if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) + { + throw new ArgumentNullException("objectWithNoDeclaredProps isn't a nullable property for User and cannot be null"); + } this.Id = id; this.Username = username; this.FirstName = firstName; @@ -68,78 +104,78 @@ public partial class User : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Username /// [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } + public Option Username { get; set; } /// /// Gets or Sets FirstName /// [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } + public Option FirstName { get; set; } /// /// Gets or Sets LastName /// [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } + public Option LastName { get; set; } /// /// Gets or Sets Email /// [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } + public Option Email { get; set; } /// /// Gets or Sets Password /// [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } + public Option Password { get; set; } /// /// Gets or Sets Phone /// [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } + public Option Phone { get; set; } /// /// User Status /// /// User Status [DataMember(Name = "userStatus", EmitDefaultValue = false)] - public int UserStatus { get; set; } + public Option UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] - public Object ObjectWithNoDeclaredProps { get; set; } + public Option ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] - public Object ObjectWithNoDeclaredPropsNullable { get; set; } + public Option ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] - public Object AnyTypeProp { get; set; } + public Option AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] - public Object AnyTypePropNullable { get; set; } + public Option AnyTypePropNullable { get; set; } /// /// Gets or Sets additional properties @@ -210,47 +246,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Username.IsSet && this.Username.Value != null) + { + hashCode = (hashCode * 59) + this.Username.Value.GetHashCode(); + } + if (this.FirstName.IsSet && this.FirstName.Value != null) { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); + hashCode = (hashCode * 59) + this.FirstName.Value.GetHashCode(); } - if (this.FirstName != null) + if (this.LastName.IsSet && this.LastName.Value != null) { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.LastName.Value.GetHashCode(); } - if (this.LastName != null) + if (this.Email.IsSet && this.Email.Value != null) { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + hashCode = (hashCode * 59) + this.Email.Value.GetHashCode(); } - if (this.Email != null) + if (this.Password.IsSet && this.Password.Value != null) { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); + hashCode = (hashCode * 59) + this.Password.Value.GetHashCode(); } - if (this.Password != null) + if (this.Phone.IsSet && this.Phone.Value != null) { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); + hashCode = (hashCode * 59) + this.Phone.Value.GetHashCode(); } - if (this.Phone != null) + if (this.UserStatus.IsSet) { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); + hashCode = (hashCode * 59) + this.UserStatus.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) + if (this.ObjectWithNoDeclaredProps.IsSet && this.ObjectWithNoDeclaredProps.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.Value.GetHashCode(); } - if (this.ObjectWithNoDeclaredPropsNullable != null) + if (this.ObjectWithNoDeclaredPropsNullable.IsSet && this.ObjectWithNoDeclaredPropsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.Value.GetHashCode(); } - if (this.AnyTypeProp != null) + if (this.AnyTypeProp.IsSet && this.AnyTypeProp.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypeProp.Value.GetHashCode(); } - if (this.AnyTypePropNullable != null) + if (this.AnyTypePropNullable.IsSet && this.AnyTypePropNullable.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypePropNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Whale.cs index 50119ed39e76..2038fc78e8db 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Whale.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,16 +47,16 @@ protected Whale() /// hasBaleen. /// hasTeeth. /// className (required). - public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) + public Whale(Option hasBaleen = default(Option), Option hasTeeth = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Whale and cannot be null"); } - this.ClassName = className; this.HasBaleen = hasBaleen; this.HasTeeth = hasTeeth; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -63,13 +64,13 @@ protected Whale() /// Gets or Sets HasBaleen /// [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] - public bool HasBaleen { get; set; } + public Option HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] - public bool HasTeeth { get; set; } + public Option HasTeeth { get; set; } /// /// Gets or Sets ClassName @@ -137,8 +138,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); + if (this.HasBaleen.IsSet) + { + hashCode = (hashCode * 59) + this.HasBaleen.Value.GetHashCode(); + } + if (this.HasTeeth.IsSet) + { + hashCode = (hashCode * 59) + this.HasTeeth.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Zebra.cs index 314fae589fc5..3bb224da1e43 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Zebra.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,7 +63,7 @@ public enum TypeEnum /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } + public Option Type { get; set; } /// /// Initializes a new instance of the class. /// @@ -76,15 +77,15 @@ protected Zebra() /// /// type. /// className (required). - public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) + public Zebra(Option type = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Zebra and cannot be null"); } - this.ClassName = className; this.Type = type; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -153,7 +154,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Type.IsSet) + { + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs index b4ff8d51adb7..15c623dc8d8f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 617dcd5f7a09..daccbc984737 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,12 +57,12 @@ public enum ZeroBasedEnumEnum /// Gets or Sets ZeroBasedEnum /// [DataMember(Name = "ZeroBasedEnum", EmitDefaultValue = false)] - public ZeroBasedEnumEnum? ZeroBasedEnum { get; set; } + public Option ZeroBasedEnum { get; set; } /// /// Initializes a new instance of the class. /// /// zeroBasedEnum. - public ZeroBasedEnumClass(ZeroBasedEnumEnum? zeroBasedEnum = default(ZeroBasedEnumEnum?)) + public ZeroBasedEnumClass(Option zeroBasedEnum = default(Option)) { this.ZeroBasedEnum = zeroBasedEnum; this.AdditionalProperties = new Dictionary(); @@ -125,7 +126,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.ZeroBasedEnum.GetHashCode(); + if (this.ZeroBasedEnum.IsSet) + { + hashCode = (hashCode * 59) + this.ZeroBasedEnum.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/net7/Petstore/.openapi-generator/FILES index 1149d7663f8f..163fcc619230 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/.openapi-generator/FILES @@ -132,6 +132,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/AdditionalPropertiesClass.md index c40cd0f8accb..b7f89fdf61d0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/AdditionalPropertiesClass.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MapProperty** | **Dictionary<string, string>** | | [optional] **MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**Anytype1** | **Object** | | [optional] +**Anytype1** | **Object?** | | [optional] **MapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype3** | **Dictionary<string, Object>** | | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/EnumTest.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/EnumTest.md index 5ce3c4addd9b..34121fad769e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/EnumTest.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/EnumTest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **EnumInteger** | **int** | | [optional] **EnumIntegerOnly** | **int** | | [optional] **EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [optional] +**OuterEnum** | **OuterEnum?** | | [optional] **OuterEnumInteger** | **OuterEnumInteger** | | [optional] **OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] **OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/FakeApi.md index 933fb1c7cad3..f45d0a14d397 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool? body = null) +> bool FakeOuterBooleanSerialize (bool body = null) @@ -134,7 +134,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = true; // bool? | Input boolean as post body (optional) + var body = true; // bool | Input boolean as post body (optional) try { @@ -175,7 +175,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **bool?** | Input boolean as post body | [optional] | +| **body** | **bool** | Input boolean as post body | [optional] | ### Return type @@ -200,7 +200,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite? outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) @@ -223,7 +223,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var outerComposite = new OuterComposite?(); // OuterComposite? | Input composite as post body (optional) + var outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body (optional) try { @@ -264,7 +264,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **outerComposite** | [**OuterComposite?**](OuterComposite?.md) | Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] | ### Return type @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal? body = null) +> decimal FakeOuterNumberSerialize (decimal body = null) @@ -312,7 +312,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14D; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal | Input number as post body (optional) try { @@ -353,7 +353,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **decimal?** | Input number as post body | [optional] | +| **body** | **decimal** | Input number as post body | [optional] | ### Return type @@ -378,7 +378,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string? body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) @@ -402,7 +402,7 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var requiredStringUuid = "requiredStringUuid_example"; // Guid | Required UUID String - var body = "body_example"; // string? | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -444,7 +444,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **requiredStringUuid** | **Guid** | Required UUID String | | -| **body** | **string?** | Input string as post body | [optional] | +| **body** | **string** | Input string as post body | [optional] | ### Return type @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string? varString = null, System.IO.Stream? binary = null, DateOnly? date = null, DateTime? dateTime = null, string? password = null, string? callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateOnly date = null, DateTime dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1098,16 +1098,16 @@ namespace Example var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789L; // long? | None (optional) - var varFloat = 3.4F; // float? | None (optional) - var varString = "varString_example"; // string? | None (optional) - var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | None (optional) - var date = DateOnly.Parse("2013-10-20"); // DateOnly? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") - var password = "password_example"; // string? | None (optional) - var callback = "callback_example"; // string? | None (optional) + var integer = 56; // int | None (optional) + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var date = DateOnly.Parse("2013-10-20"); // DateOnly | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -1150,16 +1150,16 @@ catch (ApiException e) | **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int?** | None | [optional] | -| **int32** | **int?** | None | [optional] | -| **int64** | **long?** | None | [optional] | -| **varFloat** | **float?** | None | [optional] | -| **varString** | **string?** | None | [optional] | -| **binary** | **System.IO.Stream?****System.IO.Stream?** | None | [optional] | -| **date** | **DateOnly?** | None | [optional] | -| **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | -| **password** | **string?** | None | [optional] | -| **callback** | **string?** | None | [optional] | +| **integer** | **int** | None | [optional] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | +| **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **date** | **DateOnly** | None | [optional] | +| **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **password** | **string** | None | [optional] | +| **callback** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -1208,14 +1208,14 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List?(); // List? | Header parameter enum test (string array) (optional) - var enumHeaderString = "_abc"; // string? | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List?(); // List? | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string? | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List?(); // List? | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string? | Form parameter enum test (string) (optional) (default to -efg) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<string>?**](string.md) | Header parameter enum test (string array) | [optional] | -| **enumHeaderString** | **string?** | Header parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryStringArray** | [**List<string>?**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **string?** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | -| **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>?**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | -| **enumFormString** | **string?** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | +| **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | +| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) Fake endpoint to test group parameters (optional) @@ -1316,9 +1316,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789L; // long? | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) + var booleanGroup = true; // bool | Boolean in group parameters (optional) + var int64Group = 789L; // long | Integer in group parameters (optional) try { @@ -1360,9 +1360,9 @@ catch (ApiException e) | **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | -| **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | -| **int64Group** | **long?** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | +| **booleanGroup** | **bool** | Boolean in group parameters | [optional] | +| **int64Group** | **long** | Integer in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = null, string? notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) @@ -1674,8 +1674,8 @@ namespace Example var context = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | var requiredNullable = "requiredNullable_example"; // string | - var notRequiredNotNullable = "notRequiredNotNullable_example"; // string? | (optional) - var notRequiredNullable = "notRequiredNullable_example"; // string? | (optional) + var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) + var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) try { @@ -1719,8 +1719,8 @@ catch (ApiException e) | **context** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | | **requiredNullable** | **string** | | | -| **notRequiredNotNullable** | **string?** | | [optional] | -| **notRequiredNullable** | **string?** | | [optional] | +| **notRequiredNotNullable** | **string** | | [optional] | +| **notRequiredNullable** | **string** | | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/HealthCheckResult.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/HealthCheckResult.md index f7d1a7eb6886..154fd14dcc7d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/HealthCheckResult.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/HealthCheckResult.md @@ -5,7 +5,7 @@ Just a string to inform instance is up and running. Make it nullable in hope to Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**NullableMessage** | **string** | | [optional] +**NullableMessage** | **string?** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/MixLog.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/MixLog.md index 1872e30daaa3..f01c33cefb21 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/MixLog.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/MixLog.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **TotalSkips** | **int** | | **TotalUnderPours** | **int** | | **FormulaVersionDate** | **DateTime** | | -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] +**SomeCode** | **string?** | SomeCode is only required for color mixes | [optional] **BatchNumber** | **string** | | [optional] **BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] **BrandId** | **string** | BrandId is only required for color mixes | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/NullableClass.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/NullableClass.md index 67c1052fca9d..673080737fca 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/NullableClass.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/NullableClass.md @@ -7,15 +7,15 @@ Name | Type | Description | Notes **IntegerProp** | **int?** | | [optional] **NumberProp** | **decimal?** | | [optional] **BooleanProp** | **bool?** | | [optional] -**StringProp** | **string** | | [optional] -**DateProp** | **DateOnly** | | [optional] +**StringProp** | **string?** | | [optional] +**DateProp** | **DateOnly?** | | [optional] **DatetimeProp** | **DateTime?** | | [optional] -**ArrayNullableProp** | **List<Object>** | | [optional] -**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] -**ArrayItemsNullable** | **List<Object>** | | [optional] -**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] -**ObjectAndItemsNullableProp** | **Dictionary<string, Object>** | | [optional] -**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional] +**ArrayNullableProp** | **List<Object>?** | | [optional] +**ArrayAndItemsNullableProp** | **List<Object?>?** | | [optional] +**ArrayItemsNullable** | **List<Object?>** | | [optional] +**ObjectNullableProp** | **Dictionary<string, Object>?** | | [optional] +**ObjectAndItemsNullableProp** | **Dictionary<string, Object?>?** | | [optional] +**ObjectItemsNullable** | **Dictionary<string, Object?>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md index 417e0ab80207..220b1ae30105 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string? apiKey = null) +> void DeletePet (long petId, string apiKey = null) Deletes a pet @@ -129,7 +129,7 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | Pet id to delete - var apiKey = "apiKey_example"; // string? | (optional) + var apiKey = "apiKey_example"; // string | (optional) try { @@ -169,7 +169,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | Pet id to delete | | -| **apiKey** | **string?** | | [optional] | +| **apiKey** | **string** | | [optional] | ### Return type @@ -576,7 +576,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string? name = null, string? status = null) +> void UpdatePetWithForm (long petId, string name = null, string status = null) Updates a pet in the store with form data @@ -601,8 +601,8 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet that needs to be updated - var name = "name_example"; // string? | Updated name of the pet (optional) - var status = "status_example"; // string? | Updated status of the pet (optional) + var name = "name_example"; // string | Updated name of the pet (optional) + var status = "status_example"; // string | Updated status of the pet (optional) try { @@ -642,8 +642,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | ID of pet that needs to be updated | | -| **name** | **string?** | Updated name of the pet | [optional] | -| **status** | **string?** | Updated status of the pet | [optional] | +| **name** | **string** | Updated name of the pet | [optional] | +| **status** | **string** | Updated status of the pet | [optional] | ### Return type @@ -668,7 +668,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string? additionalMetadata = null, System.IO.Stream? file = null) +> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) uploads an image @@ -693,8 +693,8 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet to update - var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional) - var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | file to upload (optional) + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) try { @@ -738,8 +738,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | ID of pet to update | | -| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] | -| **file** | **System.IO.Stream?****System.IO.Stream?** | file to upload | [optional] | +| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | +| **file** | **System.IO.Stream****System.IO.Stream** | file to upload | [optional] | ### Return type @@ -764,7 +764,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string? additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) uploads an image (required) @@ -790,7 +790,7 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet to update var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload - var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional) + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { @@ -835,7 +835,7 @@ catch (ApiException e) |------|------|-------------|-------| | **petId** | **long** | ID of pet to update | | | **requiredFile** | **System.IO.Stream****System.IO.Stream** | file to upload | | -| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] | +| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/RequiredClass.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/RequiredClass.md index 685c1c51e031..67336a3fa42a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/RequiredClass.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/RequiredClass.md @@ -8,17 +8,17 @@ Name | Type | Description | Notes **RequiredNotnullableintegerProp** | **int** | | **NotRequiredNullableIntegerProp** | **int?** | | [optional] **NotRequiredNotnullableintegerProp** | **int** | | [optional] -**RequiredNullableStringProp** | **string** | | +**RequiredNullableStringProp** | **string?** | | **RequiredNotnullableStringProp** | **string** | | -**NotrequiredNullableStringProp** | **string** | | [optional] +**NotrequiredNullableStringProp** | **string?** | | [optional] **NotrequiredNotnullableStringProp** | **string** | | [optional] **RequiredNullableBooleanProp** | **bool?** | | **RequiredNotnullableBooleanProp** | **bool** | | **NotrequiredNullableBooleanProp** | **bool?** | | [optional] **NotrequiredNotnullableBooleanProp** | **bool** | | [optional] -**RequiredNullableDateProp** | **DateOnly** | | +**RequiredNullableDateProp** | **DateOnly?** | | **RequiredNotNullableDateProp** | **DateOnly** | | -**NotRequiredNullableDateProp** | **DateOnly** | | [optional] +**NotRequiredNullableDateProp** | **DateOnly?** | | [optional] **NotRequiredNotnullableDateProp** | **DateOnly** | | [optional] **RequiredNotnullableDatetimeProp** | **DateTime** | | **RequiredNullableDatetimeProp** | **DateTime?** | | @@ -33,20 +33,20 @@ Name | Type | Description | Notes **NotrequiredNullableEnumIntegerOnly** | **int?** | | [optional] **NotrequiredNotnullableEnumIntegerOnly** | **int** | | [optional] **RequiredNotnullableEnumString** | **string** | | -**RequiredNullableEnumString** | **string** | | -**NotrequiredNullableEnumString** | **string** | | [optional] +**RequiredNullableEnumString** | **string?** | | +**NotrequiredNullableEnumString** | **string?** | | [optional] **NotrequiredNotnullableEnumString** | **string** | | [optional] -**RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | +**RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue?** | | **RequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | -**NotrequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] +**NotrequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue?** | | [optional] **NotrequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] **RequiredNullableUuid** | **Guid?** | | **RequiredNotnullableUuid** | **Guid** | | **NotrequiredNullableUuid** | **Guid?** | | [optional] **NotrequiredNotnullableUuid** | **Guid** | | [optional] -**RequiredNullableArrayOfString** | **List<string>** | | +**RequiredNullableArrayOfString** | **List<string>?** | | **RequiredNotnullableArrayOfString** | **List<string>** | | -**NotrequiredNullableArrayOfString** | **List<string>** | | [optional] +**NotrequiredNullableArrayOfString** | **List<string>?** | | [optional] **NotrequiredNotnullableArrayOfString** | **List<string>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/Return.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/Return.md index a10daf95cf1d..843e88f115eb 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/Return.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/Return.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **VarReturn** | **int** | | [optional] **Lock** | **string** | | -**Abstract** | **string** | | +**Abstract** | **string?** | | **Unsafe** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/User.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/User.md index b0cd4dc042bf..00831ade51d5 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/User.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/User.md @@ -13,9 +13,9 @@ Name | Type | Description | Notes **Phone** | **string** | | [optional] **UserStatus** | **int** | User Status | [optional] **ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] -**AnyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] -**AnyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] +**ObjectWithNoDeclaredPropsNullable** | **Object?** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**AnyTypeProp** | **Object?** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] +**AnyTypePropNullable** | **Object?** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 95d41fcbd942..3437138cacd2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -301,9 +299,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs index 354f9eb6d9f2..11aeb829749a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -517,9 +517,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -588,9 +586,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index d2863e79474b..bff4a966dfeb 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -55,7 +55,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); + bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -67,7 +67,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -78,7 +78,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0); + OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0); /// /// @@ -90,7 +90,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0); /// /// /// @@ -101,7 +101,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); + decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -113,7 +113,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -125,7 +125,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// string - string FakeOuterStringSerialize(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0); + string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// @@ -138,7 +138,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0); + ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// Array of Enums /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0); + void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -329,7 +329,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// To test enum parameters /// @@ -347,7 +347,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - void TestEnumParameters(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0); + void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// To test enum parameters @@ -366,7 +366,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0); + ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -382,7 +382,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -399,7 +399,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// test inline additionalProperties /// @@ -480,7 +480,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// @@ -500,7 +500,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// test referenced string map /// @@ -564,7 +564,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -577,7 +577,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -589,7 +589,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -602,7 +602,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -614,7 +614,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -627,7 +627,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -640,7 +640,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -654,7 +654,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -850,7 +850,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -876,7 +876,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -895,7 +895,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -915,7 +915,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -932,7 +932,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -950,7 +950,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -1047,7 +1047,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -1068,7 +1068,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test referenced string map /// @@ -1347,7 +1347,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) + public bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1360,7 +1360,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1413,7 +1413,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1427,7 +1427,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1481,7 +1481,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0) + public OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1494,8 +1494,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1547,7 +1551,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1561,8 +1565,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1615,7 +1623,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) + public decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1628,7 +1636,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1681,7 +1689,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1695,7 +1703,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1750,7 +1758,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0) + public string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, body); return localVarResponse.Data; @@ -1764,8 +1772,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1819,7 +1835,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(requiredStringUuid, body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1834,8 +1850,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2283,9 +2307,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2354,9 +2376,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2425,9 +2445,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2496,9 +2514,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2569,15 +2585,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2649,15 +2661,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2728,9 +2736,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2801,9 +2807,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2870,7 +2874,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0) + public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); } @@ -2895,19 +2899,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2931,49 +2955,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3021,7 +3045,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEndpointParametersWithHttpInfoAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3047,19 +3071,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string? varString = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateOnly? date = default(DateOnly?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3084,49 +3128,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3168,7 +3212,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - public void TestEnumParameters(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0) + public void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -3187,8 +3231,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -3211,37 +3279,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3277,7 +3345,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3297,8 +3365,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3322,37 +3414,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3386,7 +3478,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -3403,7 +3495,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3428,18 +3520,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3479,7 +3571,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3497,7 +3589,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3523,18 +3615,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3585,9 +3677,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3656,9 +3746,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3727,9 +3815,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3798,9 +3884,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3871,15 +3955,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3951,15 +4031,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4021,7 +4097,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } @@ -4041,49 +4117,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4113,13 +4183,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4156,7 +4226,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -4177,49 +4247,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = default(string?), string? notRequiredNullable = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4250,13 +4314,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4301,9 +4365,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4372,9 +4434,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index dd74c66d1544..9f168cc6adb2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -306,9 +304,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs index f86ff3fb795e..20b583356df9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs @@ -55,7 +55,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void DeletePet(long petId, string? apiKey = default(string?), int operationIndex = 0); + void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Deletes a pet @@ -68,7 +68,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string? apiKey = default(string?), int operationIndex = 0); + ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Finds Pets by status /// @@ -169,7 +169,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0); + void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -183,7 +183,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// uploads an image /// @@ -193,7 +193,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0); + ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image @@ -207,7 +207,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0); + ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image (required) /// @@ -217,7 +217,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); /// /// uploads an image (required) @@ -231,7 +231,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -278,7 +278,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -292,7 +292,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -408,7 +408,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -423,7 +423,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -437,7 +437,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -452,7 +452,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -466,7 +466,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -481,7 +481,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -625,9 +625,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -729,9 +727,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -818,7 +814,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// - public void DeletePet(long petId, string? apiKey = default(string?), int operationIndex = 0) + public void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -831,8 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string? apiKey = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -855,9 +855,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -903,7 +903,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -917,8 +917,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -942,9 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -1006,9 +1010,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1111,9 +1113,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1218,9 +1218,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,9 +1323,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1583,9 +1579,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1687,9 +1681,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1777,7 +1769,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0) + public void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1791,8 +1783,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1816,13 +1816,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1869,7 +1869,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1884,8 +1884,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1910,13 +1918,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1963,7 +1971,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0) + public ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1978,8 +1986,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2004,13 +2020,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2057,7 +2073,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2073,8 +2089,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2100,13 +2124,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2153,7 +2177,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -2168,13 +2192,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2201,9 +2227,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); @@ -2251,7 +2277,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2267,13 +2293,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2301,9 +2329,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs index e8bed0a150ec..1ffc5a694f5b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -364,9 +364,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -434,9 +432,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -775,9 +771,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -849,9 +843,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index 8efb827cdc00..3a89a6e99556 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -552,9 +552,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -623,9 +621,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -694,9 +690,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -765,9 +759,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -836,9 +828,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -907,9 +897,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -978,9 +966,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1048,9 +1034,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1119,9 +1103,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1192,9 +1174,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1267,15 +1247,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1349,15 +1325,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1552,15 +1524,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1632,15 +1600,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 05e2ddb4de86..123e3ea02d56 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -31,6 +31,7 @@ using Polly; using Org.OpenAPITools.Client.Auth; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -50,7 +51,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -184,7 +186,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..0667fd28e770 --- /dev/null +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,126 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + +#nullable enable + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + Type innerType = value?.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType)!; + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 0c81e65fdc1e..c9d60a4c7266 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class Activity : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// activityOutputs. - public Activity(Dictionary> activityOutputs = default(Dictionary>)) + public Activity(Option>> activityOutputs = default(Option>>)) { + // to ensure "activityOutputs" (not nullable) is not null + if (activityOutputs.IsSet && activityOutputs.Value == null) + { + throw new ArgumentNullException("activityOutputs isn't a nullable property for Activity and cannot be null"); + } this.ActivityOutputs = activityOutputs; } @@ -45,7 +51,7 @@ public partial class Activity : IEquatable, IValidatableObject /// Gets or Sets ActivityOutputs /// [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] - public Dictionary> ActivityOutputs { get; set; } + public Option>> ActivityOutputs { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActivityOutputs != null) + if (this.ActivityOutputs.IsSet && this.ActivityOutputs.Value != null) { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); + hashCode = (hashCode * 59) + this.ActivityOutputs.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 61656615b137..ed52d7cd954f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class ActivityOutputElementRepresentation : IEquatable /// prop1. /// prop2. - public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + public ActivityOutputElementRepresentation(Option prop1 = default(Option), Option prop2 = default(Option)) { + // to ensure "prop1" (not nullable) is not null + if (prop1.IsSet && prop1.Value == null) + { + throw new ArgumentNullException("prop1 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } + // to ensure "prop2" (not nullable) is not null + if (prop2.IsSet && prop2.Value == null) + { + throw new ArgumentNullException("prop2 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } this.Prop1 = prop1; this.Prop2 = prop2; } @@ -47,13 +58,13 @@ public partial class ActivityOutputElementRepresentation : IEquatable [DataMember(Name = "prop1", EmitDefaultValue = false)] - public string Prop1 { get; set; } + public Option Prop1 { get; set; } /// /// Gets or Sets Prop2 /// [DataMember(Name = "prop2", EmitDefaultValue = false)] - public Object Prop2 { get; set; } + public Option Prop2 { get; set; } /// /// Returns the string presentation of the object @@ -107,13 +118,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Prop1 != null) + if (this.Prop1.IsSet && this.Prop1.Value != null) { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop1.Value.GetHashCode(); } - if (this.Prop2 != null) + if (this.Prop2.IsSet && this.Prop2.Value != null) { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop2.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 6f73dd2a107e..b75020ce3a95 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,8 +44,43 @@ public partial class AdditionalPropertiesClass : IEquatablemapWithUndeclaredPropertiesAnytype3. /// an object with no declared properties and no undeclared properties, hence it's an empty map.. /// mapWithUndeclaredPropertiesString. - public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) + public AdditionalPropertiesClass(Option> mapProperty = default(Option>), Option>> mapOfMapProperty = default(Option>>), Option anytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype2 = default(Option), Option> mapWithUndeclaredPropertiesAnytype3 = default(Option>), Option emptyMap = default(Option), Option> mapWithUndeclaredPropertiesString = default(Option>)) { + // to ensure "mapProperty" (not nullable) is not null + if (mapProperty.IsSet && mapProperty.Value == null) + { + throw new ArgumentNullException("mapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapOfMapProperty" (not nullable) is not null + if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) + { + throw new ArgumentNullException("mapOfMapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype1" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype2" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype3" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "emptyMap" (not nullable) is not null + if (emptyMap.IsSet && emptyMap.Value == null) + { + throw new ArgumentNullException("emptyMap isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesString" (not nullable) is not null + if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesString isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } this.MapProperty = mapProperty; this.MapOfMapProperty = mapOfMapProperty; this.Anytype1 = anytype1; @@ -59,50 +95,50 @@ public partial class AdditionalPropertiesClass : IEquatable [DataMember(Name = "map_property", EmitDefaultValue = false)] - public Dictionary MapProperty { get; set; } + public Option> MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] - public Dictionary> MapOfMapProperty { get; set; } + public Option>> MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// [DataMember(Name = "anytype_1", EmitDefaultValue = true)] - public Object Anytype1 { get; set; } + public Option Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } + public Option> MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. [DataMember(Name = "empty_map", EmitDefaultValue = false)] - public Object EmptyMap { get; set; } + public Option EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesString { get; set; } + public Option> MapWithUndeclaredPropertiesString { get; set; } /// /// Returns the string presentation of the object @@ -162,37 +198,37 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapProperty != null) + if (this.MapProperty.IsSet && this.MapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapProperty.Value.GetHashCode(); } - if (this.MapOfMapProperty != null) + if (this.MapOfMapProperty.IsSet && this.MapOfMapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfMapProperty.Value.GetHashCode(); } - if (this.Anytype1 != null) + if (this.Anytype1.IsSet && this.Anytype1.Value != null) { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.Anytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) + if (this.MapWithUndeclaredPropertiesAnytype1.IsSet && this.MapWithUndeclaredPropertiesAnytype1.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) + if (this.MapWithUndeclaredPropertiesAnytype2.IsSet && this.MapWithUndeclaredPropertiesAnytype2.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) + if (this.MapWithUndeclaredPropertiesAnytype3.IsSet && this.MapWithUndeclaredPropertiesAnytype3.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.Value.GetHashCode(); } - if (this.EmptyMap != null) + if (this.EmptyMap.IsSet && this.EmptyMap.Value != null) { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); + hashCode = (hashCode * 59) + this.EmptyMap.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesString != null) + if (this.MapWithUndeclaredPropertiesString.IsSet && this.MapWithUndeclaredPropertiesString.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Animal.cs index e19658cee189..530b038fc5d3 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,16 +47,20 @@ protected Animal() { } /// /// className (required). /// color (default to "red"). - public Animal(string className = default(string), string color = @"red") + public Animal(string className = default(string), Option color = default(Option)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Animal and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for Animal and cannot be null"); } this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? @"red"; + this.Color = color.IsSet ? color : new Option(@"red"); } /// @@ -68,7 +73,7 @@ protected Animal() { } /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Returns the string presentation of the object @@ -126,9 +131,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); } - if (this.Color != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index b11aff203a77..baa080590617 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,18 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// code. /// type. /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) + public ApiResponse(Option code = default(Option), Option type = default(Option), Option message = default(Option)) { + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for ApiResponse and cannot be null"); + } + // to ensure "message" (not nullable) is not null + if (message.IsSet && message.Value == null) + { + throw new ArgumentNullException("message isn't a nullable property for ApiResponse and cannot be null"); + } this.Code = code; this.Type = type; this.Message = message; @@ -49,19 +60,19 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// Gets or Sets Code /// [DataMember(Name = "code", EmitDefaultValue = false)] - public int Code { get; set; } + public Option Code { get; set; } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + public Option Type { get; set; } /// /// Gets or Sets Message /// [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } + public Option Message { get; set; } /// /// Returns the string presentation of the object @@ -116,14 +127,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) + if (this.Code.IsSet) + { + hashCode = (hashCode * 59) + this.Code.Value.GetHashCode(); + } + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.Message != null) + if (this.Message.IsSet && this.Message.Value != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this.Message.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 5d0bdb98c302..f6ef7f0c83be 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class Apple : IEquatable, IValidatableObject /// cultivar. /// origin. /// colorCode. - public Apple(string cultivar = default(string), string origin = default(string), string colorCode = default(string)) + public Apple(Option cultivar = default(Option), Option origin = default(Option), Option colorCode = default(Option)) { + // to ensure "cultivar" (not nullable) is not null + if (cultivar.IsSet && cultivar.Value == null) + { + throw new ArgumentNullException("cultivar isn't a nullable property for Apple and cannot be null"); + } + // to ensure "origin" (not nullable) is not null + if (origin.IsSet && origin.Value == null) + { + throw new ArgumentNullException("origin isn't a nullable property for Apple and cannot be null"); + } + // to ensure "colorCode" (not nullable) is not null + if (colorCode.IsSet && colorCode.Value == null) + { + throw new ArgumentNullException("colorCode isn't a nullable property for Apple and cannot be null"); + } this.Cultivar = cultivar; this.Origin = origin; this.ColorCode = colorCode; @@ -49,19 +65,19 @@ public partial class Apple : IEquatable, IValidatableObject /// Gets or Sets Cultivar /// [DataMember(Name = "cultivar", EmitDefaultValue = false)] - public string Cultivar { get; set; } + public Option Cultivar { get; set; } /// /// Gets or Sets Origin /// [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin { get; set; } + public Option Origin { get; set; } /// /// Gets or Sets ColorCode /// [DataMember(Name = "color_code", EmitDefaultValue = false)] - public string ColorCode { get; set; } + public Option ColorCode { get; set; } /// /// Returns the string presentation of the object @@ -116,17 +132,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Cultivar != null) + if (this.Cultivar.IsSet && this.Cultivar.Value != null) { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); + hashCode = (hashCode * 59) + this.Cultivar.Value.GetHashCode(); } - if (this.Origin != null) + if (this.Origin.IsSet && this.Origin.Value != null) { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); + hashCode = (hashCode * 59) + this.Origin.Value.GetHashCode(); } - if (this.ColorCode != null) + if (this.ColorCode.IsSet && this.ColorCode.Value != null) { - hashCode = (hashCode * 59) + this.ColorCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorCode.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index 3eef221be3e3..f2a1e63e3787 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,12 +43,12 @@ protected AppleReq() { } /// /// cultivar (required). /// mealy. - public AppleReq(string cultivar = default(string), bool mealy = default(bool)) + public AppleReq(string cultivar = default(string), Option mealy = default(Option)) { - // to ensure "cultivar" is required (not null) + // to ensure "cultivar" (not nullable) is not null if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); + throw new ArgumentNullException("cultivar isn't a nullable property for AppleReq and cannot be null"); } this.Cultivar = cultivar; this.Mealy = mealy; @@ -63,7 +64,7 @@ protected AppleReq() { } /// Gets or Sets Mealy /// [DataMember(Name = "mealy", EmitDefaultValue = true)] - public bool Mealy { get; set; } + public Option Mealy { get; set; } /// /// Returns the string presentation of the object @@ -121,7 +122,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); + if (this.Mealy.IsSet) + { + hashCode = (hashCode * 59) + this.Mealy.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index b75b0792d613..019abff2315d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable class. /// /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + public ArrayOfArrayOfNumberOnly(Option>> arrayArrayNumber = default(Option>>)) { + // to ensure "arrayArrayNumber" (not nullable) is not null + if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) + { + throw new ArgumentNullException("arrayArrayNumber isn't a nullable property for ArrayOfArrayOfNumberOnly and cannot be null"); + } this.ArrayArrayNumber = arrayArrayNumber; } @@ -45,7 +51,7 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] - public List> ArrayArrayNumber { get; set; } + public Option>> ArrayArrayNumber { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayArrayNumber != null) + if (this.ArrayArrayNumber.IsSet && this.ArrayArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayNumber.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index e3a0602189b0..2c6d83326d59 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Initializes a new instance of the class. /// /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) + public ArrayOfNumberOnly(Option> arrayNumber = default(Option>)) { + // to ensure "arrayNumber" (not nullable) is not null + if (arrayNumber.IsSet && arrayNumber.Value == null) + { + throw new ArgumentNullException("arrayNumber isn't a nullable property for ArrayOfNumberOnly and cannot be null"); + } this.ArrayNumber = arrayNumber; } @@ -45,7 +51,7 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Gets or Sets ArrayNumber /// [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] - public List ArrayNumber { get; set; } + public Option> ArrayNumber { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayNumber != null) + if (this.ArrayNumber.IsSet && this.ArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNumber.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 02ead047372b..39a676451be3 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// arrayOfString. /// arrayArrayOfInteger. /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + public ArrayTest(Option> arrayOfString = default(Option>), Option>> arrayArrayOfInteger = default(Option>>), Option>> arrayArrayOfModel = default(Option>>)) { + // to ensure "arrayOfString" (not nullable) is not null + if (arrayOfString.IsSet && arrayOfString.Value == null) + { + throw new ArgumentNullException("arrayOfString isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfInteger" (not nullable) is not null + if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) + { + throw new ArgumentNullException("arrayArrayOfInteger isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfModel" (not nullable) is not null + if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) + { + throw new ArgumentNullException("arrayArrayOfModel isn't a nullable property for ArrayTest and cannot be null"); + } this.ArrayOfString = arrayOfString; this.ArrayArrayOfInteger = arrayArrayOfInteger; this.ArrayArrayOfModel = arrayArrayOfModel; @@ -49,19 +65,19 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// Gets or Sets ArrayOfString /// [DataMember(Name = "array_of_string", EmitDefaultValue = false)] - public List ArrayOfString { get; set; } + public Option> ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] - public List> ArrayArrayOfInteger { get; set; } + public Option>> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] - public List> ArrayArrayOfModel { get; set; } + public Option>> ArrayArrayOfModel { get; set; } /// /// Returns the string presentation of the object @@ -116,17 +132,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayOfString != null) + if (this.ArrayOfString.IsSet && this.ArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayOfString.Value.GetHashCode(); } - if (this.ArrayArrayOfInteger != null) + if (this.ArrayArrayOfInteger.IsSet && this.ArrayArrayOfInteger.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.Value.GetHashCode(); } - if (this.ArrayArrayOfModel != null) + if (this.ArrayArrayOfModel.IsSet && this.ArrayArrayOfModel.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfModel.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Banana.cs index dffda1bedc28..23312279bb53 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// lengthCm. - public Banana(decimal lengthCm = default(decimal)) + public Banana(Option lengthCm = default(Option)) { this.LengthCm = lengthCm; } @@ -45,7 +46,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Gets or Sets LengthCm /// [DataMember(Name = "lengthCm", EmitDefaultValue = false)] - public decimal LengthCm { get; set; } + public Option LengthCm { get; set; } /// /// Returns the string presentation of the object @@ -98,7 +99,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); + if (this.LengthCm.IsSet) + { + hashCode = (hashCode * 59) + this.LengthCm.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 360cb5281e80..02703e4025a9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,7 +43,7 @@ protected BananaReq() { } /// /// lengthCm (required). /// sweet. - public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool)) + public BananaReq(decimal lengthCm = default(decimal), Option sweet = default(Option)) { this.LengthCm = lengthCm; this.Sweet = sweet; @@ -58,7 +59,7 @@ protected BananaReq() { } /// Gets or Sets Sweet /// [DataMember(Name = "sweet", EmitDefaultValue = true)] - public bool Sweet { get; set; } + public Option Sweet { get; set; } /// /// Returns the string presentation of the object @@ -113,7 +114,10 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); + if (this.Sweet.IsSet) + { + hashCode = (hashCode * 59) + this.Sweet.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index f362ad71dd04..2fa9099a9dbc 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,10 +44,10 @@ protected BasquePig() { } /// className (required). public BasquePig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for BasquePig and cannot be null"); } this.ClassName = className; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 78a9791fcd6f..e4f6b853608e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -41,8 +42,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// capitalSnake. /// sCAETHFlowPoints. /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) + public Capitalization(Option smallCamel = default(Option), Option capitalCamel = default(Option), Option smallSnake = default(Option), Option capitalSnake = default(Option), Option sCAETHFlowPoints = default(Option), Option aTTNAME = default(Option)) { + // to ensure "smallCamel" (not nullable) is not null + if (smallCamel.IsSet && smallCamel.Value == null) + { + throw new ArgumentNullException("smallCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalCamel" (not nullable) is not null + if (capitalCamel.IsSet && capitalCamel.Value == null) + { + throw new ArgumentNullException("capitalCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "smallSnake" (not nullable) is not null + if (smallSnake.IsSet && smallSnake.Value == null) + { + throw new ArgumentNullException("smallSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalSnake" (not nullable) is not null + if (capitalSnake.IsSet && capitalSnake.Value == null) + { + throw new ArgumentNullException("capitalSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "sCAETHFlowPoints" (not nullable) is not null + if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) + { + throw new ArgumentNullException("sCAETHFlowPoints isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "aTTNAME" (not nullable) is not null + if (aTTNAME.IsSet && aTTNAME.Value == null) + { + throw new ArgumentNullException("aTTNAME isn't a nullable property for Capitalization and cannot be null"); + } this.SmallCamel = smallCamel; this.CapitalCamel = capitalCamel; this.SmallSnake = smallSnake; @@ -55,38 +86,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// Gets or Sets SmallCamel /// [DataMember(Name = "smallCamel", EmitDefaultValue = false)] - public string SmallCamel { get; set; } + public Option SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] - public string CapitalCamel { get; set; } + public Option CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// [DataMember(Name = "small_Snake", EmitDefaultValue = false)] - public string SmallSnake { get; set; } + public Option SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] - public string CapitalSnake { get; set; } + public Option CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] - public string SCAETHFlowPoints { get; set; } + public Option SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] - public string ATT_NAME { get; set; } + public Option ATT_NAME { get; set; } /// /// Returns the string presentation of the object @@ -144,29 +175,29 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SmallCamel != null) + if (this.SmallCamel.IsSet && this.SmallCamel.Value != null) { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallCamel.Value.GetHashCode(); } - if (this.CapitalCamel != null) + if (this.CapitalCamel.IsSet && this.CapitalCamel.Value != null) { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalCamel.Value.GetHashCode(); } - if (this.SmallSnake != null) + if (this.SmallSnake.IsSet && this.SmallSnake.Value != null) { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallSnake.Value.GetHashCode(); } - if (this.CapitalSnake != null) + if (this.CapitalSnake.IsSet && this.CapitalSnake.Value != null) { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalSnake.Value.GetHashCode(); } - if (this.SCAETHFlowPoints != null) + if (this.SCAETHFlowPoints.IsSet && this.SCAETHFlowPoints.Value != null) { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); + hashCode = (hashCode * 59) + this.SCAETHFlowPoints.Value.GetHashCode(); } - if (this.ATT_NAME != null) + if (this.ATT_NAME.IsSet && this.ATT_NAME.Value != null) { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); + hashCode = (hashCode * 59) + this.ATT_NAME.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Cat.cs index 8bec3551ae9f..13f0b663ed5b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,7 +46,7 @@ protected Cat() { } /// declawed. /// className (required) (default to "Cat"). /// color (default to "red"). - public Cat(bool declawed = default(bool), string className = @"Cat", string color = @"red") : base(className, color) + public Cat(Option declawed = default(Option), string className = @"Cat", Option color = default(Option)) : base(className, color) { this.Declawed = declawed; } @@ -54,7 +55,7 @@ protected Cat() { } /// Gets or Sets Declawed /// [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed { get; set; } + public Option Declawed { get; set; } /// /// Returns the string presentation of the object @@ -108,7 +109,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); + if (this.Declawed.IsSet) + { + hashCode = (hashCode * 59) + this.Declawed.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Category.cs index 85ea41da1a6c..090e15895cd6 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,22 +43,22 @@ protected Category() { } /// /// id. /// name (required) (default to "default-name"). - public Category(long id = default(long), string name = @"default-name") + public Category(Option id = default(Option), string name = @"default-name") { - // to ensure "name" is required (not null) + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); } - this.Name = name; this.Id = id; + this.Name = name; } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name @@ -117,7 +118,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index dada42c5f3f6..8a4720b7e594 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -63,17 +64,22 @@ protected ChildCat() { } /// /// name. /// petType (required) (default to PetTypeEnum.ChildCat). - public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() + public ChildCat(Option name = default(Option), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.PetType = petType; + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for ChildCat and cannot be null"); + } this.Name = name; + this.PetType = petType; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.PetType.GetHashCode(); return hashCode; diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index f8060109b1a7..fc5fbae9d301 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClass. - public ClassModel(string varClass = default(string)) + public ClassModel(Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for ClassModel and cannot be null"); + } this.Class = varClass; } @@ -45,7 +51,7 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Gets or Sets Class /// [DataMember(Name = "_class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Class != null) + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index e399bfda5665..5afdef27b7c3 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,17 +45,17 @@ protected ComplexQuadrilateral() { } /// quadrilateralType (required). public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 686dab1558ed..097bdc3d0dd0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,10 +44,10 @@ protected DanishPig() { } /// className (required). public DanishPig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for DanishPig and cannot be null"); } this.ClassName = className; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index a8f04b3453de..32273a046352 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// dateOnlyProperty. - public DateOnlyClass(DateOnly dateOnlyProperty = default(DateOnly)) + public DateOnlyClass(Option dateOnlyProperty = default(Option)) { + // to ensure "dateOnlyProperty" (not nullable) is not null + if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) + { + throw new ArgumentNullException("dateOnlyProperty isn't a nullable property for DateOnlyClass and cannot be null"); + } this.DateOnlyProperty = dateOnlyProperty; } @@ -46,7 +52,7 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// /// Fri Jul 21 00:00:00 UTC 2017 [DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)] - public DateOnly DateOnlyProperty { get; set; } + public Option DateOnlyProperty { get; set; } /// /// Returns the string presentation of the object @@ -99,9 +105,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.DateOnlyProperty != null) + if (this.DateOnlyProperty.IsSet && this.DateOnlyProperty.Value != null) { - hashCode = (hashCode * 59) + this.DateOnlyProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.DateOnlyProperty.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index a852e8c459a1..aae722092d42 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Initializes a new instance of the class. /// /// name. - public DeprecatedObject(string name = default(string)) + public DeprecatedObject(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for DeprecatedObject and cannot be null"); + } this.Name = name; } @@ -45,7 +51,7 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Dog.cs index e2339cfb20bf..3d3896f075cc 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,8 +46,13 @@ protected Dog() { } /// breed. /// className (required) (default to "Dog"). /// color (default to "red"). - public Dog(string breed = default(string), string className = @"Dog", string color = @"red") : base(className, color) + public Dog(Option breed = default(Option), string className = @"Dog", Option color = default(Option)) : base(className, color) { + // to ensure "breed" (not nullable) is not null + if (breed.IsSet && breed.Value == null) + { + throw new ArgumentNullException("breed isn't a nullable property for Dog and cannot be null"); + } this.Breed = breed; } @@ -54,7 +60,7 @@ protected Dog() { } /// Gets or Sets Breed /// [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed { get; set; } + public Option Breed { get; set; } /// /// Returns the string presentation of the object @@ -108,9 +114,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) + if (this.Breed.IsSet && this.Breed.Value != null) { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); + hashCode = (hashCode * 59) + this.Breed.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 98c683539e6f..64341b1a550e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,18 @@ public partial class Drawing : IEquatable, IValidatableObject /// shapeOrNull. /// nullableShape. /// shapes. - public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) + public Drawing(Option mainShape = default(Option), Option shapeOrNull = default(Option), Option nullableShape = default(Option), Option> shapes = default(Option>)) { + // to ensure "mainShape" (not nullable) is not null + if (mainShape.IsSet && mainShape.Value == null) + { + throw new ArgumentNullException("mainShape isn't a nullable property for Drawing and cannot be null"); + } + // to ensure "shapes" (not nullable) is not null + if (shapes.IsSet && shapes.Value == null) + { + throw new ArgumentNullException("shapes isn't a nullable property for Drawing and cannot be null"); + } this.MainShape = mainShape; this.ShapeOrNull = shapeOrNull; this.NullableShape = nullableShape; @@ -52,25 +63,25 @@ public partial class Drawing : IEquatable, IValidatableObject /// Gets or Sets MainShape /// [DataMember(Name = "mainShape", EmitDefaultValue = false)] - public Shape MainShape { get; set; } + public Option MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// [DataMember(Name = "shapeOrNull", EmitDefaultValue = true)] - public ShapeOrNull ShapeOrNull { get; set; } + public Option ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// [DataMember(Name = "nullableShape", EmitDefaultValue = true)] - public NullableShape NullableShape { get; set; } + public Option NullableShape { get; set; } /// /// Gets or Sets Shapes /// [DataMember(Name = "shapes", EmitDefaultValue = false)] - public List Shapes { get; set; } + public Option> Shapes { get; set; } /// /// Gets or Sets additional properties @@ -133,21 +144,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MainShape != null) + if (this.MainShape.IsSet && this.MainShape.Value != null) { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); + hashCode = (hashCode * 59) + this.MainShape.Value.GetHashCode(); } - if (this.ShapeOrNull != null) + if (this.ShapeOrNull.IsSet && this.ShapeOrNull.Value != null) { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); + hashCode = (hashCode * 59) + this.ShapeOrNull.Value.GetHashCode(); } - if (this.NullableShape != null) + if (this.NullableShape.IsSet && this.NullableShape.Value != null) { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableShape.Value.GetHashCode(); } - if (this.Shapes != null) + if (this.Shapes.IsSet && this.Shapes.Value != null) { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); + hashCode = (hashCode * 59) + this.Shapes.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 55dab0b979fe..cb1a96d6a521 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,7 +57,7 @@ public enum JustSymbolEnum /// Gets or Sets JustSymbol /// [DataMember(Name = "just_symbol", EmitDefaultValue = false)] - public JustSymbolEnum? JustSymbol { get; set; } + public Option JustSymbol { get; set; } /// /// Defines ArrayEnum /// @@ -81,8 +82,13 @@ public enum ArrayEnumEnum /// /// justSymbol. /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) + public EnumArrays(Option justSymbol = default(Option), Option> arrayEnum = default(Option>)) { + // to ensure "arrayEnum" (not nullable) is not null + if (arrayEnum.IsSet && arrayEnum.Value == null) + { + throw new ArgumentNullException("arrayEnum isn't a nullable property for EnumArrays and cannot be null"); + } this.JustSymbol = justSymbol; this.ArrayEnum = arrayEnum; } @@ -91,7 +97,7 @@ public enum ArrayEnumEnum /// Gets or Sets ArrayEnum /// [DataMember(Name = "array_enum", EmitDefaultValue = false)] - public List ArrayEnum { get; set; } + public Option> ArrayEnum { get; set; } /// /// Returns the string presentation of the object @@ -145,10 +151,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) + if (this.JustSymbol.IsSet) + { + hashCode = (hashCode * 59) + this.JustSymbol.Value.GetHashCode(); + } + if (this.ArrayEnum.IsSet && this.ArrayEnum.Value != null) { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayEnum.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs index c47540b557a3..eb2aa0bd1217 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index bf17521990cd..0af565a2f7ba 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -92,7 +93,7 @@ public enum EnumStringEnum /// Gets or Sets EnumString /// [DataMember(Name = "enum_string", EmitDefaultValue = false)] - public EnumStringEnum? EnumString { get; set; } + public Option EnumString { get; set; } /// /// Defines EnumStringRequired /// @@ -175,7 +176,7 @@ public enum EnumIntegerEnum /// Gets or Sets EnumInteger /// [DataMember(Name = "enum_integer", EmitDefaultValue = false)] - public EnumIntegerEnum? EnumInteger { get; set; } + public Option EnumInteger { get; set; } /// /// Defines EnumIntegerOnly /// @@ -197,7 +198,7 @@ public enum EnumIntegerOnlyEnum /// Gets or Sets EnumIntegerOnly /// [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] - public EnumIntegerOnlyEnum? EnumIntegerOnly { get; set; } + public Option EnumIntegerOnly { get; set; } /// /// Defines EnumNumber /// @@ -222,31 +223,31 @@ public enum EnumNumberEnum /// Gets or Sets EnumNumber /// [DataMember(Name = "enum_number", EmitDefaultValue = false)] - public EnumNumberEnum? EnumNumber { get; set; } + public Option EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// [DataMember(Name = "outerEnum", EmitDefaultValue = true)] - public OuterEnum? OuterEnum { get; set; } + public Option OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] - public OuterEnumInteger? OuterEnumInteger { get; set; } + public Option OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } + public Option OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } + public Option OuterEnumIntegerDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -264,10 +265,10 @@ protected EnumTest() { } /// outerEnumInteger. /// outerEnumDefaultValue. /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumIntegerOnlyEnum? enumIntegerOnly = default(EnumIntegerOnlyEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) + public EnumTest(Option enumString = default(Option), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), Option enumInteger = default(Option), Option enumIntegerOnly = default(Option), Option enumNumber = default(Option), Option outerEnum = default(Option), Option outerEnumInteger = default(Option), Option outerEnumDefaultValue = default(Option), Option outerEnumIntegerDefaultValue = default(Option)) { - this.EnumStringRequired = enumStringRequired; this.EnumString = enumString; + this.EnumStringRequired = enumStringRequired; this.EnumInteger = enumInteger; this.EnumIntegerOnly = enumIntegerOnly; this.EnumNumber = enumNumber; @@ -336,15 +337,39 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); + if (this.EnumString.IsSet) + { + hashCode = (hashCode * 59) + this.EnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); + if (this.EnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.EnumInteger.Value.GetHashCode(); + } + if (this.EnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.EnumIntegerOnly.Value.GetHashCode(); + } + if (this.EnumNumber.IsSet) + { + hashCode = (hashCode * 59) + this.EnumNumber.Value.GetHashCode(); + } + if (this.OuterEnum.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnum.Value.GetHashCode(); + } + if (this.OuterEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumInteger.Value.GetHashCode(); + } + if (this.OuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.OuterEnumIntegerDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 738f9450e1d2..9a24e5316e57 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,17 +45,17 @@ protected EquilateralTriangle() { } /// triangleType (required). public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for EquilateralTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for EquilateralTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/File.cs index 328601f24b6c..f3cf799aa9cf 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class File : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// Test capitalization. - public File(string sourceURI = default(string)) + public File(Option sourceURI = default(Option)) { + // to ensure "sourceURI" (not nullable) is not null + if (sourceURI.IsSet && sourceURI.Value == null) + { + throw new ArgumentNullException("sourceURI isn't a nullable property for File and cannot be null"); + } this.SourceURI = sourceURI; } @@ -46,7 +52,7 @@ public partial class File : IEquatable, IValidatableObject /// /// Test capitalization [DataMember(Name = "sourceURI", EmitDefaultValue = false)] - public string SourceURI { get; set; } + public Option SourceURI { get; set; } /// /// Returns the string presentation of the object @@ -99,9 +105,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SourceURI != null) + if (this.SourceURI.IsSet && this.SourceURI.Value != null) { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); + hashCode = (hashCode * 59) + this.SourceURI.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index d3f9f7cba774..51c68a0598ba 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// /// file. /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) + public FileSchemaTestClass(Option file = default(Option), Option> files = default(Option>)) { + // to ensure "file" (not nullable) is not null + if (file.IsSet && file.Value == null) + { + throw new ArgumentNullException("file isn't a nullable property for FileSchemaTestClass and cannot be null"); + } + // to ensure "files" (not nullable) is not null + if (files.IsSet && files.Value == null) + { + throw new ArgumentNullException("files isn't a nullable property for FileSchemaTestClass and cannot be null"); + } this.File = file; this.Files = files; } @@ -47,13 +58,13 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// Gets or Sets File /// [DataMember(Name = "file", EmitDefaultValue = false)] - public File File { get; set; } + public Option File { get; set; } /// /// Gets or Sets Files /// [DataMember(Name = "files", EmitDefaultValue = false)] - public List Files { get; set; } + public Option> Files { get; set; } /// /// Returns the string presentation of the object @@ -107,13 +118,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.File != null) + if (this.File.IsSet && this.File.Value != null) { - hashCode = (hashCode * 59) + this.File.GetHashCode(); + hashCode = (hashCode * 59) + this.File.Value.GetHashCode(); } - if (this.Files != null) + if (this.Files.IsSet && this.Files.Value != null) { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); + hashCode = (hashCode * 59) + this.Files.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 9691b4848101..a72dc75ea28f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,17 +37,21 @@ public partial class Foo : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// bar (default to "bar"). - public Foo(string bar = @"bar") + public Foo(Option bar = default(Option)) { - // use default value if no "bar" provided - this.Bar = bar ?? @"bar"; + // to ensure "bar" (not nullable) is not null + if (bar.IsSet && bar.Value == null) + { + throw new ArgumentNullException("bar isn't a nullable property for Foo and cannot be null"); + } + this.Bar = bar.IsSet ? bar : new Option(@"bar"); } /// /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; set; } + public Option Bar { get; set; } /// /// Returns the string presentation of the object @@ -99,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 3069deb125e7..f4f7c693f9a9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class FooGetDefaultResponse : IEquatable, /// Initializes a new instance of the class. /// /// varString. - public FooGetDefaultResponse(Foo varString = default(Foo)) + public FooGetDefaultResponse(Option varString = default(Option)) { + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FooGetDefaultResponse and cannot be null"); + } this.String = varString; } @@ -45,7 +51,7 @@ public partial class FooGetDefaultResponse : IEquatable, /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public Foo String { get; set; } + public Option String { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.String != null) + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 4ca4eff5ca46..aae79f514e45 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -59,39 +60,74 @@ protected FormatTest() { } /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(Option integer = default(Option), Option int32 = default(Option), Option unsignedInteger = default(Option), Option int64 = default(Option), Option unsignedLong = default(Option), decimal number = default(decimal), Option varFloat = default(Option), Option varDouble = default(Option), Option varDecimal = default(Option), Option varString = default(Option), byte[] varByte = default(byte[]), Option binary = default(Option), DateOnly date = default(DateOnly), Option dateTime = default(Option), Option uuid = default(Option), string password = default(string), Option patternWithDigits = default(Option), Option patternWithDigitsAndDelimiter = default(Option), Option patternWithBackslash = default(Option)) { - this.Number = number; - // to ensure "varByte" is required (not null) + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "varByte" (not nullable) is not null if (varByte == null) { - throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("varByte isn't a nullable property for FormatTest and cannot be null"); } - this.Byte = varByte; - // to ensure "date" is required (not null) + // to ensure "binary" (not nullable) is not null + if (binary.IsSet && binary.Value == null) + { + throw new ArgumentNullException("binary isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "date" (not nullable) is not null if (date == null) { - throw new ArgumentNullException("date is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("date isn't a nullable property for FormatTest and cannot be null"); } - this.Date = date; - // to ensure "password" is required (not null) + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "password" (not nullable) is not null if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("password isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigits" (not nullable) is not null + if (patternWithDigits.IsSet && patternWithDigits.Value == null) + { + throw new ArgumentNullException("patternWithDigits isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigitsAndDelimiter" (not nullable) is not null + if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) + { + throw new ArgumentNullException("patternWithDigitsAndDelimiter isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithBackslash" (not nullable) is not null + if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) + { + throw new ArgumentNullException("patternWithBackslash isn't a nullable property for FormatTest and cannot be null"); } - this.Password = password; this.Integer = integer; this.Int32 = int32; this.UnsignedInteger = unsignedInteger; this.Int64 = int64; this.UnsignedLong = unsignedLong; + this.Number = number; this.Float = varFloat; this.Double = varDouble; this.Decimal = varDecimal; this.String = varString; + this.Byte = varByte; this.Binary = binary; + this.Date = date; this.DateTime = dateTime; this.Uuid = uuid; + this.Password = password; this.PatternWithDigits = patternWithDigits; this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; this.PatternWithBackslash = patternWithBackslash; @@ -101,31 +137,31 @@ protected FormatTest() { } /// Gets or Sets Integer /// [DataMember(Name = "integer", EmitDefaultValue = false)] - public int Integer { get; set; } + public Option Integer { get; set; } /// /// Gets or Sets Int32 /// [DataMember(Name = "int32", EmitDefaultValue = false)] - public int Int32 { get; set; } + public Option Int32 { get; set; } /// /// Gets or Sets UnsignedInteger /// [DataMember(Name = "unsigned_integer", EmitDefaultValue = false)] - public uint UnsignedInteger { get; set; } + public Option UnsignedInteger { get; set; } /// /// Gets or Sets Int64 /// [DataMember(Name = "int64", EmitDefaultValue = false)] - public long Int64 { get; set; } + public Option Int64 { get; set; } /// /// Gets or Sets UnsignedLong /// [DataMember(Name = "unsigned_long", EmitDefaultValue = false)] - public ulong UnsignedLong { get; set; } + public Option UnsignedLong { get; set; } /// /// Gets or Sets Number @@ -137,25 +173,25 @@ protected FormatTest() { } /// Gets or Sets Float /// [DataMember(Name = "float", EmitDefaultValue = false)] - public float Float { get; set; } + public Option Float { get; set; } /// /// Gets or Sets Double /// [DataMember(Name = "double", EmitDefaultValue = false)] - public double Double { get; set; } + public Option Double { get; set; } /// /// Gets or Sets Decimal /// [DataMember(Name = "decimal", EmitDefaultValue = false)] - public decimal Decimal { get; set; } + public Option Decimal { get; set; } /// /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public string String { get; set; } + public Option String { get; set; } /// /// Gets or Sets Byte @@ -167,7 +203,7 @@ protected FormatTest() { } /// Gets or Sets Binary /// [DataMember(Name = "binary", EmitDefaultValue = false)] - public System.IO.Stream Binary { get; set; } + public Option Binary { get; set; } /// /// Gets or Sets Date @@ -181,14 +217,14 @@ protected FormatTest() { } /// /// 2007-12-03T10:15:30+01:00 [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Uuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Password @@ -201,21 +237,21 @@ protected FormatTest() { } /// /// A string that is a 10 digit number. Can have leading zeros. [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] - public string PatternWithDigits { get; set; } + public Option PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] - public string PatternWithDigitsAndDelimiter { get; set; } + public Option PatternWithDigitsAndDelimiter { get; set; } /// /// None /// /// None [DataMember(Name = "pattern_with_backslash", EmitDefaultValue = false)] - public string PatternWithBackslash { get; set; } + public Option PatternWithBackslash { get; set; } /// /// Returns the string presentation of the object @@ -286,54 +322,78 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode(); + if (this.Integer.IsSet) + { + hashCode = (hashCode * 59) + this.Integer.Value.GetHashCode(); + } + if (this.Int32.IsSet) + { + hashCode = (hashCode * 59) + this.Int32.Value.GetHashCode(); + } + if (this.UnsignedInteger.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedInteger.Value.GetHashCode(); + } + if (this.Int64.IsSet) + { + hashCode = (hashCode * 59) + this.Int64.Value.GetHashCode(); + } + if (this.UnsignedLong.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedLong.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.Number.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) + if (this.Float.IsSet) + { + hashCode = (hashCode * 59) + this.Float.Value.GetHashCode(); + } + if (this.Double.IsSet) + { + hashCode = (hashCode * 59) + this.Double.Value.GetHashCode(); + } + if (this.Decimal.IsSet) + { + hashCode = (hashCode * 59) + this.Decimal.Value.GetHashCode(); + } + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.Byte != null) { hashCode = (hashCode * 59) + this.Byte.GetHashCode(); } - if (this.Binary != null) + if (this.Binary.IsSet && this.Binary.Value != null) { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); + hashCode = (hashCode * 59) + this.Binary.Value.GetHashCode(); } if (this.Date != null) { hashCode = (hashCode * 59) + this.Date.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.Password != null) { hashCode = (hashCode * 59) + this.Password.GetHashCode(); } - if (this.PatternWithDigits != null) + if (this.PatternWithDigits.IsSet && this.PatternWithDigits.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigits.Value.GetHashCode(); } - if (this.PatternWithDigitsAndDelimiter != null) + if (this.PatternWithDigitsAndDelimiter.IsSet && this.PatternWithDigitsAndDelimiter.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.Value.GetHashCode(); } - if (this.PatternWithBackslash != null) + if (this.PatternWithBackslash.IsSet && this.PatternWithBackslash.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithBackslash.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithBackslash.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index 5e0d760c369f..637e088e9ea9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs index 3772b99bdb42..5626c5152e3c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index c22ccd6ebb50..bf63b65e7b74 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 369b95edbd12..14872823162f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,10 +48,10 @@ protected GrandparentAnimal() { } /// petType (required). public GrandparentAnimal(string petType = default(string)) { - // to ensure "petType" is required (not null) + // to ensure "petType" (not nullable) is not null if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); + throw new ArgumentNullException("petType isn't a nullable property for GrandparentAnimal and cannot be null"); } this.PetType = petType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 712d33733e8d..14f697589f46 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,7 +45,7 @@ public HasOnlyReadOnly() /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -58,7 +59,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Foo /// [DataMember(Name = "foo", EmitDefaultValue = false)] - public string Foo { get; private set; } + public Option Foo { get; private set; } /// /// Returns false as Foo should not be serialized given that it's read-only. @@ -120,13 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Foo != null) + if (this.Foo.IsSet && this.Foo.Value != null) { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); + hashCode = (hashCode * 59) + this.Foo.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index ec05e7c4c85a..44ab456f84bd 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Initializes a new instance of the class. /// /// nullableMessage. - public HealthCheckResult(string nullableMessage = default(string)) + public HealthCheckResult(Option nullableMessage = default(Option)) { this.NullableMessage = nullableMessage; } @@ -45,7 +46,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Gets or Sets NullableMessage /// [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] - public string NullableMessage { get; set; } + public Option NullableMessage { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +99,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.NullableMessage != null) + if (this.NullableMessage.IsSet && this.NullableMessage.Value != null) { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableMessage.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index acf86063d050..9b860ce985ee 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,17 +45,17 @@ protected IsoscelesTriangle() { } /// triangleType (required). public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for IsoscelesTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for IsoscelesTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/List.cs index 67e6c5a616a1..05353b9964ce 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class List : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// var123List. - public List(string var123List = default(string)) + public List(Option var123List = default(Option)) { + // to ensure "var123List" (not nullable) is not null + if (var123List.IsSet && var123List.Value == null) + { + throw new ArgumentNullException("var123List isn't a nullable property for List and cannot be null"); + } this.Var123List = var123List; } @@ -45,7 +51,7 @@ public partial class List : IEquatable, IValidatableObject /// Gets or Sets Var123List /// [DataMember(Name = "123-list", EmitDefaultValue = false)] - public string Var123List { get; set; } + public Option Var123List { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Var123List != null) + if (this.Var123List.IsSet && this.Var123List.Value != null) { - hashCode = (hashCode * 59) + this.Var123List.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123List.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 15b6f0eabba9..d51d21a8e290 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,25 +38,33 @@ public partial class LiteralStringClass : IEquatable, IValid /// /// escapedLiteralString (default to "C:\\Users\\username"). /// unescapedLiteralString (default to "C:\Users\username"). - public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", string unescapedLiteralString = @"C:\Users\username") + public LiteralStringClass(Option escapedLiteralString = default(Option), Option unescapedLiteralString = default(Option)) { - // use default value if no "escapedLiteralString" provided - this.EscapedLiteralString = escapedLiteralString ?? @"C:\\Users\\username"; - // use default value if no "unescapedLiteralString" provided - this.UnescapedLiteralString = unescapedLiteralString ?? @"C:\Users\username"; + // to ensure "escapedLiteralString" (not nullable) is not null + if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) + { + throw new ArgumentNullException("escapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + // to ensure "unescapedLiteralString" (not nullable) is not null + if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) + { + throw new ArgumentNullException("unescapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + this.EscapedLiteralString = escapedLiteralString.IsSet ? escapedLiteralString : new Option(@"C:\\Users\\username"); + this.UnescapedLiteralString = unescapedLiteralString.IsSet ? unescapedLiteralString : new Option(@"C:\Users\username"); } /// /// Gets or Sets EscapedLiteralString /// [DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)] - public string EscapedLiteralString { get; set; } + public Option EscapedLiteralString { get; set; } /// /// Gets or Sets UnescapedLiteralString /// [DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)] - public string UnescapedLiteralString { get; set; } + public Option UnescapedLiteralString { get; set; } /// /// Returns the string presentation of the object @@ -109,13 +118,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.EscapedLiteralString != null) + if (this.EscapedLiteralString.IsSet && this.EscapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.EscapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.EscapedLiteralString.Value.GetHashCode(); } - if (this.UnescapedLiteralString != null) + if (this.UnescapedLiteralString.IsSet && this.UnescapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.UnescapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.UnescapedLiteralString.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index b70d2d9c7693..ae3641f13f3f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 70075c576b1e..25250fc25d1b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -58,8 +59,28 @@ public enum InnerEnum /// mapOfEnumString. /// directMap. /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + public MapTest(Option>> mapMapOfString = default(Option>>), Option> mapOfEnumString = default(Option>), Option> directMap = default(Option>), Option> indirectMap = default(Option>)) { + // to ensure "mapMapOfString" (not nullable) is not null + if (mapMapOfString.IsSet && mapMapOfString.Value == null) + { + throw new ArgumentNullException("mapMapOfString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "mapOfEnumString" (not nullable) is not null + if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) + { + throw new ArgumentNullException("mapOfEnumString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "directMap" (not nullable) is not null + if (directMap.IsSet && directMap.Value == null) + { + throw new ArgumentNullException("directMap isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "indirectMap" (not nullable) is not null + if (indirectMap.IsSet && indirectMap.Value == null) + { + throw new ArgumentNullException("indirectMap isn't a nullable property for MapTest and cannot be null"); + } this.MapMapOfString = mapMapOfString; this.MapOfEnumString = mapOfEnumString; this.DirectMap = directMap; @@ -70,25 +91,25 @@ public enum InnerEnum /// Gets or Sets MapMapOfString /// [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] - public Dictionary> MapMapOfString { get; set; } + public Option>> MapMapOfString { get; set; } /// /// Gets or Sets MapOfEnumString /// [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] - public Dictionary MapOfEnumString { get; set; } + public Option> MapOfEnumString { get; set; } /// /// Gets or Sets DirectMap /// [DataMember(Name = "direct_map", EmitDefaultValue = false)] - public Dictionary DirectMap { get; set; } + public Option> DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// [DataMember(Name = "indirect_map", EmitDefaultValue = false)] - public Dictionary IndirectMap { get; set; } + public Option> IndirectMap { get; set; } /// /// Returns the string presentation of the object @@ -144,21 +165,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapMapOfString != null) + if (this.MapMapOfString.IsSet && this.MapMapOfString.Value != null) { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapMapOfString.Value.GetHashCode(); } - if (this.MapOfEnumString != null) + if (this.MapOfEnumString.IsSet && this.MapOfEnumString.Value != null) { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfEnumString.Value.GetHashCode(); } - if (this.DirectMap != null) + if (this.DirectMap.IsSet && this.DirectMap.Value != null) { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.DirectMap.Value.GetHashCode(); } - if (this.IndirectMap != null) + if (this.IndirectMap.IsSet && this.IndirectMap.Value != null) { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.IndirectMap.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs index 6dbe8fdadda5..75a759090ebd 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -72,23 +73,138 @@ protected MixLog() { } /// ProductId is only required for color mixes. /// ProductName is only required for color mixes. /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) + public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Option shopId = default(Option), Option totalPrice = default(Option), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), Option someCode = default(Option), Option batchNumber = default(Option), Option brandCode = default(Option), Option brandId = default(Option), Option brandName = default(Option), Option categoryCode = default(Option), Option color = default(Option), Option colorDescription = default(Option), Option comment = default(Option), Option commercialProductCode = default(Option), Option productLineCode = default(Option), Option country = default(Option), Option createdBy = default(Option), Option createdByFirstName = default(Option), Option createdByLastName = default(Option), Option deltaECalculationRepaired = default(Option), Option deltaECalculationSprayout = default(Option), Option ownColorVariantNumber = default(Option), Option primerProductId = default(Option), Option productId = default(Option), Option productName = default(Option), Option selectedVersionIndex = default(Option)) { - this.Id = id; - // to ensure "description" is required (not null) + // to ensure "id" (not nullable) is not null + if (id == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "description" (not nullable) is not null if (description == null) { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); + throw new ArgumentNullException("description isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "mixDate" (not nullable) is not null + if (mixDate == null) + { + throw new ArgumentNullException("mixDate isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "shopId" (not nullable) is not null + if (shopId.IsSet && shopId.Value == null) + { + throw new ArgumentNullException("shopId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "formulaVersionDate" (not nullable) is not null + if (formulaVersionDate == null) + { + throw new ArgumentNullException("formulaVersionDate isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "batchNumber" (not nullable) is not null + if (batchNumber.IsSet && batchNumber.Value == null) + { + throw new ArgumentNullException("batchNumber isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandCode" (not nullable) is not null + if (brandCode.IsSet && brandCode.Value == null) + { + throw new ArgumentNullException("brandCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandId" (not nullable) is not null + if (brandId.IsSet && brandId.Value == null) + { + throw new ArgumentNullException("brandId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandName" (not nullable) is not null + if (brandName.IsSet && brandName.Value == null) + { + throw new ArgumentNullException("brandName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "categoryCode" (not nullable) is not null + if (categoryCode.IsSet && categoryCode.Value == null) + { + throw new ArgumentNullException("categoryCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "colorDescription" (not nullable) is not null + if (colorDescription.IsSet && colorDescription.Value == null) + { + throw new ArgumentNullException("colorDescription isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "comment" (not nullable) is not null + if (comment.IsSet && comment.Value == null) + { + throw new ArgumentNullException("comment isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "commercialProductCode" (not nullable) is not null + if (commercialProductCode.IsSet && commercialProductCode.Value == null) + { + throw new ArgumentNullException("commercialProductCode isn't a nullable property for MixLog and cannot be null"); } + // to ensure "productLineCode" (not nullable) is not null + if (productLineCode.IsSet && productLineCode.Value == null) + { + throw new ArgumentNullException("productLineCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "country" (not nullable) is not null + if (country.IsSet && country.Value == null) + { + throw new ArgumentNullException("country isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdBy" (not nullable) is not null + if (createdBy.IsSet && createdBy.Value == null) + { + throw new ArgumentNullException("createdBy isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdByFirstName" (not nullable) is not null + if (createdByFirstName.IsSet && createdByFirstName.Value == null) + { + throw new ArgumentNullException("createdByFirstName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdByLastName" (not nullable) is not null + if (createdByLastName.IsSet && createdByLastName.Value == null) + { + throw new ArgumentNullException("createdByLastName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "deltaECalculationRepaired" (not nullable) is not null + if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) + { + throw new ArgumentNullException("deltaECalculationRepaired isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "deltaECalculationSprayout" (not nullable) is not null + if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) + { + throw new ArgumentNullException("deltaECalculationSprayout isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "primerProductId" (not nullable) is not null + if (primerProductId.IsSet && primerProductId.Value == null) + { + throw new ArgumentNullException("primerProductId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "productId" (not nullable) is not null + if (productId.IsSet && productId.Value == null) + { + throw new ArgumentNullException("productId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "productName" (not nullable) is not null + if (productName.IsSet && productName.Value == null) + { + throw new ArgumentNullException("productName isn't a nullable property for MixLog and cannot be null"); + } + this.Id = id; this.Description = description; this.MixDate = mixDate; + this.ShopId = shopId; + this.TotalPrice = totalPrice; this.TotalRecalculations = totalRecalculations; this.TotalOverPoors = totalOverPoors; this.TotalSkips = totalSkips; this.TotalUnderPours = totalUnderPours; this.FormulaVersionDate = formulaVersionDate; - this.ShopId = shopId; - this.TotalPrice = totalPrice; this.SomeCode = someCode; this.BatchNumber = batchNumber; this.BrandCode = brandCode; @@ -135,13 +251,13 @@ protected MixLog() { } /// Gets or Sets ShopId /// [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId { get; set; } + public Option ShopId { get; set; } /// /// Gets or Sets TotalPrice /// [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice { get; set; } + public Option TotalPrice { get; set; } /// /// Gets or Sets TotalRecalculations @@ -178,141 +294,141 @@ protected MixLog() { } /// /// SomeCode is only required for color mixes [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode { get; set; } + public Option SomeCode { get; set; } /// /// Gets or Sets BatchNumber /// [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber { get; set; } + public Option BatchNumber { get; set; } /// /// BrandCode is only required for non-color mixes /// /// BrandCode is only required for non-color mixes [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode { get; set; } + public Option BrandCode { get; set; } /// /// BrandId is only required for color mixes /// /// BrandId is only required for color mixes [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId { get; set; } + public Option BrandId { get; set; } /// /// BrandName is only required for color mixes /// /// BrandName is only required for color mixes [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName { get; set; } + public Option BrandName { get; set; } /// /// CategoryCode is not used anymore /// /// CategoryCode is not used anymore [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode { get; set; } + public Option CategoryCode { get; set; } /// /// Color is only required for color mixes /// /// Color is only required for color mixes [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Gets or Sets ColorDescription /// [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription { get; set; } + public Option ColorDescription { get; set; } /// /// Gets or Sets Comment /// [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment { get; set; } + public Option Comment { get; set; } /// /// Gets or Sets CommercialProductCode /// [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode { get; set; } + public Option CommercialProductCode { get; set; } /// /// ProductLineCode is only required for color mixes /// /// ProductLineCode is only required for color mixes [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode { get; set; } + public Option ProductLineCode { get; set; } /// /// Gets or Sets Country /// [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } + public Option Country { get; set; } /// /// Gets or Sets CreatedBy /// [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy { get; set; } + public Option CreatedBy { get; set; } /// /// Gets or Sets CreatedByFirstName /// [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName { get; set; } + public Option CreatedByFirstName { get; set; } /// /// Gets or Sets CreatedByLastName /// [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName { get; set; } + public Option CreatedByLastName { get; set; } /// /// Gets or Sets DeltaECalculationRepaired /// [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired { get; set; } + public Option DeltaECalculationRepaired { get; set; } /// /// Gets or Sets DeltaECalculationSprayout /// [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout { get; set; } + public Option DeltaECalculationSprayout { get; set; } /// /// Gets or Sets OwnColorVariantNumber /// [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber { get; set; } + public Option OwnColorVariantNumber { get; set; } /// /// Gets or Sets PrimerProductId /// [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId { get; set; } + public Option PrimerProductId { get; set; } /// /// ProductId is only required for color mixes /// /// ProductId is only required for color mixes [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId { get; set; } + public Option ProductId { get; set; } /// /// ProductName is only required for color mixes /// /// ProductName is only required for color mixes [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName { get; set; } + public Option ProductName { get; set; } /// /// Gets or Sets SelectedVersionIndex /// [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex { get; set; } + public Option SelectedVersionIndex { get; set; } /// /// Returns the string presentation of the object @@ -408,13 +524,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); } - if (this.ShopId != null) + if (this.ShopId.IsSet && this.ShopId.Value != null) { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); + hashCode = (hashCode * 59) + this.ShopId.Value.GetHashCode(); } - if (this.TotalPrice != null) + if (this.TotalPrice.IsSet) { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPrice.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); @@ -424,91 +540,94 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); } - if (this.SomeCode != null) + if (this.SomeCode.IsSet && this.SomeCode.Value != null) + { + hashCode = (hashCode * 59) + this.SomeCode.Value.GetHashCode(); + } + if (this.BatchNumber.IsSet && this.BatchNumber.Value != null) { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); + hashCode = (hashCode * 59) + this.BatchNumber.Value.GetHashCode(); } - if (this.BatchNumber != null) + if (this.BrandCode.IsSet && this.BrandCode.Value != null) { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandCode.Value.GetHashCode(); } - if (this.BrandCode != null) + if (this.BrandId.IsSet && this.BrandId.Value != null) { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandId.Value.GetHashCode(); } - if (this.BrandId != null) + if (this.BrandName.IsSet && this.BrandName.Value != null) { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandName.Value.GetHashCode(); } - if (this.BrandName != null) + if (this.CategoryCode.IsSet && this.CategoryCode.Value != null) { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); + hashCode = (hashCode * 59) + this.CategoryCode.Value.GetHashCode(); } - if (this.CategoryCode != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } - if (this.Color != null) + if (this.ColorDescription.IsSet && this.ColorDescription.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorDescription.Value.GetHashCode(); } - if (this.ColorDescription != null) + if (this.Comment.IsSet && this.Comment.Value != null) { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); + hashCode = (hashCode * 59) + this.Comment.Value.GetHashCode(); } - if (this.Comment != null) + if (this.CommercialProductCode.IsSet && this.CommercialProductCode.Value != null) { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); + hashCode = (hashCode * 59) + this.CommercialProductCode.Value.GetHashCode(); } - if (this.CommercialProductCode != null) + if (this.ProductLineCode.IsSet && this.ProductLineCode.Value != null) { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductLineCode.Value.GetHashCode(); } - if (this.ProductLineCode != null) + if (this.Country.IsSet && this.Country.Value != null) { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); + hashCode = (hashCode * 59) + this.Country.Value.GetHashCode(); } - if (this.Country != null) + if (this.CreatedBy.IsSet && this.CreatedBy.Value != null) { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedBy.Value.GetHashCode(); } - if (this.CreatedBy != null) + if (this.CreatedByFirstName.IsSet && this.CreatedByFirstName.Value != null) { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedByFirstName.Value.GetHashCode(); } - if (this.CreatedByFirstName != null) + if (this.CreatedByLastName.IsSet && this.CreatedByLastName.Value != null) { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedByLastName.Value.GetHashCode(); } - if (this.CreatedByLastName != null) + if (this.DeltaECalculationRepaired.IsSet && this.DeltaECalculationRepaired.Value != null) { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); + hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.Value.GetHashCode(); } - if (this.DeltaECalculationRepaired != null) + if (this.DeltaECalculationSprayout.IsSet && this.DeltaECalculationSprayout.Value != null) { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); + hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.Value.GetHashCode(); } - if (this.DeltaECalculationSprayout != null) + if (this.OwnColorVariantNumber.IsSet) { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); + hashCode = (hashCode * 59) + this.OwnColorVariantNumber.Value.GetHashCode(); } - if (this.OwnColorVariantNumber != null) + if (this.PrimerProductId.IsSet && this.PrimerProductId.Value != null) { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.PrimerProductId.Value.GetHashCode(); } - if (this.PrimerProductId != null) + if (this.ProductId.IsSet && this.ProductId.Value != null) { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductId.Value.GetHashCode(); } - if (this.ProductId != null) + if (this.ProductName.IsSet && this.ProductName.Value != null) { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductName.Value.GetHashCode(); } - if (this.ProductName != null) + if (this.SelectedVersionIndex.IsSet) { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); + hashCode = (hashCode * 59) + this.SelectedVersionIndex.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 9d7d88aea93f..69f4132e1b3f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedAnyOf(MixedAnyOfContent content = default(MixedAnyOfContent)) + public MixedAnyOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedAnyOf and cannot be null"); + } this.Content = content; } @@ -45,7 +51,7 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedAnyOfContent Content { get; set; } + public Option Content { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs index 49e94cc5e5db..7c4a5791f8e2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index 2cb289fae178..0b03bcb3b2c8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedOneOf(MixedOneOfContent content = default(MixedOneOfContent)) + public MixedOneOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedOneOf and cannot be null"); + } this.Content = content; } @@ -45,7 +51,7 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedOneOfContent Content { get; set; } + public Option Content { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs index e2527cc3c315..77af863c507e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index f081d2819590..454c65dd1370 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,28 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatableuuid. /// dateTime. /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuidWithPattern = default(Guid), Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) + public MixedPropertiesAndAdditionalPropertiesClass(Option uuidWithPattern = default(Option), Option uuid = default(Option), Option dateTime = default(Option), Option> map = default(Option>)) { + // to ensure "uuidWithPattern" (not nullable) is not null + if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) + { + throw new ArgumentNullException("uuidWithPattern isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "map" (not nullable) is not null + if (map.IsSet && map.Value == null) + { + throw new ArgumentNullException("map isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } this.UuidWithPattern = uuidWithPattern; this.Uuid = uuid; this.DateTime = dateTime; @@ -51,25 +72,25 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable [DataMember(Name = "uuid_with_pattern", EmitDefaultValue = false)] - public Guid UuidWithPattern { get; set; } + public Option UuidWithPattern { get; set; } /// /// Gets or Sets Uuid /// [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets DateTime /// [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Map /// [DataMember(Name = "map", EmitDefaultValue = false)] - public Dictionary Map { get; set; } + public Option> Map { get; set; } /// /// Returns the string presentation of the object @@ -125,21 +146,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.UuidWithPattern != null) + if (this.UuidWithPattern.IsSet && this.UuidWithPattern.Value != null) { - hashCode = (hashCode * 59) + this.UuidWithPattern.GetHashCode(); + hashCode = (hashCode * 59) + this.UuidWithPattern.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Map != null) + if (this.Map.IsSet && this.Map.Value != null) { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); + hashCode = (hashCode * 59) + this.Map.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index c56e0ada331a..204e9f8219b9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// id. - public MixedSubId(string id = default(string)) + public MixedSubId(Option id = default(Option)) { + // to ensure "id" (not nullable) is not null + if (id.IsSet && id.Value == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixedSubId and cannot be null"); + } this.Id = id; } @@ -45,7 +51,7 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } + public Option Id { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Id != null) + if (this.Id.IsSet && this.Id.Value != null) { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index 11efe092a28b..719535215fd9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Model200Response : IEquatable, IValidatab /// /// name. /// varClass. - public Model200Response(int name = default(int), string varClass = default(string)) + public Model200Response(Option name = default(Option), Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for Model200Response and cannot be null"); + } this.Name = name; this.Class = varClass; } @@ -47,13 +53,13 @@ public partial class Model200Response : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public int Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets Class /// [DataMember(Name = "class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Returns the string presentation of the object @@ -107,10 +113,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) + if (this.Name.IsSet) + { + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); + } + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 7b75059cad1b..6efceb27026f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClient. - public ModelClient(string varClient = default(string)) + public ModelClient(Option varClient = default(Option)) { + // to ensure "varClient" (not nullable) is not null + if (varClient.IsSet && varClient.Value == null) + { + throw new ArgumentNullException("varClient isn't a nullable property for ModelClient and cannot be null"); + } this.VarClient = varClient; } @@ -45,7 +51,7 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public string VarClient { get; set; } + public Option VarClient { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.VarClient != null) + if (this.VarClient.IsSet && this.VarClient.Value != null) { - hashCode = (hashCode * 59) + this.VarClient.GetHashCode(); + hashCode = (hashCode * 59) + this.VarClient.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Name.cs index 2021a0066590..a3419acd2d28 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,8 +43,13 @@ protected Name() { } /// /// varName (required). /// property. - public Name(int varName = default(int), string property = default(string)) + public Name(int varName = default(int), Option property = default(Option)) { + // to ensure "property" (not nullable) is not null + if (property.IsSet && property.Value == null) + { + throw new ArgumentNullException("property isn't a nullable property for Name and cannot be null"); + } this.VarName = varName; this.Property = property; } @@ -58,7 +64,7 @@ protected Name() { } /// Gets or Sets SnakeCase /// [DataMember(Name = "snake_case", EmitDefaultValue = false)] - public int SnakeCase { get; private set; } + public Option SnakeCase { get; private set; } /// /// Returns false as SnakeCase should not be serialized given that it's read-only. @@ -72,13 +78,13 @@ public bool ShouldSerializeSnakeCase() /// Gets or Sets Property /// [DataMember(Name = "property", EmitDefaultValue = false)] - public string Property { get; set; } + public Option Property { get; set; } /// /// Gets or Sets Var123Number /// [DataMember(Name = "123Number", EmitDefaultValue = false)] - public int Var123Number { get; private set; } + public Option Var123Number { get; private set; } /// /// Returns false as Var123Number should not be serialized given that it's read-only. @@ -143,12 +149,18 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.VarName.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) + if (this.SnakeCase.IsSet) + { + hashCode = (hashCode * 59) + this.SnakeCase.Value.GetHashCode(); + } + if (this.Property.IsSet && this.Property.Value != null) + { + hashCode = (hashCode * 59) + this.Property.Value.GetHashCode(); + } + if (this.Var123Number.IsSet) { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123Number.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Var123Number.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index e2e5ff34b2a7..aa61331b6f2e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,12 +45,12 @@ protected NotificationtestGetElementsV1ResponseMPayload() { } /// aObjVariableobject (required). public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List> aObjVariableobject = default(List>)) { - this.PkiNotificationtestID = pkiNotificationtestID; - // to ensure "aObjVariableobject" is required (not null) + // to ensure "aObjVariableobject" (not nullable) is not null if (aObjVariableobject == null) { - throw new ArgumentNullException("aObjVariableobject is a required property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); + throw new ArgumentNullException("aObjVariableobject isn't a nullable property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); } + this.PkiNotificationtestID = pkiNotificationtestID; this.AObjVariableobject = aObjVariableobject; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 1ae27f1846d9..7d1a62b2dc89 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,18 @@ public partial class NullableClass : IEquatable, IValidatableObje /// objectNullableProp. /// objectAndItemsNullableProp. /// objectItemsNullable. - public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateOnly dateProp = default(DateOnly), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) + public NullableClass(Option integerProp = default(Option), Option numberProp = default(Option), Option booleanProp = default(Option), Option stringProp = default(Option), Option dateProp = default(Option), Option datetimeProp = default(Option), Option?> arrayNullableProp = default(Option?>), Option?> arrayAndItemsNullableProp = default(Option?>), Option> arrayItemsNullable = default(Option>), Option?> objectNullableProp = default(Option?>), Option?> objectAndItemsNullableProp = default(Option?>), Option> objectItemsNullable = default(Option>)) { + // to ensure "arrayItemsNullable" (not nullable) is not null + if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) + { + throw new ArgumentNullException("arrayItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } + // to ensure "objectItemsNullable" (not nullable) is not null + if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) + { + throw new ArgumentNullException("objectItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } this.IntegerProp = integerProp; this.NumberProp = numberProp; this.BooleanProp = booleanProp; @@ -68,73 +79,73 @@ public partial class NullableClass : IEquatable, IValidatableObje /// Gets or Sets IntegerProp /// [DataMember(Name = "integer_prop", EmitDefaultValue = true)] - public int? IntegerProp { get; set; } + public Option IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// [DataMember(Name = "number_prop", EmitDefaultValue = true)] - public decimal? NumberProp { get; set; } + public Option NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] - public bool? BooleanProp { get; set; } + public Option BooleanProp { get; set; } /// /// Gets or Sets StringProp /// [DataMember(Name = "string_prop", EmitDefaultValue = true)] - public string StringProp { get; set; } + public Option StringProp { get; set; } /// /// Gets or Sets DateProp /// [DataMember(Name = "date_prop", EmitDefaultValue = true)] - public DateOnly DateProp { get; set; } + public Option DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] - public DateTime? DatetimeProp { get; set; } + public Option DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] - public List ArrayNullableProp { get; set; } + public Option?> ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] - public List ArrayAndItemsNullableProp { get; set; } + public Option?> ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] - public List ArrayItemsNullable { get; set; } + public Option> ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectNullableProp { get; set; } + public Option?> ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectAndItemsNullableProp { get; set; } + public Option?> ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] - public Dictionary ObjectItemsNullable { get; set; } + public Option> ObjectItemsNullable { get; set; } /// /// Gets or Sets additional properties @@ -205,53 +216,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.IntegerProp != null) + if (this.IntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.IntegerProp.Value.GetHashCode(); } - if (this.NumberProp != null) + if (this.NumberProp.IsSet) { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberProp.Value.GetHashCode(); } - if (this.BooleanProp != null) + if (this.BooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.BooleanProp.Value.GetHashCode(); } - if (this.StringProp != null) + if (this.StringProp.IsSet && this.StringProp.Value != null) { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.StringProp.Value.GetHashCode(); } - if (this.DateProp != null) + if (this.DateProp.IsSet && this.DateProp.Value != null) { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DateProp.Value.GetHashCode(); } - if (this.DatetimeProp != null) + if (this.DatetimeProp.IsSet && this.DatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DatetimeProp.Value.GetHashCode(); } - if (this.ArrayNullableProp != null) + if (this.ArrayNullableProp.IsSet && this.ArrayNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNullableProp.Value.GetHashCode(); } - if (this.ArrayAndItemsNullableProp != null) + if (this.ArrayAndItemsNullableProp.IsSet && this.ArrayAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.Value.GetHashCode(); } - if (this.ArrayItemsNullable != null) + if (this.ArrayItemsNullable.IsSet && this.ArrayItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayItemsNullable.Value.GetHashCode(); } - if (this.ObjectNullableProp != null) + if (this.ObjectNullableProp.IsSet && this.ObjectNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectNullableProp.Value.GetHashCode(); } - if (this.ObjectAndItemsNullableProp != null) + if (this.ObjectAndItemsNullableProp.IsSet && this.ObjectAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.Value.GetHashCode(); } - if (this.ObjectItemsNullable != null) + if (this.ObjectItemsNullable.IsSet && this.ObjectItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectItemsNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index b54d16ae1161..696049a0be88 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// Initializes a new instance of the class. /// /// uuid. - public NullableGuidClass(Guid? uuid = default(Guid?)) + public NullableGuidClass(Option uuid = default(Option)) { this.Uuid = uuid; } @@ -46,7 +47,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = true)] - public Guid? Uuid { get; set; } + public Option Uuid { get; set; } /// /// Returns the string presentation of the object @@ -99,9 +100,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index 28f25c1899a6..9ee2854d4dfb 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index f38cf7d6affe..b38e0d06ec9b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,7 +40,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) + public NumberOnly(Option justNumber = default(Option)) { this.JustNumber = justNumber; } @@ -48,7 +49,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Gets or Sets JustNumber /// [DataMember(Name = "JustNumber", EmitDefaultValue = false)] - public decimal JustNumber { get; set; } + public Option JustNumber { get; set; } /// /// Returns the string presentation of the object @@ -101,7 +102,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); + if (this.JustNumber.IsSet) + { + hashCode = (hashCode * 59) + this.JustNumber.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index e2f9be14b2e6..ef60e6dfaaf7 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,23 @@ public partial class ObjectWithDeprecatedFields : IEquatableid. /// deprecatedRef. /// bars. - public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List bars = default(List)) + public ObjectWithDeprecatedFields(Option uuid = default(Option), Option id = default(Option), Option deprecatedRef = default(Option), Option> bars = default(Option>)) { + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "deprecatedRef" (not nullable) is not null + if (deprecatedRef.IsSet && deprecatedRef.Value == null) + { + throw new ArgumentNullException("deprecatedRef isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "bars" (not nullable) is not null + if (bars.IsSet && bars.Value == null) + { + throw new ArgumentNullException("bars isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } this.Uuid = uuid; this.Id = id; this.DeprecatedRef = deprecatedRef; @@ -51,28 +67,28 @@ public partial class ObjectWithDeprecatedFields : IEquatable [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] [Obsolete] - public decimal Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets DeprecatedRef /// [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } + public Option DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// [DataMember(Name = "bars", EmitDefaultValue = false)] [Obsolete] - public List Bars { get; set; } + public Option> Bars { get; set; } /// /// Returns the string presentation of the object @@ -128,18 +144,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) + { + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); + } + if (this.Id.IsSet) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) + if (this.DeprecatedRef.IsSet && this.DeprecatedRef.Value != null) { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); + hashCode = (hashCode * 59) + this.DeprecatedRef.Value.GetHashCode(); } - if (this.Bars != null) + if (this.Bars.IsSet && this.Bars.Value != null) { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); + hashCode = (hashCode * 59) + this.Bars.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs index b7278bd5600e..fc7a1298bc33 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Order.cs index fa33759c2b12..54b990af2ea2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// Order Status [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -74,46 +75,51 @@ public enum StatusEnum /// shipDate. /// Order Status. /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) + public Order(Option id = default(Option), Option petId = default(Option), Option quantity = default(Option), Option shipDate = default(Option), Option status = default(Option), Option complete = default(Option)) { + // to ensure "shipDate" (not nullable) is not null + if (shipDate.IsSet && shipDate.Value == null) + { + throw new ArgumentNullException("shipDate isn't a nullable property for Order and cannot be null"); + } this.Id = id; this.PetId = petId; this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - this.Complete = complete; + this.Complete = complete.IsSet ? complete : new Option(false); } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets PetId /// [DataMember(Name = "petId", EmitDefaultValue = false)] - public long PetId { get; set; } + public Option PetId { get; set; } /// /// Gets or Sets Quantity /// [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int Quantity { get; set; } + public Option Quantity { get; set; } /// /// Gets or Sets ShipDate /// /// 2020-02-02T20:20:20.000222Z [DataMember(Name = "shipDate", EmitDefaultValue = false)] - public DateTime ShipDate { get; set; } + public Option ShipDate { get; set; } /// /// Gets or Sets Complete /// [DataMember(Name = "complete", EmitDefaultValue = true)] - public bool Complete { get; set; } + public Option Complete { get; set; } /// /// Returns the string presentation of the object @@ -171,15 +177,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.PetId.IsSet) + { + hashCode = (hashCode * 59) + this.PetId.Value.GetHashCode(); + } + if (this.Quantity.IsSet) + { + hashCode = (hashCode * 59) + this.Quantity.Value.GetHashCode(); + } + if (this.ShipDate.IsSet && this.ShipDate.Value != null) + { + hashCode = (hashCode * 59) + this.ShipDate.Value.GetHashCode(); + } + if (this.Status.IsSet) + { + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); + } + if (this.Complete.IsSet) { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); + hashCode = (hashCode * 59) + this.Complete.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 1a8d974b060f..2262a390c4db 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,13 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// myNumber. /// myString. /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) + public OuterComposite(Option myNumber = default(Option), Option myString = default(Option), Option myBoolean = default(Option)) { + // to ensure "myString" (not nullable) is not null + if (myString.IsSet && myString.Value == null) + { + throw new ArgumentNullException("myString isn't a nullable property for OuterComposite and cannot be null"); + } this.MyNumber = myNumber; this.MyString = myString; this.MyBoolean = myBoolean; @@ -49,19 +55,19 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// Gets or Sets MyNumber /// [DataMember(Name = "my_number", EmitDefaultValue = false)] - public decimal MyNumber { get; set; } + public Option MyNumber { get; set; } /// /// Gets or Sets MyString /// [DataMember(Name = "my_string", EmitDefaultValue = false)] - public string MyString { get; set; } + public Option MyString { get; set; } /// /// Gets or Sets MyBoolean /// [DataMember(Name = "my_boolean", EmitDefaultValue = true)] - public bool MyBoolean { get; set; } + public Option MyBoolean { get; set; } /// /// Returns the string presentation of the object @@ -116,12 +122,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) + if (this.MyNumber.IsSet) + { + hashCode = (hashCode * 59) + this.MyNumber.Value.GetHashCode(); + } + if (this.MyString.IsSet && this.MyString.Value != null) + { + hashCode = (hashCode * 59) + this.MyString.Value.GetHashCode(); + } + if (this.MyBoolean.IsSet) { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); + hashCode = (hashCode * 59) + this.MyBoolean.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs index 59a9f8e3500a..8d09e4d421bb 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index 40e276b600eb..9217b6a24c9a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 3a70c3716fe2..83a1123c3651 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index 42b36058c031..69a3229977ac 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs index 392e199e137f..5fd8f69243a4 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index 4d15a2a962f9..81713ff4c034 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pet.cs index 4c5c91056616..6780e015ab16 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -79,22 +80,32 @@ protected Pet() { } /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), Option category = default(Option), string name = default(string), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this.Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this.PhotoUrls = photoUrls; this.Id = id; this.Category = category; + this.Name = name; + this.PhotoUrls = photoUrls; this.Tags = tags; this.Status = status; } @@ -103,13 +114,13 @@ protected Pet() { } /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category { get; set; } + public Option Category { get; set; } /// /// Gets or Sets Name @@ -128,7 +139,7 @@ protected Pet() { } /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags { get; set; } + public Option> Tags { get; set; } /// /// Returns the string presentation of the object @@ -186,10 +197,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.Name != null) { @@ -199,11 +213,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 05b7cb091880..90bb769b9d24 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 5e4472118140..fddb8c8500ad 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index 68c147e5e241..24a13d5222e6 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index e0f4761e1915..6bc482976331 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,10 +44,10 @@ protected QuadrilateralInterface() { } /// quadrilateralType (required). public QuadrilateralInterface(string quadrilateralType = default(string)) { - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 7551b621ebd8..2f21ea1cf97c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// baz. - public ReadOnlyFirst(string baz = default(string)) + public ReadOnlyFirst(Option baz = default(Option)) { + // to ensure "baz" (not nullable) is not null + if (baz.IsSet && baz.Value == null) + { + throw new ArgumentNullException("baz isn't a nullable property for ReadOnlyFirst and cannot be null"); + } this.Baz = baz; } @@ -45,7 +51,7 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -59,7 +65,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Baz /// [DataMember(Name = "baz", EmitDefaultValue = false)] - public string Baz { get; set; } + public Option Baz { get; set; } /// /// Returns the string presentation of the object @@ -113,13 +119,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Baz != null) + if (this.Baz.IsSet && this.Baz.Value != null) { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); + hashCode = (hashCode * 59) + this.Baz.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 5005d284a8e0..2c65037e3bb0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -53,7 +54,7 @@ public enum RequiredNullableEnumIntegerEnum /// Gets or Sets RequiredNullableEnumInteger /// [DataMember(Name = "required_nullable_enum_integer", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerEnum RequiredNullableEnumInteger { get; set; } + public RequiredNullableEnumIntegerEnum? RequiredNullableEnumInteger { get; set; } /// /// Defines RequiredNotnullableEnumInteger /// @@ -97,7 +98,7 @@ public enum NotrequiredNullableEnumIntegerEnum /// Gets or Sets NotrequiredNullableEnumInteger /// [DataMember(Name = "notrequired_nullable_enum_integer", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerEnum? NotrequiredNullableEnumInteger { get; set; } + public Option NotrequiredNullableEnumInteger { get; set; } /// /// Defines NotrequiredNotnullableEnumInteger /// @@ -119,11 +120,10 @@ public enum NotrequiredNotnullableEnumIntegerEnum /// Gets or Sets NotrequiredNotnullableEnumInteger /// [DataMember(Name = "notrequired_notnullable_enum_integer", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerEnum? NotrequiredNotnullableEnumInteger { get; set; } + public Option NotrequiredNotnullableEnumInteger { get; set; } /// /// Defines RequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum RequiredNullableEnumIntegerOnlyEnum { /// @@ -142,7 +142,7 @@ public enum RequiredNullableEnumIntegerOnlyEnum /// Gets or Sets RequiredNullableEnumIntegerOnly /// [DataMember(Name = "required_nullable_enum_integer_only", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnly { get; set; } + public RequiredNullableEnumIntegerOnlyEnum? RequiredNullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumIntegerOnly /// @@ -168,7 +168,6 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum /// /// Defines NotrequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum NotrequiredNullableEnumIntegerOnlyEnum { /// @@ -187,7 +186,7 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNullableEnumIntegerOnly /// [DataMember(Name = "notrequired_nullable_enum_integer_only", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerOnlyEnum? NotrequiredNullableEnumIntegerOnly { get; set; } + public Option NotrequiredNullableEnumIntegerOnly { get; set; } /// /// Defines NotrequiredNotnullableEnumIntegerOnly /// @@ -209,7 +208,7 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNotnullableEnumIntegerOnly /// [DataMember(Name = "notrequired_notnullable_enum_integer_only", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerOnlyEnum? NotrequiredNotnullableEnumIntegerOnly { get; set; } + public Option NotrequiredNotnullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumString /// @@ -331,7 +330,7 @@ public enum RequiredNullableEnumStringEnum /// Gets or Sets RequiredNullableEnumString /// [DataMember(Name = "required_nullable_enum_string", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumStringEnum RequiredNullableEnumString { get; set; } + public RequiredNullableEnumStringEnum? RequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNullableEnumString /// @@ -392,7 +391,7 @@ public enum NotrequiredNullableEnumStringEnum /// Gets or Sets NotrequiredNullableEnumString /// [DataMember(Name = "notrequired_nullable_enum_string", EmitDefaultValue = true)] - public NotrequiredNullableEnumStringEnum? NotrequiredNullableEnumString { get; set; } + public Option NotrequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNotnullableEnumString /// @@ -453,13 +452,13 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNotnullableEnumString /// [DataMember(Name = "notrequired_notnullable_enum_string", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumStringEnum? NotrequiredNotnullableEnumString { get; set; } + public Option NotrequiredNotnullableEnumString { get; set; } /// /// Gets or Sets RequiredNullableOuterEnumDefaultValue /// [DataMember(Name = "required_nullable_outerEnumDefaultValue", IsRequired = true, EmitDefaultValue = true)] - public OuterEnumDefaultValue RequiredNullableOuterEnumDefaultValue { get; set; } + public OuterEnumDefaultValue? RequiredNullableOuterEnumDefaultValue { get; set; } /// /// Gets or Sets RequiredNotnullableOuterEnumDefaultValue @@ -471,13 +470,13 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_nullable_outerEnumDefaultValue", EmitDefaultValue = true)] - public OuterEnumDefaultValue? NotrequiredNullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNullableOuterEnumDefaultValue { get; set; } /// /// Gets or Sets NotrequiredNotnullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_notnullable_outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? NotrequiredNotnullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNotnullableOuterEnumDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -530,100 +529,100 @@ protected RequiredClass() { } /// requiredNotnullableArrayOfString (required). /// notrequiredNullableArrayOfString. /// notrequiredNotnullableArrayOfString. - public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), int? notRequiredNullableIntegerProp = default(int?), int notRequiredNotnullableintegerProp = default(int), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), string notrequiredNullableStringProp = default(string), string notrequiredNotnullableStringProp = default(string), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), bool? notrequiredNullableBooleanProp = default(bool?), bool notrequiredNotnullableBooleanProp = default(bool), DateOnly requiredNullableDateProp = default(DateOnly), DateOnly requiredNotNullableDateProp = default(DateOnly), DateOnly notRequiredNullableDateProp = default(DateOnly), DateOnly notRequiredNotnullableDateProp = default(DateOnly), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), DateTime? notrequiredNullableDatetimeProp = default(DateTime?), DateTime notrequiredNotnullableDatetimeProp = default(DateTime), RequiredNullableEnumIntegerEnum requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), NotrequiredNullableEnumIntegerEnum? notrequiredNullableEnumInteger = default(NotrequiredNullableEnumIntegerEnum?), NotrequiredNotnullableEnumIntegerEnum? notrequiredNotnullableEnumInteger = default(NotrequiredNotnullableEnumIntegerEnum?), RequiredNullableEnumIntegerOnlyEnum requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), NotrequiredNullableEnumIntegerOnlyEnum? notrequiredNullableEnumIntegerOnly = default(NotrequiredNullableEnumIntegerOnlyEnum?), NotrequiredNotnullableEnumIntegerOnlyEnum? notrequiredNotnullableEnumIntegerOnly = default(NotrequiredNotnullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum requiredNullableEnumString = default(RequiredNullableEnumStringEnum), NotrequiredNullableEnumStringEnum? notrequiredNullableEnumString = default(NotrequiredNullableEnumStringEnum?), NotrequiredNotnullableEnumStringEnum? notrequiredNotnullableEnumString = default(NotrequiredNotnullableEnumStringEnum?), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue? notrequiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue? notrequiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Guid? notrequiredNullableUuid = default(Guid?), Guid notrequiredNotnullableUuid = default(Guid), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), List notrequiredNullableArrayOfString = default(List), List notrequiredNotnullableArrayOfString = default(List)) + public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), Option notRequiredNullableIntegerProp = default(Option), Option notRequiredNotnullableintegerProp = default(Option), string? requiredNullableStringProp = default(string?), string requiredNotnullableStringProp = default(string), Option notrequiredNullableStringProp = default(Option), Option notrequiredNotnullableStringProp = default(Option), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), Option notrequiredNullableBooleanProp = default(Option), Option notrequiredNotnullableBooleanProp = default(Option), DateOnly? requiredNullableDateProp = default(DateOnly?), DateOnly requiredNotNullableDateProp = default(DateOnly), Option notRequiredNullableDateProp = default(Option), Option notRequiredNotnullableDateProp = default(Option), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), Option notrequiredNullableDatetimeProp = default(Option), Option notrequiredNotnullableDatetimeProp = default(Option), RequiredNullableEnumIntegerEnum? requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum?), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), Option notrequiredNullableEnumInteger = default(Option), Option notrequiredNotnullableEnumInteger = default(Option), RequiredNullableEnumIntegerOnlyEnum? requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), Option notrequiredNullableEnumIntegerOnly = default(Option), Option notrequiredNotnullableEnumIntegerOnly = default(Option), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum? requiredNullableEnumString = default(RequiredNullableEnumStringEnum?), Option notrequiredNullableEnumString = default(Option), Option notrequiredNotnullableEnumString = default(Option), OuterEnumDefaultValue? requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), Option notrequiredNullableOuterEnumDefaultValue = default(Option), Option notrequiredNotnullableOuterEnumDefaultValue = default(Option), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Option notrequiredNullableUuid = default(Option), Option notrequiredNotnullableUuid = default(Option), List? requiredNullableArrayOfString = default(List?), List requiredNotnullableArrayOfString = default(List), Option?> notrequiredNullableArrayOfString = default(Option?>), Option> notrequiredNotnullableArrayOfString = default(Option>)) { - // to ensure "requiredNullableIntegerProp" is required (not null) - if (requiredNullableIntegerProp == null) + // to ensure "requiredNotnullableStringProp" (not nullable) is not null + if (requiredNotnullableStringProp == null) { - throw new ArgumentNullException("requiredNullableIntegerProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableIntegerProp = requiredNullableIntegerProp; - this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; - // to ensure "requiredNullableStringProp" is required (not null) - if (requiredNullableStringProp == null) + // to ensure "notrequiredNotnullableStringProp" (not nullable) is not null + if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) { - throw new ArgumentNullException("requiredNullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableStringProp = requiredNullableStringProp; - // to ensure "requiredNotnullableStringProp" is required (not null) - if (requiredNotnullableStringProp == null) + // to ensure "requiredNotNullableDateProp" (not nullable) is not null + if (requiredNotNullableDateProp == null) { - throw new ArgumentNullException("requiredNotnullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotNullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableStringProp = requiredNotnullableStringProp; - // to ensure "requiredNullableBooleanProp" is required (not null) - if (requiredNullableBooleanProp == null) + // to ensure "notRequiredNotnullableDateProp" (not nullable) is not null + if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) { - throw new ArgumentNullException("requiredNullableBooleanProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notRequiredNotnullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableBooleanProp = requiredNullableBooleanProp; - this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; - // to ensure "requiredNullableDateProp" is required (not null) - if (requiredNullableDateProp == null) + // to ensure "requiredNotnullableDatetimeProp" (not nullable) is not null + if (requiredNotnullableDatetimeProp == null) { - throw new ArgumentNullException("requiredNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDateProp = requiredNullableDateProp; - // to ensure "requiredNotNullableDateProp" is required (not null) - if (requiredNotNullableDateProp == null) + // to ensure "notrequiredNotnullableDatetimeProp" (not nullable) is not null + if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) { - throw new ArgumentNullException("requiredNotNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotNullableDateProp = requiredNotNullableDateProp; - this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; - // to ensure "requiredNullableDatetimeProp" is required (not null) - if (requiredNullableDatetimeProp == null) + // to ensure "requiredNotnullableUuid" (not nullable) is not null + if (requiredNotnullableUuid == null) { - throw new ArgumentNullException("requiredNullableDatetimeProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; - this.RequiredNullableEnumInteger = requiredNullableEnumInteger; - this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; - this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; - this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; - this.RequiredNotnullableEnumString = requiredNotnullableEnumString; - this.RequiredNullableEnumString = requiredNullableEnumString; - this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; - this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; - // to ensure "requiredNullableUuid" is required (not null) - if (requiredNullableUuid == null) + // to ensure "notrequiredNotnullableUuid" (not nullable) is not null + if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) { - throw new ArgumentNullException("requiredNullableUuid is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableUuid = requiredNullableUuid; - this.RequiredNotnullableUuid = requiredNotnullableUuid; - // to ensure "requiredNullableArrayOfString" is required (not null) - if (requiredNullableArrayOfString == null) + // to ensure "requiredNotnullableArrayOfString" (not nullable) is not null + if (requiredNotnullableArrayOfString == null) { - throw new ArgumentNullException("requiredNullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableArrayOfString = requiredNullableArrayOfString; - // to ensure "requiredNotnullableArrayOfString" is required (not null) - if (requiredNotnullableArrayOfString == null) + // to ensure "notrequiredNotnullableArrayOfString" (not nullable) is not null + if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) { - throw new ArgumentNullException("requiredNotnullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; + this.RequiredNullableIntegerProp = requiredNullableIntegerProp; + this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; this.NotRequiredNullableIntegerProp = notRequiredNullableIntegerProp; this.NotRequiredNotnullableintegerProp = notRequiredNotnullableintegerProp; + this.RequiredNullableStringProp = requiredNullableStringProp; + this.RequiredNotnullableStringProp = requiredNotnullableStringProp; this.NotrequiredNullableStringProp = notrequiredNullableStringProp; this.NotrequiredNotnullableStringProp = notrequiredNotnullableStringProp; + this.RequiredNullableBooleanProp = requiredNullableBooleanProp; + this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; this.NotrequiredNullableBooleanProp = notrequiredNullableBooleanProp; this.NotrequiredNotnullableBooleanProp = notrequiredNotnullableBooleanProp; + this.RequiredNullableDateProp = requiredNullableDateProp; + this.RequiredNotNullableDateProp = requiredNotNullableDateProp; this.NotRequiredNullableDateProp = notRequiredNullableDateProp; this.NotRequiredNotnullableDateProp = notRequiredNotnullableDateProp; + this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; + this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; this.NotrequiredNullableDatetimeProp = notrequiredNullableDatetimeProp; this.NotrequiredNotnullableDatetimeProp = notrequiredNotnullableDatetimeProp; + this.RequiredNullableEnumInteger = requiredNullableEnumInteger; + this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; this.NotrequiredNullableEnumInteger = notrequiredNullableEnumInteger; this.NotrequiredNotnullableEnumInteger = notrequiredNotnullableEnumInteger; + this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; + this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; this.NotrequiredNullableEnumIntegerOnly = notrequiredNullableEnumIntegerOnly; this.NotrequiredNotnullableEnumIntegerOnly = notrequiredNotnullableEnumIntegerOnly; + this.RequiredNotnullableEnumString = requiredNotnullableEnumString; + this.RequiredNullableEnumString = requiredNullableEnumString; this.NotrequiredNullableEnumString = notrequiredNullableEnumString; this.NotrequiredNotnullableEnumString = notrequiredNotnullableEnumString; + this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; + this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; this.NotrequiredNullableOuterEnumDefaultValue = notrequiredNullableOuterEnumDefaultValue; this.NotrequiredNotnullableOuterEnumDefaultValue = notrequiredNotnullableOuterEnumDefaultValue; + this.RequiredNullableUuid = requiredNullableUuid; + this.RequiredNotnullableUuid = requiredNotnullableUuid; this.NotrequiredNullableUuid = notrequiredNullableUuid; this.NotrequiredNotnullableUuid = notrequiredNotnullableUuid; + this.RequiredNullableArrayOfString = requiredNullableArrayOfString; + this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; this.NotrequiredNullableArrayOfString = notrequiredNullableArrayOfString; this.NotrequiredNotnullableArrayOfString = notrequiredNotnullableArrayOfString; } @@ -644,19 +643,19 @@ protected RequiredClass() { } /// Gets or Sets NotRequiredNullableIntegerProp /// [DataMember(Name = "not_required_nullable_integer_prop", EmitDefaultValue = true)] - public int? NotRequiredNullableIntegerProp { get; set; } + public Option NotRequiredNullableIntegerProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableintegerProp /// [DataMember(Name = "not_required_notnullableinteger_prop", EmitDefaultValue = false)] - public int NotRequiredNotnullableintegerProp { get; set; } + public Option NotRequiredNotnullableintegerProp { get; set; } /// /// Gets or Sets RequiredNullableStringProp /// [DataMember(Name = "required_nullable_string_prop", IsRequired = true, EmitDefaultValue = true)] - public string RequiredNullableStringProp { get; set; } + public string? RequiredNullableStringProp { get; set; } /// /// Gets or Sets RequiredNotnullableStringProp @@ -668,13 +667,13 @@ protected RequiredClass() { } /// Gets or Sets NotrequiredNullableStringProp /// [DataMember(Name = "notrequired_nullable_string_prop", EmitDefaultValue = true)] - public string NotrequiredNullableStringProp { get; set; } + public Option NotrequiredNullableStringProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableStringProp /// [DataMember(Name = "notrequired_notnullable_string_prop", EmitDefaultValue = false)] - public string NotrequiredNotnullableStringProp { get; set; } + public Option NotrequiredNotnullableStringProp { get; set; } /// /// Gets or Sets RequiredNullableBooleanProp @@ -692,19 +691,19 @@ protected RequiredClass() { } /// Gets or Sets NotrequiredNullableBooleanProp /// [DataMember(Name = "notrequired_nullable_boolean_prop", EmitDefaultValue = true)] - public bool? NotrequiredNullableBooleanProp { get; set; } + public Option NotrequiredNullableBooleanProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableBooleanProp /// [DataMember(Name = "notrequired_notnullable_boolean_prop", EmitDefaultValue = true)] - public bool NotrequiredNotnullableBooleanProp { get; set; } + public Option NotrequiredNotnullableBooleanProp { get; set; } /// /// Gets or Sets RequiredNullableDateProp /// [DataMember(Name = "required_nullable_date_prop", IsRequired = true, EmitDefaultValue = true)] - public DateOnly RequiredNullableDateProp { get; set; } + public DateOnly? RequiredNullableDateProp { get; set; } /// /// Gets or Sets RequiredNotNullableDateProp @@ -716,13 +715,13 @@ protected RequiredClass() { } /// Gets or Sets NotRequiredNullableDateProp /// [DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)] - public DateOnly NotRequiredNullableDateProp { get; set; } + public Option NotRequiredNullableDateProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableDateProp /// [DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)] - public DateOnly NotRequiredNotnullableDateProp { get; set; } + public Option NotRequiredNotnullableDateProp { get; set; } /// /// Gets or Sets RequiredNotnullableDatetimeProp @@ -740,13 +739,13 @@ protected RequiredClass() { } /// Gets or Sets NotrequiredNullableDatetimeProp /// [DataMember(Name = "notrequired_nullable_datetime_prop", EmitDefaultValue = true)] - public DateTime? NotrequiredNullableDatetimeProp { get; set; } + public Option NotrequiredNullableDatetimeProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableDatetimeProp /// [DataMember(Name = "notrequired_notnullable_datetime_prop", EmitDefaultValue = false)] - public DateTime NotrequiredNotnullableDatetimeProp { get; set; } + public Option NotrequiredNotnullableDatetimeProp { get; set; } /// /// Gets or Sets RequiredNullableUuid @@ -767,20 +766,20 @@ protected RequiredClass() { } /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_nullable_uuid", EmitDefaultValue = true)] - public Guid? NotrequiredNullableUuid { get; set; } + public Option NotrequiredNullableUuid { get; set; } /// /// Gets or Sets NotrequiredNotnullableUuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_notnullable_uuid", EmitDefaultValue = false)] - public Guid NotrequiredNotnullableUuid { get; set; } + public Option NotrequiredNotnullableUuid { get; set; } /// /// Gets or Sets RequiredNullableArrayOfString /// [DataMember(Name = "required_nullable_array_of_string", IsRequired = true, EmitDefaultValue = true)] - public List RequiredNullableArrayOfString { get; set; } + public List? RequiredNullableArrayOfString { get; set; } /// /// Gets or Sets RequiredNotnullableArrayOfString @@ -792,13 +791,13 @@ protected RequiredClass() { } /// Gets or Sets NotrequiredNullableArrayOfString /// [DataMember(Name = "notrequired_nullable_array_of_string", EmitDefaultValue = true)] - public List NotrequiredNullableArrayOfString { get; set; } + public Option?> NotrequiredNullableArrayOfString { get; set; } /// /// Gets or Sets NotrequiredNotnullableArrayOfString /// [DataMember(Name = "notrequired_notnullable_array_of_string", EmitDefaultValue = false)] - public List NotrequiredNotnullableArrayOfString { get; set; } + public Option> NotrequiredNotnullableArrayOfString { get; set; } /// /// Returns the string presentation of the object @@ -894,16 +893,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RequiredNullableIntegerProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); + if (this.NotRequiredNullableIntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); - if (this.NotRequiredNullableIntegerProp != null) + if (this.NotRequiredNotnullableintegerProp.IsSet) { - hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.GetHashCode(); if (this.RequiredNullableStringProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableStringProp.GetHashCode(); @@ -912,24 +911,24 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableStringProp.GetHashCode(); } - if (this.NotrequiredNullableStringProp != null) + if (this.NotrequiredNullableStringProp.IsSet && this.NotrequiredNullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableStringProp != null) + if (this.NotrequiredNotnullableStringProp.IsSet && this.NotrequiredNotnullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.Value.GetHashCode(); } - if (this.RequiredNullableBooleanProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); + if (this.NotrequiredNullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); - if (this.NotrequiredNullableBooleanProp != null) + if (this.NotrequiredNotnullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.GetHashCode(); if (this.RequiredNullableDateProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableDateProp.GetHashCode(); @@ -938,13 +937,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotNullableDateProp.GetHashCode(); } - if (this.NotRequiredNullableDateProp != null) + if (this.NotRequiredNullableDateProp.IsSet && this.NotRequiredNullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.Value.GetHashCode(); } - if (this.NotRequiredNotnullableDateProp != null) + if (this.NotRequiredNotnullableDateProp.IsSet && this.NotRequiredNotnullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.Value.GetHashCode(); } if (this.RequiredNotnullableDatetimeProp != null) { @@ -954,30 +953,54 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNullableDatetimeProp.GetHashCode(); } - if (this.NotrequiredNullableDatetimeProp != null) + if (this.NotrequiredNullableDatetimeProp.IsSet && this.NotrequiredNullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableDatetimeProp != null) + if (this.NotrequiredNotnullableDatetimeProp.IsSet && this.NotrequiredNotnullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.RequiredNullableEnumInteger.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.GetHashCode(); + if (this.NotrequiredNullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableEnumIntegerOnly.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.GetHashCode(); + if (this.NotrequiredNullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNotnullableEnumString.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.GetHashCode(); + if (this.NotrequiredNullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableOuterEnumDefaultValue.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.GetHashCode(); + if (this.NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.Value.GetHashCode(); + } if (this.RequiredNullableUuid != null) { hashCode = (hashCode * 59) + this.RequiredNullableUuid.GetHashCode(); @@ -986,13 +1009,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableUuid.GetHashCode(); } - if (this.NotrequiredNullableUuid != null) + if (this.NotrequiredNullableUuid.IsSet && this.NotrequiredNullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.Value.GetHashCode(); } - if (this.NotrequiredNotnullableUuid != null) + if (this.NotrequiredNotnullableUuid.IsSet && this.NotrequiredNotnullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.Value.GetHashCode(); } if (this.RequiredNullableArrayOfString != null) { @@ -1002,13 +1025,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableArrayOfString.GetHashCode(); } - if (this.NotrequiredNullableArrayOfString != null) + if (this.NotrequiredNullableArrayOfString.IsSet && this.NotrequiredNullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.Value.GetHashCode(); } - if (this.NotrequiredNotnullableArrayOfString != null) + if (this.NotrequiredNotnullableArrayOfString.IsSet && this.NotrequiredNotnullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Return.cs index 9d08c25bbd0f..cbf686078763 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,21 +45,21 @@ protected Return() { } /// varLock (required). /// varAbstract (required). /// varUnsafe. - public Return(int varReturn = default(int), string varLock = default(string), string varAbstract = default(string), string varUnsafe = default(string)) + public Return(Option varReturn = default(Option), string varLock = default(string), string? varAbstract = default(string?), Option varUnsafe = default(Option)) { - // to ensure "varLock" is required (not null) + // to ensure "varLock" (not nullable) is not null if (varLock == null) { - throw new ArgumentNullException("varLock is a required property for Return and cannot be null"); + throw new ArgumentNullException("varLock isn't a nullable property for Return and cannot be null"); } - this.Lock = varLock; - // to ensure "varAbstract" is required (not null) - if (varAbstract == null) + // to ensure "varUnsafe" (not nullable) is not null + if (varUnsafe.IsSet && varUnsafe.Value == null) { - throw new ArgumentNullException("varAbstract is a required property for Return and cannot be null"); + throw new ArgumentNullException("varUnsafe isn't a nullable property for Return and cannot be null"); } - this.Abstract = varAbstract; this.VarReturn = varReturn; + this.Lock = varLock; + this.Abstract = varAbstract; this.Unsafe = varUnsafe; } @@ -66,7 +67,7 @@ protected Return() { } /// Gets or Sets VarReturn /// [DataMember(Name = "return", EmitDefaultValue = false)] - public int VarReturn { get; set; } + public Option VarReturn { get; set; } /// /// Gets or Sets Lock @@ -78,13 +79,13 @@ protected Return() { } /// Gets or Sets Abstract /// [DataMember(Name = "abstract", IsRequired = true, EmitDefaultValue = true)] - public string Abstract { get; set; } + public string? Abstract { get; set; } /// /// Gets or Sets Unsafe /// [DataMember(Name = "unsafe", EmitDefaultValue = false)] - public string Unsafe { get; set; } + public Option Unsafe { get; set; } /// /// Returns the string presentation of the object @@ -140,7 +141,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.VarReturn.GetHashCode(); + if (this.VarReturn.IsSet) + { + hashCode = (hashCode * 59) + this.VarReturn.Value.GetHashCode(); + } if (this.Lock != null) { hashCode = (hashCode * 59) + this.Lock.GetHashCode(); @@ -149,9 +153,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Abstract.GetHashCode(); } - if (this.Unsafe != null) + if (this.Unsafe.IsSet && this.Unsafe.Value != null) { - hashCode = (hashCode * 59) + this.Unsafe.GetHashCode(); + hashCode = (hashCode * 59) + this.Unsafe.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index ebe5562ffe67..e7eed444a036 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// /// roleUuid. /// role. - public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole)) + public RolesReportsHash(Option roleUuid = default(Option), Option role = default(Option)) { + // to ensure "roleUuid" (not nullable) is not null + if (roleUuid.IsSet && roleUuid.Value == null) + { + throw new ArgumentNullException("roleUuid isn't a nullable property for RolesReportsHash and cannot be null"); + } + // to ensure "role" (not nullable) is not null + if (role.IsSet && role.Value == null) + { + throw new ArgumentNullException("role isn't a nullable property for RolesReportsHash and cannot be null"); + } this.RoleUuid = roleUuid; this.Role = role; } @@ -47,13 +58,13 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// Gets or Sets RoleUuid /// [DataMember(Name = "role_uuid", EmitDefaultValue = false)] - public Guid RoleUuid { get; set; } + public Option RoleUuid { get; set; } /// /// Gets or Sets Role /// [DataMember(Name = "role", EmitDefaultValue = false)] - public RolesReportsHashRole Role { get; set; } + public Option Role { get; set; } /// /// Returns the string presentation of the object @@ -107,13 +118,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RoleUuid != null) + if (this.RoleUuid.IsSet && this.RoleUuid.Value != null) { - hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.RoleUuid.Value.GetHashCode(); } - if (this.Role != null) + if (this.Role.IsSet && this.Role.Value != null) { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); + hashCode = (hashCode * 59) + this.Role.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 60e2f9e50c07..7e6805979842 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Initializes a new instance of the class. /// /// name. - public RolesReportsHashRole(string name = default(string)) + public RolesReportsHashRole(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for RolesReportsHashRole and cannot be null"); + } this.Name = name; } @@ -45,7 +51,7 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 03a8cd46f5ec..04ef3aa3c07f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,17 +45,17 @@ protected ScaleneTriangle() { } /// triangleType (required). public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ScaleneTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for ScaleneTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Shape.cs index e8921143b0be..46a472d80645 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index b850b88b4fce..f73a0eac4796 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,10 +44,10 @@ protected ShapeInterface() { } /// shapeType (required). public ShapeInterface(string shapeType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index df972c1b66a0..9d4204d63b47 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index eebd8034750c..3cc84cc9f1b1 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,17 +45,17 @@ protected SimpleQuadrilateral() { } /// quadrilateralType (required). public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 867d43acaf4c..1f75838d669c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// /// specialPropertyName. /// varSpecialModelName. - public SpecialModelName(long specialPropertyName = default(long), string varSpecialModelName = default(string)) + public SpecialModelName(Option specialPropertyName = default(Option), Option varSpecialModelName = default(Option)) { + // to ensure "varSpecialModelName" (not nullable) is not null + if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) + { + throw new ArgumentNullException("varSpecialModelName isn't a nullable property for SpecialModelName and cannot be null"); + } this.SpecialPropertyName = specialPropertyName; this.VarSpecialModelName = varSpecialModelName; } @@ -47,13 +53,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// Gets or Sets SpecialPropertyName /// [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] - public long SpecialPropertyName { get; set; } + public Option SpecialPropertyName { get; set; } /// /// Gets or Sets VarSpecialModelName /// [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string VarSpecialModelName { get; set; } + public Option VarSpecialModelName { get; set; } /// /// Returns the string presentation of the object @@ -107,10 +113,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.VarSpecialModelName != null) + if (this.SpecialPropertyName.IsSet) + { + hashCode = (hashCode * 59) + this.SpecialPropertyName.Value.GetHashCode(); + } + if (this.VarSpecialModelName.IsSet && this.VarSpecialModelName.Value != null) { - hashCode = (hashCode * 59) + this.VarSpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.VarSpecialModelName.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Tag.cs index a9dd75cb5cbd..7f796bee5c3b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Tag : IEquatable, IValidatableObject /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this.Id = id; this.Name = name; } @@ -47,13 +53,13 @@ public partial class Tag : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -107,10 +113,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index bb23b1f52456..ebba0ebde762 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordList : IEquatable class. /// /// value. - public TestCollectionEndingWithWordList(string value = default(string)) + public TestCollectionEndingWithWordList(Option value = default(Option)) { + // to ensure "value" (not nullable) is not null + if (value.IsSet && value.Value == null) + { + throw new ArgumentNullException("value isn't a nullable property for TestCollectionEndingWithWordList and cannot be null"); + } this.Value = value; } @@ -45,7 +51,7 @@ public partial class TestCollectionEndingWithWordList : IEquatable [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } + public Option Value { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Value != null) + if (this.Value.IsSet && this.Value.Value != null) { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 715365c48c06..1630e5b0a4b6 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable class. /// /// testCollectionEndingWithWordList. - public TestCollectionEndingWithWordListObject(List testCollectionEndingWithWordList = default(List)) + public TestCollectionEndingWithWordListObject(Option> testCollectionEndingWithWordList = default(Option>)) { + // to ensure "testCollectionEndingWithWordList" (not nullable) is not null + if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) + { + throw new ArgumentNullException("testCollectionEndingWithWordList isn't a nullable property for TestCollectionEndingWithWordListObject and cannot be null"); + } this.TestCollectionEndingWithWordList = testCollectionEndingWithWordList; } @@ -45,7 +51,7 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable [DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)] - public List TestCollectionEndingWithWordList { get; set; } + public Option> TestCollectionEndingWithWordList { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.TestCollectionEndingWithWordList != null) + if (this.TestCollectionEndingWithWordList.IsSet && this.TestCollectionEndingWithWordList.Value != null) { - hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.GetHashCode(); + hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 457b88ac9c74..aca5c0652ab6 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Initializes a new instance of the class. /// /// someProperty. - public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) + public TestInlineFreeformAdditionalPropertiesRequest(Option someProperty = default(Option)) { + // to ensure "someProperty" (not nullable) is not null + if (someProperty.IsSet && someProperty.Value == null) + { + throw new ArgumentNullException("someProperty isn't a nullable property for TestInlineFreeformAdditionalPropertiesRequest and cannot be null"); + } this.SomeProperty = someProperty; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Gets or Sets SomeProperty /// [DataMember(Name = "someProperty", EmitDefaultValue = false)] - public string SomeProperty { get; set; } + public Option SomeProperty { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SomeProperty != null) + if (this.SomeProperty.IsSet && this.SomeProperty.Value != null) { - hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.SomeProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 9ec9fd6e4f9c..54d9780f822e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index cb7847498ff7..7f38665a543d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,10 +44,10 @@ protected TriangleInterface() { } /// triangleType (required). public TriangleInterface(string triangleType = default(string)) { - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/User.cs index 0b1913457735..5cff082be9b4 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,43 @@ public partial class User : IEquatable, IValidatableObject /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) + public User(Option id = default(Option), Option username = default(Option), Option firstName = default(Option), Option lastName = default(Option), Option email = default(Option), Option password = default(Option), Option phone = default(Option), Option userStatus = default(Option), Option objectWithNoDeclaredProps = default(Option), Option objectWithNoDeclaredPropsNullable = default(Option), Option anyTypeProp = default(Option), Option anyTypePropNullable = default(Option)) { + // to ensure "username" (not nullable) is not null + if (username.IsSet && username.Value == null) + { + throw new ArgumentNullException("username isn't a nullable property for User and cannot be null"); + } + // to ensure "firstName" (not nullable) is not null + if (firstName.IsSet && firstName.Value == null) + { + throw new ArgumentNullException("firstName isn't a nullable property for User and cannot be null"); + } + // to ensure "lastName" (not nullable) is not null + if (lastName.IsSet && lastName.Value == null) + { + throw new ArgumentNullException("lastName isn't a nullable property for User and cannot be null"); + } + // to ensure "email" (not nullable) is not null + if (email.IsSet && email.Value == null) + { + throw new ArgumentNullException("email isn't a nullable property for User and cannot be null"); + } + // to ensure "password" (not nullable) is not null + if (password.IsSet && password.Value == null) + { + throw new ArgumentNullException("password isn't a nullable property for User and cannot be null"); + } + // to ensure "phone" (not nullable) is not null + if (phone.IsSet && phone.Value == null) + { + throw new ArgumentNullException("phone isn't a nullable property for User and cannot be null"); + } + // to ensure "objectWithNoDeclaredProps" (not nullable) is not null + if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) + { + throw new ArgumentNullException("objectWithNoDeclaredProps isn't a nullable property for User and cannot be null"); + } this.Id = id; this.Username = username; this.FirstName = firstName; @@ -67,78 +103,78 @@ public partial class User : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Username /// [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } + public Option Username { get; set; } /// /// Gets or Sets FirstName /// [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } + public Option FirstName { get; set; } /// /// Gets or Sets LastName /// [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } + public Option LastName { get; set; } /// /// Gets or Sets Email /// [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } + public Option Email { get; set; } /// /// Gets or Sets Password /// [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } + public Option Password { get; set; } /// /// Gets or Sets Phone /// [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } + public Option Phone { get; set; } /// /// User Status /// /// User Status [DataMember(Name = "userStatus", EmitDefaultValue = false)] - public int UserStatus { get; set; } + public Option UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] - public Object ObjectWithNoDeclaredProps { get; set; } + public Option ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] - public Object ObjectWithNoDeclaredPropsNullable { get; set; } + public Option ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] - public Object AnyTypeProp { get; set; } + public Option AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] - public Object AnyTypePropNullable { get; set; } + public Option AnyTypePropNullable { get; set; } /// /// Returns the string presentation of the object @@ -202,47 +238,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Username.IsSet && this.Username.Value != null) + { + hashCode = (hashCode * 59) + this.Username.Value.GetHashCode(); + } + if (this.FirstName.IsSet && this.FirstName.Value != null) { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); + hashCode = (hashCode * 59) + this.FirstName.Value.GetHashCode(); } - if (this.FirstName != null) + if (this.LastName.IsSet && this.LastName.Value != null) { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.LastName.Value.GetHashCode(); } - if (this.LastName != null) + if (this.Email.IsSet && this.Email.Value != null) { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + hashCode = (hashCode * 59) + this.Email.Value.GetHashCode(); } - if (this.Email != null) + if (this.Password.IsSet && this.Password.Value != null) { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); + hashCode = (hashCode * 59) + this.Password.Value.GetHashCode(); } - if (this.Password != null) + if (this.Phone.IsSet && this.Phone.Value != null) { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); + hashCode = (hashCode * 59) + this.Phone.Value.GetHashCode(); } - if (this.Phone != null) + if (this.UserStatus.IsSet) { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); + hashCode = (hashCode * 59) + this.UserStatus.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) + if (this.ObjectWithNoDeclaredProps.IsSet && this.ObjectWithNoDeclaredProps.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.Value.GetHashCode(); } - if (this.ObjectWithNoDeclaredPropsNullable != null) + if (this.ObjectWithNoDeclaredPropsNullable.IsSet && this.ObjectWithNoDeclaredPropsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.Value.GetHashCode(); } - if (this.AnyTypeProp != null) + if (this.AnyTypeProp.IsSet && this.AnyTypeProp.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypeProp.Value.GetHashCode(); } - if (this.AnyTypePropNullable != null) + if (this.AnyTypePropNullable.IsSet && this.AnyTypePropNullable.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypePropNullable.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Whale.cs index cd6eb8c0b1be..eb211e70956f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,29 +44,29 @@ protected Whale() { } /// hasBaleen. /// hasTeeth. /// className (required). - public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) + public Whale(Option hasBaleen = default(Option), Option hasTeeth = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Whale and cannot be null"); } - this.ClassName = className; this.HasBaleen = hasBaleen; this.HasTeeth = hasTeeth; + this.ClassName = className; } /// /// Gets or Sets HasBaleen /// [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] - public bool HasBaleen { get; set; } + public Option HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] - public bool HasTeeth { get; set; } + public Option HasTeeth { get; set; } /// /// Gets or Sets ClassName @@ -126,8 +127,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); + if (this.HasBaleen.IsSet) + { + hashCode = (hashCode * 59) + this.HasBaleen.Value.GetHashCode(); + } + if (this.HasTeeth.IsSet) + { + hashCode = (hashCode * 59) + this.HasTeeth.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 314fae589fc5..3bb224da1e43 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,7 +63,7 @@ public enum TypeEnum /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } + public Option Type { get; set; } /// /// Initializes a new instance of the class. /// @@ -76,15 +77,15 @@ protected Zebra() /// /// type. /// className (required). - public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) + public Zebra(Option type = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Zebra and cannot be null"); } - this.ClassName = className; this.Type = type; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -153,7 +154,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Type.IsSet) + { + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs index b4ff8d51adb7..15c623dc8d8f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 7036e9fdc825..1e7a142d4114 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,12 +57,12 @@ public enum ZeroBasedEnumEnum /// Gets or Sets ZeroBasedEnum /// [DataMember(Name = "ZeroBasedEnum", EmitDefaultValue = false)] - public ZeroBasedEnumEnum? ZeroBasedEnum { get; set; } + public Option ZeroBasedEnum { get; set; } /// /// Initializes a new instance of the class. /// /// zeroBasedEnum. - public ZeroBasedEnumClass(ZeroBasedEnumEnum? zeroBasedEnum = default(ZeroBasedEnumEnum?)) + public ZeroBasedEnumClass(Option zeroBasedEnum = default(Option)) { this.ZeroBasedEnum = zeroBasedEnum; } @@ -117,7 +118,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.ZeroBasedEnum.GetHashCode(); + if (this.ZeroBasedEnum.IsSet) + { + hashCode = (hashCode * 59) + this.ZeroBasedEnum.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/.openapi-generator/FILES index 2a2fc5407057..b433a5702638 100644 --- a/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/.openapi-generator/FILES @@ -22,6 +22,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Client/ApiClient.cs index 9190dbea600a..e56adcc9570d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Client/ApiClient.cs @@ -30,6 +30,7 @@ using FileIO = System.IO.File; using Polly; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -49,7 +50,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -183,7 +185,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..189058fea4fa --- /dev/null +++ b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,106 @@ +// +/* + * OpenAPI Dates + * + * Thic spec contains endpoints with dates in different formats + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + +#nullable enable + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + Type innerType = value?.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType)!; + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs index 84c9909059ab..beeaf4cf4508 100644 --- a/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs @@ -22,6 +22,7 @@ using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,18 @@ public partial class NowGet200Response : IValidatableObject /// /// today. /// now. - public NowGet200Response(DateTime today = default(DateTime), DateTime now = default(DateTime)) + public NowGet200Response(Option today = default(Option), Option now = default(Option)) { + // to ensure "today" (not nullable) is not null + if (today.IsSet && today.Value == null) + { + throw new ArgumentNullException("today isn't a nullable property for NowGet200Response and cannot be null"); + } + // to ensure "now" (not nullable) is not null + if (now.IsSet && now.Value == null) + { + throw new ArgumentNullException("now isn't a nullable property for NowGet200Response and cannot be null"); + } this.Today = today; this.Now = now; } @@ -47,13 +58,13 @@ public partial class NowGet200Response : IValidatableObject /// [DataMember(Name = "today", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime Today { get; set; } + public Option Today { get; set; } /// /// Gets or Sets Now /// [DataMember(Name = "now", EmitDefaultValue = false)] - public DateTime Now { get; set; } + public Option Now { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/.openapi-generator/FILES index 2a5dbfbe6e6f..f753fca78d64 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/.openapi-generator/FILES @@ -133,6 +133,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FakeApi.md index 06309f31e8a5..b926dc908fd9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool? body = null) +> bool FakeOuterBooleanSerialize (bool body = null) @@ -134,7 +134,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = true; // bool? | Input boolean as post body (optional) + var body = true; // bool | Input boolean as post body (optional) try { @@ -175,7 +175,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **bool?** | Input boolean as post body | [optional] | +| **body** | **bool** | Input boolean as post body | [optional] | ### Return type @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal? body = null) +> decimal FakeOuterNumberSerialize (decimal body = null) @@ -312,7 +312,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14D; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal | Input number as post body (optional) try { @@ -353,7 +353,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **decimal?** | Input number as post body | [optional] | +| **body** | **decimal** | Input number as post body | [optional] | ### Return type @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1098,14 +1098,14 @@ namespace Example var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789L; // long? | None (optional) - var varFloat = 3.4F; // float? | None (optional) + var integer = 56; // int | None (optional) + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var varFloat = 3.4F; // float | None (optional) var varString = "varString_example"; // string | None (optional) var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) @@ -1150,14 +1150,14 @@ catch (ApiException e) | **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int?** | None | [optional] | -| **int32** | **int?** | None | [optional] | -| **int64** | **long?** | None | [optional] | -| **varFloat** | **float?** | None | [optional] | +| **integer** | **int** | None | [optional] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **varFloat** | **float** | None | [optional] | | **varString** | **string** | None | [optional] | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | -| **date** | **DateTime?** | None | [optional] | -| **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **date** | **DateTime** | None | [optional] | +| **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | | **password** | **string** | None | [optional] | | **callback** | **string** | None | [optional] | @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -1212,8 +1212,8 @@ namespace Example var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -1258,8 +1258,8 @@ catch (ApiException e) | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | -| **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | | **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) Fake endpoint to test group parameters (optional) @@ -1316,9 +1316,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789L; // long? | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) + var booleanGroup = true; // bool | Boolean in group parameters (optional) + var int64Group = 789L; // long | Integer in group parameters (optional) try { @@ -1360,9 +1360,9 @@ catch (ApiException e) | **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | -| **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | -| **int64Group** | **long?** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | +| **booleanGroup** | **bool** | Boolean in group parameters | [optional] | +| **int64Group** | **long** | Integer in group parameters | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/RequiredClass.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/RequiredClass.md index 07b6f018f6c1..3400459756d2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/RequiredClass.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/RequiredClass.md @@ -33,8 +33,8 @@ Name | Type | Description | Notes **NotrequiredNullableEnumIntegerOnly** | **int?** | | [optional] **NotrequiredNotnullableEnumIntegerOnly** | **int** | | [optional] **RequiredNotnullableEnumString** | **string** | | -**RequiredNullableEnumString** | **string** | | -**NotrequiredNullableEnumString** | **string** | | [optional] +**RequiredNullableEnumString** | **string?** | | +**NotrequiredNullableEnumString** | **string?** | | [optional] **NotrequiredNotnullableEnumString** | **string** | | [optional] **RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | **RequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 95d41fcbd942..3437138cacd2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -301,9 +299,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/DefaultApi.cs index 354f9eb6d9f2..11aeb829749a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -517,9 +517,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -588,9 +586,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs index 82d3054c5a90..85535bfbd190 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs @@ -55,7 +55,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); + bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -67,7 +67,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -78,7 +78,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0); /// /// @@ -90,7 +90,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0); /// /// /// @@ -101,7 +101,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); + decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -113,7 +113,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -125,7 +125,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// string - string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string), int operationIndex = 0); + string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// @@ -138,7 +138,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string), int operationIndex = 0); + ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// Array of Enums /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -329,7 +329,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// To test enum parameters /// @@ -347,7 +347,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// To test enum parameters @@ -366,7 +366,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -382,7 +382,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -399,7 +399,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// test inline additionalProperties /// @@ -480,7 +480,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// @@ -500,7 +500,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// test referenced string map /// @@ -564,7 +564,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -577,7 +577,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -589,7 +589,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -602,7 +602,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -614,7 +614,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -627,7 +627,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -640,7 +640,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -654,7 +654,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -850,7 +850,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -876,7 +876,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -895,7 +895,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -915,7 +915,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -932,7 +932,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -950,7 +950,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -1047,7 +1047,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -1068,7 +1068,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test referenced string map /// @@ -1347,7 +1347,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) + public bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1360,7 +1360,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1413,7 +1413,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1427,7 +1427,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1481,7 +1481,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1494,8 +1494,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1547,7 +1551,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1561,8 +1565,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1615,7 +1623,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) + public decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1628,7 +1636,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1681,7 +1689,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1695,7 +1703,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1750,7 +1758,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string), int operationIndex = 0) + public string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, body); return localVarResponse.Data; @@ -1764,8 +1772,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1819,7 +1835,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(requiredStringUuid, body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1834,8 +1850,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2283,9 +2307,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2354,9 +2376,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2425,9 +2445,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2496,9 +2514,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2569,15 +2585,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2649,15 +2661,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2728,9 +2736,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2801,9 +2807,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2870,7 +2874,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); } @@ -2895,19 +2899,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2931,49 +2955,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3021,7 +3045,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEndpointParametersWithHttpInfoAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3047,19 +3071,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3084,49 +3128,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3168,7 +3212,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -3187,8 +3231,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -3211,37 +3279,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3277,7 +3345,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3297,8 +3365,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3322,37 +3414,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3386,7 +3478,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -3403,7 +3495,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3428,18 +3520,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3479,7 +3571,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3497,7 +3589,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3523,18 +3615,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3585,9 +3677,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3656,9 +3746,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3727,9 +3815,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3798,9 +3884,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3871,15 +3955,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3951,15 +4031,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4021,7 +4097,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } @@ -4041,49 +4117,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4113,13 +4183,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4156,7 +4226,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -4177,49 +4247,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4250,13 +4314,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4301,9 +4365,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4372,9 +4434,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index dd74c66d1544..9f168cc6adb2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -306,9 +304,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs index 7a34dc4fe192..20b583356df9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs @@ -55,7 +55,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); + void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Deletes a pet @@ -68,7 +68,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); + ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Finds Pets by status /// @@ -169,7 +169,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -183,7 +183,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// uploads an image /// @@ -193,7 +193,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image @@ -207,7 +207,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image (required) /// @@ -217,7 +217,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); /// /// uploads an image (required) @@ -231,7 +231,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -278,7 +278,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -292,7 +292,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -408,7 +408,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -423,7 +423,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -437,7 +437,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -452,7 +452,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -466,7 +466,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -481,7 +481,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -625,9 +625,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -729,9 +727,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -818,7 +814,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) + public void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -831,8 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -855,9 +855,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -903,7 +903,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -917,8 +917,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -942,9 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -1006,9 +1010,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1111,9 +1113,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1218,9 +1218,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,9 +1323,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1583,9 +1579,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1687,9 +1681,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1777,7 +1769,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1791,8 +1783,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1816,13 +1816,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1869,7 +1869,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1884,8 +1884,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1910,13 +1918,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1963,7 +1971,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1978,8 +1986,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2004,13 +2020,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2057,7 +2073,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2073,8 +2089,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2100,13 +2124,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2153,7 +2177,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -2168,13 +2192,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2201,9 +2227,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); @@ -2251,7 +2277,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2267,13 +2293,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2301,9 +2329,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs index e8bed0a150ec..1ffc5a694f5b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs @@ -364,9 +364,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -434,9 +432,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -775,9 +771,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -849,9 +843,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/UserApi.cs index 8efb827cdc00..3a89a6e99556 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/UserApi.cs @@ -552,9 +552,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -623,9 +621,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -694,9 +690,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -765,9 +759,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -836,9 +828,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -907,9 +897,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -978,9 +966,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1048,9 +1034,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1119,9 +1103,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1192,9 +1174,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1267,15 +1247,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1349,15 +1325,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1552,15 +1524,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1632,15 +1600,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs index a55d7f34afc6..9c2644600398 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs @@ -32,6 +32,7 @@ using Polly; using Org.OpenAPITools.Client.Auth; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -51,7 +52,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -185,7 +187,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..722d06c6b323 --- /dev/null +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,124 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + Type innerType = value.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs index 3bcf6d5f664f..9e982dd62c66 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class Activity : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// activityOutputs. - public Activity(Dictionary> activityOutputs = default(Dictionary>)) + public Activity(Option>> activityOutputs = default(Option>>)) { + // to ensure "activityOutputs" (not nullable) is not null + if (activityOutputs.IsSet && activityOutputs.Value == null) + { + throw new ArgumentNullException("activityOutputs isn't a nullable property for Activity and cannot be null"); + } this._ActivityOutputs = activityOutputs; - if (this.ActivityOutputs != null) + if (this.ActivityOutputs.IsSet) { this._flagActivityOutputs = true; } @@ -50,7 +56,7 @@ public partial class Activity : IEquatable, IValidatableObject /// Gets or Sets ActivityOutputs /// [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] - public Dictionary> ActivityOutputs + public Option>> ActivityOutputs { get{ return _ActivityOutputs;} set @@ -59,7 +65,7 @@ public Dictionary> ActivityOut _flagActivityOutputs = true; } } - private Dictionary> _ActivityOutputs; + private Option>> _ActivityOutputs; private bool _flagActivityOutputs; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActivityOutputs != null) + if (this.ActivityOutputs.IsSet && this.ActivityOutputs.Value != null) { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); + hashCode = (hashCode * 59) + this.ActivityOutputs.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 2381b5f5ddcb..aecf7233da24 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,15 +38,25 @@ public partial class ActivityOutputElementRepresentation : IEquatable /// prop1. /// prop2. - public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + public ActivityOutputElementRepresentation(Option prop1 = default(Option), Option prop2 = default(Option)) { + // to ensure "prop1" (not nullable) is not null + if (prop1.IsSet && prop1.Value == null) + { + throw new ArgumentNullException("prop1 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } + // to ensure "prop2" (not nullable) is not null + if (prop2.IsSet && prop2.Value == null) + { + throw new ArgumentNullException("prop2 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } this._Prop1 = prop1; - if (this.Prop1 != null) + if (this.Prop1.IsSet) { this._flagProp1 = true; } this._Prop2 = prop2; - if (this.Prop2 != null) + if (this.Prop2.IsSet) { this._flagProp2 = true; } @@ -56,7 +67,7 @@ public partial class ActivityOutputElementRepresentation : IEquatable [DataMember(Name = "prop1", EmitDefaultValue = false)] - public string Prop1 + public Option Prop1 { get{ return _Prop1;} set @@ -65,7 +76,7 @@ public string Prop1 _flagProp1 = true; } } - private string _Prop1; + private Option _Prop1; private bool _flagProp1; /// @@ -80,7 +91,7 @@ public bool ShouldSerializeProp1() /// Gets or Sets Prop2 /// [DataMember(Name = "prop2", EmitDefaultValue = false)] - public Object Prop2 + public Option Prop2 { get{ return _Prop2;} set @@ -89,7 +100,7 @@ public Object Prop2 _flagProp2 = true; } } - private Object _Prop2; + private Option _Prop2; private bool _flagProp2; /// @@ -159,13 +170,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Prop1 != null) + if (this.Prop1.IsSet && this.Prop1.Value != null) { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop1.Value.GetHashCode(); } - if (this.Prop2 != null) + if (this.Prop2.IsSet && this.Prop2.Value != null) { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop2.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 2cfd7dde8a82..d7d43405bc66 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,45 +44,80 @@ public partial class AdditionalPropertiesClass : IEquatablemapWithUndeclaredPropertiesAnytype3. /// an object with no declared properties and no undeclared properties, hence it's an empty map.. /// mapWithUndeclaredPropertiesString. - public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) + public AdditionalPropertiesClass(Option> mapProperty = default(Option>), Option>> mapOfMapProperty = default(Option>>), Option anytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype2 = default(Option), Option> mapWithUndeclaredPropertiesAnytype3 = default(Option>), Option emptyMap = default(Option), Option> mapWithUndeclaredPropertiesString = default(Option>)) { + // to ensure "mapProperty" (not nullable) is not null + if (mapProperty.IsSet && mapProperty.Value == null) + { + throw new ArgumentNullException("mapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapOfMapProperty" (not nullable) is not null + if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) + { + throw new ArgumentNullException("mapOfMapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype1" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype2" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype3" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "emptyMap" (not nullable) is not null + if (emptyMap.IsSet && emptyMap.Value == null) + { + throw new ArgumentNullException("emptyMap isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesString" (not nullable) is not null + if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesString isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } this._MapProperty = mapProperty; - if (this.MapProperty != null) + if (this.MapProperty.IsSet) { this._flagMapProperty = true; } this._MapOfMapProperty = mapOfMapProperty; - if (this.MapOfMapProperty != null) + if (this.MapOfMapProperty.IsSet) { this._flagMapOfMapProperty = true; } this._Anytype1 = anytype1; - if (this.Anytype1 != null) + if (this.Anytype1.IsSet) { this._flagAnytype1 = true; } this._MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; - if (this.MapWithUndeclaredPropertiesAnytype1 != null) + if (this.MapWithUndeclaredPropertiesAnytype1.IsSet) { this._flagMapWithUndeclaredPropertiesAnytype1 = true; } this._MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; - if (this.MapWithUndeclaredPropertiesAnytype2 != null) + if (this.MapWithUndeclaredPropertiesAnytype2.IsSet) { this._flagMapWithUndeclaredPropertiesAnytype2 = true; } this._MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; - if (this.MapWithUndeclaredPropertiesAnytype3 != null) + if (this.MapWithUndeclaredPropertiesAnytype3.IsSet) { this._flagMapWithUndeclaredPropertiesAnytype3 = true; } this._EmptyMap = emptyMap; - if (this.EmptyMap != null) + if (this.EmptyMap.IsSet) { this._flagEmptyMap = true; } this._MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; - if (this.MapWithUndeclaredPropertiesString != null) + if (this.MapWithUndeclaredPropertiesString.IsSet) { this._flagMapWithUndeclaredPropertiesString = true; } @@ -92,7 +128,7 @@ public partial class AdditionalPropertiesClass : IEquatable [DataMember(Name = "map_property", EmitDefaultValue = false)] - public Dictionary MapProperty + public Option> MapProperty { get{ return _MapProperty;} set @@ -101,7 +137,7 @@ public Dictionary MapProperty _flagMapProperty = true; } } - private Dictionary _MapProperty; + private Option> _MapProperty; private bool _flagMapProperty; /// @@ -116,7 +152,7 @@ public bool ShouldSerializeMapProperty() /// Gets or Sets MapOfMapProperty /// [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] - public Dictionary> MapOfMapProperty + public Option>> MapOfMapProperty { get{ return _MapOfMapProperty;} set @@ -125,7 +161,7 @@ public Dictionary> MapOfMapProperty _flagMapOfMapProperty = true; } } - private Dictionary> _MapOfMapProperty; + private Option>> _MapOfMapProperty; private bool _flagMapOfMapProperty; /// @@ -140,7 +176,7 @@ public bool ShouldSerializeMapOfMapProperty() /// Gets or Sets Anytype1 /// [DataMember(Name = "anytype_1", EmitDefaultValue = true)] - public Object Anytype1 + public Option Anytype1 { get{ return _Anytype1;} set @@ -149,7 +185,7 @@ public Object Anytype1 _flagAnytype1 = true; } } - private Object _Anytype1; + private Option _Anytype1; private bool _flagAnytype1; /// @@ -164,7 +200,7 @@ public bool ShouldSerializeAnytype1() /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype1 + public Option MapWithUndeclaredPropertiesAnytype1 { get{ return _MapWithUndeclaredPropertiesAnytype1;} set @@ -173,7 +209,7 @@ public Object MapWithUndeclaredPropertiesAnytype1 _flagMapWithUndeclaredPropertiesAnytype1 = true; } } - private Object _MapWithUndeclaredPropertiesAnytype1; + private Option _MapWithUndeclaredPropertiesAnytype1; private bool _flagMapWithUndeclaredPropertiesAnytype1; /// @@ -188,7 +224,7 @@ public bool ShouldSerializeMapWithUndeclaredPropertiesAnytype1() /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype2 + public Option MapWithUndeclaredPropertiesAnytype2 { get{ return _MapWithUndeclaredPropertiesAnytype2;} set @@ -197,7 +233,7 @@ public Object MapWithUndeclaredPropertiesAnytype2 _flagMapWithUndeclaredPropertiesAnytype2 = true; } } - private Object _MapWithUndeclaredPropertiesAnytype2; + private Option _MapWithUndeclaredPropertiesAnytype2; private bool _flagMapWithUndeclaredPropertiesAnytype2; /// @@ -212,7 +248,7 @@ public bool ShouldSerializeMapWithUndeclaredPropertiesAnytype2() /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesAnytype3 + public Option> MapWithUndeclaredPropertiesAnytype3 { get{ return _MapWithUndeclaredPropertiesAnytype3;} set @@ -221,7 +257,7 @@ public Dictionary MapWithUndeclaredPropertiesAnytype3 _flagMapWithUndeclaredPropertiesAnytype3 = true; } } - private Dictionary _MapWithUndeclaredPropertiesAnytype3; + private Option> _MapWithUndeclaredPropertiesAnytype3; private bool _flagMapWithUndeclaredPropertiesAnytype3; /// @@ -237,7 +273,7 @@ public bool ShouldSerializeMapWithUndeclaredPropertiesAnytype3() /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. [DataMember(Name = "empty_map", EmitDefaultValue = false)] - public Object EmptyMap + public Option EmptyMap { get{ return _EmptyMap;} set @@ -246,7 +282,7 @@ public Object EmptyMap _flagEmptyMap = true; } } - private Object _EmptyMap; + private Option _EmptyMap; private bool _flagEmptyMap; /// @@ -261,7 +297,7 @@ public bool ShouldSerializeEmptyMap() /// Gets or Sets MapWithUndeclaredPropertiesString /// [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesString + public Option> MapWithUndeclaredPropertiesString { get{ return _MapWithUndeclaredPropertiesString;} set @@ -270,7 +306,7 @@ public Dictionary MapWithUndeclaredPropertiesString _flagMapWithUndeclaredPropertiesString = true; } } - private Dictionary _MapWithUndeclaredPropertiesString; + private Option> _MapWithUndeclaredPropertiesString; private bool _flagMapWithUndeclaredPropertiesString; /// @@ -346,37 +382,37 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapProperty != null) + if (this.MapProperty.IsSet && this.MapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapProperty.Value.GetHashCode(); } - if (this.MapOfMapProperty != null) + if (this.MapOfMapProperty.IsSet && this.MapOfMapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfMapProperty.Value.GetHashCode(); } - if (this.Anytype1 != null) + if (this.Anytype1.IsSet && this.Anytype1.Value != null) { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.Anytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) + if (this.MapWithUndeclaredPropertiesAnytype1.IsSet && this.MapWithUndeclaredPropertiesAnytype1.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) + if (this.MapWithUndeclaredPropertiesAnytype2.IsSet && this.MapWithUndeclaredPropertiesAnytype2.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) + if (this.MapWithUndeclaredPropertiesAnytype3.IsSet && this.MapWithUndeclaredPropertiesAnytype3.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.Value.GetHashCode(); } - if (this.EmptyMap != null) + if (this.EmptyMap.IsSet && this.EmptyMap.Value != null) { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); + hashCode = (hashCode * 59) + this.EmptyMap.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesString != null) + if (this.MapWithUndeclaredPropertiesString.IsSet && this.MapWithUndeclaredPropertiesString.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs index d87e72647001..27995fdaa9bc 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -49,14 +50,21 @@ protected Animal() /// /// className (required). /// color (default to "red"). - public Animal(string className = default(string), string color = @"red") + public Animal(string className = default(string), Option color = default(Option)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Animal and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for Animal and cannot be null"); } this._ClassName = className; + this._flagClassName = true; + this._Color = color.IsSet ? color : new Option(@"red"); this.AdditionalProperties = new Dictionary(); } @@ -88,7 +96,7 @@ public bool ShouldSerializeClassName() /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color + public Option Color { get{ return _Color;} set @@ -97,7 +105,7 @@ public string Color _flagColor = true; } } - private string _Color; + private Option _Color; private bool _flagColor; /// @@ -171,9 +179,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); } - if (this.Color != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs index 440c5810db56..2dbf0d031b4a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,20 +39,30 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// code. /// type. /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) + public ApiResponse(Option code = default(Option), Option type = default(Option), Option message = default(Option)) { + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for ApiResponse and cannot be null"); + } + // to ensure "message" (not nullable) is not null + if (message.IsSet && message.Value == null) + { + throw new ArgumentNullException("message isn't a nullable property for ApiResponse and cannot be null"); + } this._Code = code; - if (this.Code != null) + if (this.Code.IsSet) { this._flagCode = true; } this._Type = type; - if (this.Type != null) + if (this.Type.IsSet) { this._flagType = true; } this._Message = message; - if (this.Message != null) + if (this.Message.IsSet) { this._flagMessage = true; } @@ -62,7 +73,7 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// Gets or Sets Code /// [DataMember(Name = "code", EmitDefaultValue = false)] - public int Code + public Option Code { get{ return _Code;} set @@ -71,7 +82,7 @@ public int Code _flagCode = true; } } - private int _Code; + private Option _Code; private bool _flagCode; /// @@ -86,7 +97,7 @@ public bool ShouldSerializeCode() /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type + public Option Type { get{ return _Type;} set @@ -95,7 +106,7 @@ public string Type _flagType = true; } } - private string _Type; + private Option _Type; private bool _flagType; /// @@ -110,7 +121,7 @@ public bool ShouldSerializeType() /// Gets or Sets Message /// [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message + public Option Message { get{ return _Message;} set @@ -119,7 +130,7 @@ public string Message _flagMessage = true; } } - private string _Message; + private Option _Message; private bool _flagMessage; /// @@ -190,14 +201,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) + if (this.Code.IsSet) + { + hashCode = (hashCode * 59) + this.Code.Value.GetHashCode(); + } + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.Message != null) + if (this.Message.IsSet && this.Message.Value != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this.Message.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs index 1e7afc9dbb05..f1f7f5569e88 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,20 +39,35 @@ public partial class Apple : IEquatable, IValidatableObject /// cultivar. /// origin. /// colorCode. - public Apple(string cultivar = default(string), string origin = default(string), string colorCode = default(string)) + public Apple(Option cultivar = default(Option), Option origin = default(Option), Option colorCode = default(Option)) { + // to ensure "cultivar" (not nullable) is not null + if (cultivar.IsSet && cultivar.Value == null) + { + throw new ArgumentNullException("cultivar isn't a nullable property for Apple and cannot be null"); + } + // to ensure "origin" (not nullable) is not null + if (origin.IsSet && origin.Value == null) + { + throw new ArgumentNullException("origin isn't a nullable property for Apple and cannot be null"); + } + // to ensure "colorCode" (not nullable) is not null + if (colorCode.IsSet && colorCode.Value == null) + { + throw new ArgumentNullException("colorCode isn't a nullable property for Apple and cannot be null"); + } this._Cultivar = cultivar; - if (this.Cultivar != null) + if (this.Cultivar.IsSet) { this._flagCultivar = true; } this._Origin = origin; - if (this.Origin != null) + if (this.Origin.IsSet) { this._flagOrigin = true; } this._ColorCode = colorCode; - if (this.ColorCode != null) + if (this.ColorCode.IsSet) { this._flagColorCode = true; } @@ -62,7 +78,7 @@ public partial class Apple : IEquatable, IValidatableObject /// Gets or Sets Cultivar /// [DataMember(Name = "cultivar", EmitDefaultValue = false)] - public string Cultivar + public Option Cultivar { get{ return _Cultivar;} set @@ -71,7 +87,7 @@ public string Cultivar _flagCultivar = true; } } - private string _Cultivar; + private Option _Cultivar; private bool _flagCultivar; /// @@ -86,7 +102,7 @@ public bool ShouldSerializeCultivar() /// Gets or Sets Origin /// [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin + public Option Origin { get{ return _Origin;} set @@ -95,7 +111,7 @@ public string Origin _flagOrigin = true; } } - private string _Origin; + private Option _Origin; private bool _flagOrigin; /// @@ -110,7 +126,7 @@ public bool ShouldSerializeOrigin() /// Gets or Sets ColorCode /// [DataMember(Name = "color_code", EmitDefaultValue = false)] - public string ColorCode + public Option ColorCode { get{ return _ColorCode;} set @@ -119,7 +135,7 @@ public string ColorCode _flagColorCode = true; } } - private string _ColorCode; + private Option _ColorCode; private bool _flagColorCode; /// @@ -190,17 +206,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Cultivar != null) + if (this.Cultivar.IsSet && this.Cultivar.Value != null) { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); + hashCode = (hashCode * 59) + this.Cultivar.Value.GetHashCode(); } - if (this.Origin != null) + if (this.Origin.IsSet && this.Origin.Value != null) { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); + hashCode = (hashCode * 59) + this.Origin.Value.GetHashCode(); } - if (this.ColorCode != null) + if (this.ColorCode.IsSet && this.ColorCode.Value != null) { - hashCode = (hashCode * 59) + this.ColorCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorCode.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs index 02fb11509662..1c459e2284a2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,16 +43,17 @@ protected AppleReq() { } /// /// cultivar (required). /// mealy. - public AppleReq(string cultivar = default(string), bool mealy = default(bool)) + public AppleReq(string cultivar = default(string), Option mealy = default(Option)) { - // to ensure "cultivar" is required (not null) + // to ensure "cultivar" (not nullable) is not null if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); + throw new ArgumentNullException("cultivar isn't a nullable property for AppleReq and cannot be null"); } this._Cultivar = cultivar; + this._flagCultivar = true; this._Mealy = mealy; - if (this.Mealy != null) + if (this.Mealy.IsSet) { this._flagMealy = true; } @@ -85,7 +87,7 @@ public bool ShouldSerializeCultivar() /// Gets or Sets Mealy /// [DataMember(Name = "mealy", EmitDefaultValue = true)] - public bool Mealy + public Option Mealy { get{ return _Mealy;} set @@ -94,7 +96,7 @@ public bool Mealy _flagMealy = true; } } - private bool _Mealy; + private Option _Mealy; private bool _flagMealy; /// @@ -161,7 +163,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); + if (this.Mealy.IsSet) + { + hashCode = (hashCode * 59) + this.Mealy.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 02324a9b5349..6b2a7bca8d2e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable class. /// /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + public ArrayOfArrayOfNumberOnly(Option>> arrayArrayNumber = default(Option>>)) { + // to ensure "arrayArrayNumber" (not nullable) is not null + if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) + { + throw new ArgumentNullException("arrayArrayNumber isn't a nullable property for ArrayOfArrayOfNumberOnly and cannot be null"); + } this._ArrayArrayNumber = arrayArrayNumber; - if (this.ArrayArrayNumber != null) + if (this.ArrayArrayNumber.IsSet) { this._flagArrayArrayNumber = true; } @@ -50,7 +56,7 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] - public List> ArrayArrayNumber + public Option>> ArrayArrayNumber { get{ return _ArrayArrayNumber;} set @@ -59,7 +65,7 @@ public List> ArrayArrayNumber _flagArrayArrayNumber = true; } } - private List> _ArrayArrayNumber; + private Option>> _ArrayArrayNumber; private bool _flagArrayArrayNumber; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayArrayNumber != null) + if (this.ArrayArrayNumber.IsSet && this.ArrayArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index f124f50a69d5..b7645c3c34fd 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Initializes a new instance of the class. /// /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) + public ArrayOfNumberOnly(Option> arrayNumber = default(Option>)) { + // to ensure "arrayNumber" (not nullable) is not null + if (arrayNumber.IsSet && arrayNumber.Value == null) + { + throw new ArgumentNullException("arrayNumber isn't a nullable property for ArrayOfNumberOnly and cannot be null"); + } this._ArrayNumber = arrayNumber; - if (this.ArrayNumber != null) + if (this.ArrayNumber.IsSet) { this._flagArrayNumber = true; } @@ -50,7 +56,7 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Gets or Sets ArrayNumber /// [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] - public List ArrayNumber + public Option> ArrayNumber { get{ return _ArrayNumber;} set @@ -59,7 +65,7 @@ public List ArrayNumber _flagArrayNumber = true; } } - private List _ArrayNumber; + private Option> _ArrayNumber; private bool _flagArrayNumber; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayNumber != null) + if (this.ArrayNumber.IsSet && this.ArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs index b62c42c722ce..b528432c25ab 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,20 +39,35 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// arrayOfString. /// arrayArrayOfInteger. /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + public ArrayTest(Option> arrayOfString = default(Option>), Option>> arrayArrayOfInteger = default(Option>>), Option>> arrayArrayOfModel = default(Option>>)) { + // to ensure "arrayOfString" (not nullable) is not null + if (arrayOfString.IsSet && arrayOfString.Value == null) + { + throw new ArgumentNullException("arrayOfString isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfInteger" (not nullable) is not null + if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) + { + throw new ArgumentNullException("arrayArrayOfInteger isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfModel" (not nullable) is not null + if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) + { + throw new ArgumentNullException("arrayArrayOfModel isn't a nullable property for ArrayTest and cannot be null"); + } this._ArrayOfString = arrayOfString; - if (this.ArrayOfString != null) + if (this.ArrayOfString.IsSet) { this._flagArrayOfString = true; } this._ArrayArrayOfInteger = arrayArrayOfInteger; - if (this.ArrayArrayOfInteger != null) + if (this.ArrayArrayOfInteger.IsSet) { this._flagArrayArrayOfInteger = true; } this._ArrayArrayOfModel = arrayArrayOfModel; - if (this.ArrayArrayOfModel != null) + if (this.ArrayArrayOfModel.IsSet) { this._flagArrayArrayOfModel = true; } @@ -62,7 +78,7 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// Gets or Sets ArrayOfString /// [DataMember(Name = "array_of_string", EmitDefaultValue = false)] - public List ArrayOfString + public Option> ArrayOfString { get{ return _ArrayOfString;} set @@ -71,7 +87,7 @@ public List ArrayOfString _flagArrayOfString = true; } } - private List _ArrayOfString; + private Option> _ArrayOfString; private bool _flagArrayOfString; /// @@ -86,7 +102,7 @@ public bool ShouldSerializeArrayOfString() /// Gets or Sets ArrayArrayOfInteger /// [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] - public List> ArrayArrayOfInteger + public Option>> ArrayArrayOfInteger { get{ return _ArrayArrayOfInteger;} set @@ -95,7 +111,7 @@ public List> ArrayArrayOfInteger _flagArrayArrayOfInteger = true; } } - private List> _ArrayArrayOfInteger; + private Option>> _ArrayArrayOfInteger; private bool _flagArrayArrayOfInteger; /// @@ -110,7 +126,7 @@ public bool ShouldSerializeArrayArrayOfInteger() /// Gets or Sets ArrayArrayOfModel /// [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] - public List> ArrayArrayOfModel + public Option>> ArrayArrayOfModel { get{ return _ArrayArrayOfModel;} set @@ -119,7 +135,7 @@ public List> ArrayArrayOfModel _flagArrayArrayOfModel = true; } } - private List> _ArrayArrayOfModel; + private Option>> _ArrayArrayOfModel; private bool _flagArrayArrayOfModel; /// @@ -190,17 +206,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayOfString != null) + if (this.ArrayOfString.IsSet && this.ArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayOfString.Value.GetHashCode(); } - if (this.ArrayArrayOfInteger != null) + if (this.ArrayArrayOfInteger.IsSet && this.ArrayArrayOfInteger.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.Value.GetHashCode(); } - if (this.ArrayArrayOfModel != null) + if (this.ArrayArrayOfModel.IsSet && this.ArrayArrayOfModel.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfModel.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs index cc328cf2d95e..0eb59d76cd53 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,10 @@ public partial class Banana : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// lengthCm. - public Banana(decimal lengthCm = default(decimal)) + public Banana(Option lengthCm = default(Option)) { this._LengthCm = lengthCm; - if (this.LengthCm != null) + if (this.LengthCm.IsSet) { this._flagLengthCm = true; } @@ -50,7 +51,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Gets or Sets LengthCm /// [DataMember(Name = "lengthCm", EmitDefaultValue = false)] - public decimal LengthCm + public Option LengthCm { get{ return _LengthCm;} set @@ -59,7 +60,7 @@ public decimal LengthCm _flagLengthCm = true; } } - private decimal _LengthCm; + private Option _LengthCm; private bool _flagLengthCm; /// @@ -128,7 +129,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); + if (this.LengthCm.IsSet) + { + hashCode = (hashCode * 59) + this.LengthCm.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs index 163080fc7a5b..5ec5e90170fe 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,11 +43,12 @@ protected BananaReq() { } /// /// lengthCm (required). /// sweet. - public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool)) + public BananaReq(decimal lengthCm = default(decimal), Option sweet = default(Option)) { this._LengthCm = lengthCm; + this._flagLengthCm = true; this._Sweet = sweet; - if (this.Sweet != null) + if (this.Sweet.IsSet) { this._flagSweet = true; } @@ -80,7 +82,7 @@ public bool ShouldSerializeLengthCm() /// Gets or Sets Sweet /// [DataMember(Name = "sweet", EmitDefaultValue = true)] - public bool Sweet + public Option Sweet { get{ return _Sweet;} set @@ -89,7 +91,7 @@ public bool Sweet _flagSweet = true; } } - private bool _Sweet; + private Option _Sweet; private bool _flagSweet; /// @@ -153,7 +155,10 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); + if (this.Sweet.IsSet) + { + hashCode = (hashCode * 59) + this.Sweet.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs index fa252d7c73c5..0224a6127532 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,12 +47,13 @@ protected BasquePig() /// className (required). public BasquePig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for BasquePig and cannot be null"); } this._ClassName = className; + this._flagClassName = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs index 5759368bc583..c72cba693df0 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -41,35 +42,65 @@ public partial class Capitalization : IEquatable, IValidatableOb /// capitalSnake. /// sCAETHFlowPoints. /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) + public Capitalization(Option smallCamel = default(Option), Option capitalCamel = default(Option), Option smallSnake = default(Option), Option capitalSnake = default(Option), Option sCAETHFlowPoints = default(Option), Option aTTNAME = default(Option)) { + // to ensure "smallCamel" (not nullable) is not null + if (smallCamel.IsSet && smallCamel.Value == null) + { + throw new ArgumentNullException("smallCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalCamel" (not nullable) is not null + if (capitalCamel.IsSet && capitalCamel.Value == null) + { + throw new ArgumentNullException("capitalCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "smallSnake" (not nullable) is not null + if (smallSnake.IsSet && smallSnake.Value == null) + { + throw new ArgumentNullException("smallSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalSnake" (not nullable) is not null + if (capitalSnake.IsSet && capitalSnake.Value == null) + { + throw new ArgumentNullException("capitalSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "sCAETHFlowPoints" (not nullable) is not null + if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) + { + throw new ArgumentNullException("sCAETHFlowPoints isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "aTTNAME" (not nullable) is not null + if (aTTNAME.IsSet && aTTNAME.Value == null) + { + throw new ArgumentNullException("aTTNAME isn't a nullable property for Capitalization and cannot be null"); + } this._SmallCamel = smallCamel; - if (this.SmallCamel != null) + if (this.SmallCamel.IsSet) { this._flagSmallCamel = true; } this._CapitalCamel = capitalCamel; - if (this.CapitalCamel != null) + if (this.CapitalCamel.IsSet) { this._flagCapitalCamel = true; } this._SmallSnake = smallSnake; - if (this.SmallSnake != null) + if (this.SmallSnake.IsSet) { this._flagSmallSnake = true; } this._CapitalSnake = capitalSnake; - if (this.CapitalSnake != null) + if (this.CapitalSnake.IsSet) { this._flagCapitalSnake = true; } this._SCAETHFlowPoints = sCAETHFlowPoints; - if (this.SCAETHFlowPoints != null) + if (this.SCAETHFlowPoints.IsSet) { this._flagSCAETHFlowPoints = true; } this._ATT_NAME = aTTNAME; - if (this.ATT_NAME != null) + if (this.ATT_NAME.IsSet) { this._flagATT_NAME = true; } @@ -80,7 +111,7 @@ public partial class Capitalization : IEquatable, IValidatableOb /// Gets or Sets SmallCamel /// [DataMember(Name = "smallCamel", EmitDefaultValue = false)] - public string SmallCamel + public Option SmallCamel { get{ return _SmallCamel;} set @@ -89,7 +120,7 @@ public string SmallCamel _flagSmallCamel = true; } } - private string _SmallCamel; + private Option _SmallCamel; private bool _flagSmallCamel; /// @@ -104,7 +135,7 @@ public bool ShouldSerializeSmallCamel() /// Gets or Sets CapitalCamel /// [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] - public string CapitalCamel + public Option CapitalCamel { get{ return _CapitalCamel;} set @@ -113,7 +144,7 @@ public string CapitalCamel _flagCapitalCamel = true; } } - private string _CapitalCamel; + private Option _CapitalCamel; private bool _flagCapitalCamel; /// @@ -128,7 +159,7 @@ public bool ShouldSerializeCapitalCamel() /// Gets or Sets SmallSnake /// [DataMember(Name = "small_Snake", EmitDefaultValue = false)] - public string SmallSnake + public Option SmallSnake { get{ return _SmallSnake;} set @@ -137,7 +168,7 @@ public string SmallSnake _flagSmallSnake = true; } } - private string _SmallSnake; + private Option _SmallSnake; private bool _flagSmallSnake; /// @@ -152,7 +183,7 @@ public bool ShouldSerializeSmallSnake() /// Gets or Sets CapitalSnake /// [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] - public string CapitalSnake + public Option CapitalSnake { get{ return _CapitalSnake;} set @@ -161,7 +192,7 @@ public string CapitalSnake _flagCapitalSnake = true; } } - private string _CapitalSnake; + private Option _CapitalSnake; private bool _flagCapitalSnake; /// @@ -176,7 +207,7 @@ public bool ShouldSerializeCapitalSnake() /// Gets or Sets SCAETHFlowPoints /// [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] - public string SCAETHFlowPoints + public Option SCAETHFlowPoints { get{ return _SCAETHFlowPoints;} set @@ -185,7 +216,7 @@ public string SCAETHFlowPoints _flagSCAETHFlowPoints = true; } } - private string _SCAETHFlowPoints; + private Option _SCAETHFlowPoints; private bool _flagSCAETHFlowPoints; /// @@ -201,7 +232,7 @@ public bool ShouldSerializeSCAETHFlowPoints() /// /// Name of the pet [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] - public string ATT_NAME + public Option ATT_NAME { get{ return _ATT_NAME;} set @@ -210,7 +241,7 @@ public string ATT_NAME _flagATT_NAME = true; } } - private string _ATT_NAME; + private Option _ATT_NAME; private bool _flagATT_NAME; /// @@ -284,29 +315,29 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SmallCamel != null) + if (this.SmallCamel.IsSet && this.SmallCamel.Value != null) { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallCamel.Value.GetHashCode(); } - if (this.CapitalCamel != null) + if (this.CapitalCamel.IsSet && this.CapitalCamel.Value != null) { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalCamel.Value.GetHashCode(); } - if (this.SmallSnake != null) + if (this.SmallSnake.IsSet && this.SmallSnake.Value != null) { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallSnake.Value.GetHashCode(); } - if (this.CapitalSnake != null) + if (this.CapitalSnake.IsSet && this.CapitalSnake.Value != null) { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalSnake.Value.GetHashCode(); } - if (this.SCAETHFlowPoints != null) + if (this.SCAETHFlowPoints.IsSet && this.SCAETHFlowPoints.Value != null) { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); + hashCode = (hashCode * 59) + this.SCAETHFlowPoints.Value.GetHashCode(); } - if (this.ATT_NAME != null) + if (this.ATT_NAME.IsSet && this.ATT_NAME.Value != null) { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); + hashCode = (hashCode * 59) + this.ATT_NAME.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs index 2cbd436c91ea..dbbd9dfdaffc 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,10 +49,10 @@ protected Cat() /// declawed. /// className (required) (default to "Cat"). /// color (default to "red"). - public Cat(bool declawed = default(bool), string className = @"Cat", string color = @"red") : base(className, color) + public Cat(Option declawed = default(Option), string className = @"Cat", Option color = default(Option)) : base(className, color) { this._Declawed = declawed; - if (this.Declawed != null) + if (this.Declawed.IsSet) { this._flagDeclawed = true; } @@ -62,7 +63,7 @@ protected Cat() /// Gets or Sets Declawed /// [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed + public Option Declawed { get{ return _Declawed;} set @@ -71,7 +72,7 @@ public bool Declawed _flagDeclawed = true; } } - private bool _Declawed; + private Option _Declawed; private bool _flagDeclawed; /// @@ -141,7 +142,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); + if (this.Declawed.IsSet) + { + hashCode = (hashCode * 59) + this.Declawed.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs index fb7f24b243f5..f9ce7c3bbe86 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,19 +46,20 @@ protected Category() /// /// id. /// name (required) (default to "default-name"). - public Category(long id = default(long), string name = @"default-name") + public Category(Option id = default(Option), string name = @"default-name") { - // to ensure "name" is required (not null) + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); } - this._Name = name; this._Id = id; - if (this.Id != null) + if (this.Id.IsSet) { this._flagId = true; } + this._Name = name; + this._flagName = true; this.AdditionalProperties = new Dictionary(); } @@ -65,7 +67,7 @@ protected Category() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id + public Option Id { get{ return _Id;} set @@ -74,7 +76,7 @@ public long Id _flagId = true; } } - private long _Id; + private Option _Id; private bool _flagId; /// @@ -168,7 +170,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs index ff34516f9e2d..ef292f10e196 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -86,14 +87,20 @@ protected ChildCat() /// /// name. /// petType (required) (default to PetTypeEnum.ChildCat). - public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() + public ChildCat(Option name = default(Option), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this._PetType = petType; + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for ChildCat and cannot be null"); + } this._Name = name; - if (this.Name != null) + if (this.Name.IsSet) { this._flagName = true; } + this._PetType = petType; + this._flagPetType = true; this.AdditionalProperties = new Dictionary(); } @@ -101,7 +108,7 @@ protected ChildCat() /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name + public Option Name { get{ return _Name;} set @@ -110,7 +117,7 @@ public string Name _flagName = true; } } - private string _Name; + private Option _Name; private bool _flagName; /// @@ -181,9 +188,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.PetType.GetHashCode(); if (this.AdditionalProperties != null) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs index ed73f3d6e7fe..1019aafd7642 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClass. - public ClassModel(string varClass = default(string)) + public ClassModel(Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for ClassModel and cannot be null"); + } this._Class = varClass; - if (this.Class != null) + if (this.Class.IsSet) { this._flagClass = true; } @@ -50,7 +56,7 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Gets or Sets Class /// [DataMember(Name = "_class", EmitDefaultValue = false)] - public string Class + public Option Class { get{ return _Class;} set @@ -59,7 +65,7 @@ public string Class _flagClass = true; } } - private string _Class; + private Option _Class; private bool _flagClass; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Class != null) + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index ba076494b12a..3265a383d4b7 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,18 +48,20 @@ protected ComplexQuadrilateral() /// quadrilateralType (required). public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } - this._ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } + this._ShapeType = shapeType; + this._flagShapeType = true; this._QuadrilateralType = quadrilateralType; + this._flagQuadrilateralType = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs index 206676774347..0aa0cddde082 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,12 +47,13 @@ protected DanishPig() /// className (required). public DanishPig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for DanishPig and cannot be null"); } this._ClassName = className; + this._flagClassName = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DateOnlyClass.cs index ee3c89045095..b41b1bb06d1e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// dateOnlyProperty. - public DateOnlyClass(DateTime dateOnlyProperty = default(DateTime)) + public DateOnlyClass(Option dateOnlyProperty = default(Option)) { + // to ensure "dateOnlyProperty" (not nullable) is not null + if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) + { + throw new ArgumentNullException("dateOnlyProperty isn't a nullable property for DateOnlyClass and cannot be null"); + } this._DateOnlyProperty = dateOnlyProperty; - if (this.DateOnlyProperty != null) + if (this.DateOnlyProperty.IsSet) { this._flagDateOnlyProperty = true; } @@ -52,7 +58,7 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Fri Jul 21 00:00:00 UTC 2017 [JsonConverter(typeof(OpenAPIDateConverter))] [DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)] - public DateTime DateOnlyProperty + public Option DateOnlyProperty { get{ return _DateOnlyProperty;} set @@ -61,7 +67,7 @@ public DateTime DateOnlyProperty _flagDateOnlyProperty = true; } } - private DateTime _DateOnlyProperty; + private Option _DateOnlyProperty; private bool _flagDateOnlyProperty; /// @@ -130,9 +136,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.DateOnlyProperty != null) + if (this.DateOnlyProperty.IsSet && this.DateOnlyProperty.Value != null) { - hashCode = (hashCode * 59) + this.DateOnlyProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.DateOnlyProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs index c55a037d2016..dd3666d15239 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Initializes a new instance of the class. /// /// name. - public DeprecatedObject(string name = default(string)) + public DeprecatedObject(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for DeprecatedObject and cannot be null"); + } this._Name = name; - if (this.Name != null) + if (this.Name.IsSet) { this._flagName = true; } @@ -50,7 +56,7 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name + public Option Name { get{ return _Name;} set @@ -59,7 +65,7 @@ public string Name _flagName = true; } } - private string _Name; + private Option _Name; private bool _flagName; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs index f18adc07b2b4..6225ca85908c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,10 +49,15 @@ protected Dog() /// breed. /// className (required) (default to "Dog"). /// color (default to "red"). - public Dog(string breed = default(string), string className = @"Dog", string color = @"red") : base(className, color) + public Dog(Option breed = default(Option), string className = @"Dog", Option color = default(Option)) : base(className, color) { + // to ensure "breed" (not nullable) is not null + if (breed.IsSet && breed.Value == null) + { + throw new ArgumentNullException("breed isn't a nullable property for Dog and cannot be null"); + } this._Breed = breed; - if (this.Breed != null) + if (this.Breed.IsSet) { this._flagBreed = true; } @@ -62,7 +68,7 @@ protected Dog() /// Gets or Sets Breed /// [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed + public Option Breed { get{ return _Breed;} set @@ -71,7 +77,7 @@ public string Breed _flagBreed = true; } } - private string _Breed; + private Option _Breed; private bool _flagBreed; /// @@ -141,9 +147,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) + if (this.Breed.IsSet && this.Breed.Value != null) { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); + hashCode = (hashCode * 59) + this.Breed.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs index 5792b78f7985..11cad191d689 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,25 +40,35 @@ public partial class Drawing : IEquatable, IValidatableObject /// shapeOrNull. /// nullableShape. /// shapes. - public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) + public Drawing(Option mainShape = default(Option), Option shapeOrNull = default(Option), Option nullableShape = default(Option), Option> shapes = default(Option>)) { + // to ensure "mainShape" (not nullable) is not null + if (mainShape.IsSet && mainShape.Value == null) + { + throw new ArgumentNullException("mainShape isn't a nullable property for Drawing and cannot be null"); + } + // to ensure "shapes" (not nullable) is not null + if (shapes.IsSet && shapes.Value == null) + { + throw new ArgumentNullException("shapes isn't a nullable property for Drawing and cannot be null"); + } this._MainShape = mainShape; - if (this.MainShape != null) + if (this.MainShape.IsSet) { this._flagMainShape = true; } this._ShapeOrNull = shapeOrNull; - if (this.ShapeOrNull != null) + if (this.ShapeOrNull.IsSet) { this._flagShapeOrNull = true; } this._NullableShape = nullableShape; - if (this.NullableShape != null) + if (this.NullableShape.IsSet) { this._flagNullableShape = true; } this._Shapes = shapes; - if (this.Shapes != null) + if (this.Shapes.IsSet) { this._flagShapes = true; } @@ -68,7 +79,7 @@ public partial class Drawing : IEquatable, IValidatableObject /// Gets or Sets MainShape /// [DataMember(Name = "mainShape", EmitDefaultValue = false)] - public Shape MainShape + public Option MainShape { get{ return _MainShape;} set @@ -77,7 +88,7 @@ public Shape MainShape _flagMainShape = true; } } - private Shape _MainShape; + private Option _MainShape; private bool _flagMainShape; /// @@ -92,7 +103,7 @@ public bool ShouldSerializeMainShape() /// Gets or Sets ShapeOrNull /// [DataMember(Name = "shapeOrNull", EmitDefaultValue = true)] - public ShapeOrNull ShapeOrNull + public Option ShapeOrNull { get{ return _ShapeOrNull;} set @@ -101,7 +112,7 @@ public ShapeOrNull ShapeOrNull _flagShapeOrNull = true; } } - private ShapeOrNull _ShapeOrNull; + private Option _ShapeOrNull; private bool _flagShapeOrNull; /// @@ -116,7 +127,7 @@ public bool ShouldSerializeShapeOrNull() /// Gets or Sets NullableShape /// [DataMember(Name = "nullableShape", EmitDefaultValue = true)] - public NullableShape NullableShape + public Option NullableShape { get{ return _NullableShape;} set @@ -125,7 +136,7 @@ public NullableShape NullableShape _flagNullableShape = true; } } - private NullableShape _NullableShape; + private Option _NullableShape; private bool _flagNullableShape; /// @@ -140,7 +151,7 @@ public bool ShouldSerializeNullableShape() /// Gets or Sets Shapes /// [DataMember(Name = "shapes", EmitDefaultValue = false)] - public List Shapes + public Option> Shapes { get{ return _Shapes;} set @@ -149,7 +160,7 @@ public List Shapes _flagShapes = true; } } - private List _Shapes; + private Option> _Shapes; private bool _flagShapes; /// @@ -221,21 +232,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MainShape != null) + if (this.MainShape.IsSet && this.MainShape.Value != null) { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); + hashCode = (hashCode * 59) + this.MainShape.Value.GetHashCode(); } - if (this.ShapeOrNull != null) + if (this.ShapeOrNull.IsSet && this.ShapeOrNull.Value != null) { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); + hashCode = (hashCode * 59) + this.ShapeOrNull.Value.GetHashCode(); } - if (this.NullableShape != null) + if (this.NullableShape.IsSet && this.NullableShape.Value != null) { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableShape.Value.GetHashCode(); } - if (this.Shapes != null) + if (this.Shapes.IsSet && this.Shapes.Value != null) { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); + hashCode = (hashCode * 59) + this.Shapes.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs index 35222bdac3b2..38fe471cbaf2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -57,7 +58,7 @@ public enum JustSymbolEnum /// [DataMember(Name = "just_symbol", EmitDefaultValue = false)] - public JustSymbolEnum? JustSymbol + public Option JustSymbol { get{ return _JustSymbol;} set @@ -66,7 +67,7 @@ public JustSymbolEnum? JustSymbol _flagJustSymbol = true; } } - private JustSymbolEnum? _JustSymbol; + private Option _JustSymbol; private bool _flagJustSymbol; /// @@ -101,15 +102,20 @@ public enum ArrayEnumEnum /// /// justSymbol. /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) + public EnumArrays(Option justSymbol = default(Option), Option> arrayEnum = default(Option>)) { + // to ensure "arrayEnum" (not nullable) is not null + if (arrayEnum.IsSet && arrayEnum.Value == null) + { + throw new ArgumentNullException("arrayEnum isn't a nullable property for EnumArrays and cannot be null"); + } this._JustSymbol = justSymbol; - if (this.JustSymbol != null) + if (this.JustSymbol.IsSet) { this._flagJustSymbol = true; } this._ArrayEnum = arrayEnum; - if (this.ArrayEnum != null) + if (this.ArrayEnum.IsSet) { this._flagArrayEnum = true; } @@ -120,7 +126,7 @@ public enum ArrayEnumEnum /// Gets or Sets ArrayEnum /// [DataMember(Name = "array_enum", EmitDefaultValue = false)] - public List ArrayEnum + public Option> ArrayEnum { get{ return _ArrayEnum;} set @@ -129,7 +135,7 @@ public List ArrayEnum _flagArrayEnum = true; } } - private List _ArrayEnum; + private Option> _ArrayEnum; private bool _flagArrayEnum; /// @@ -199,10 +205,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) + if (this.JustSymbol.IsSet) + { + hashCode = (hashCode * 59) + this.JustSymbol.Value.GetHashCode(); + } + if (this.ArrayEnum.IsSet && this.ArrayEnum.Value != null) { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayEnum.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumClass.cs index c47540b557a3..eb2aa0bd1217 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs index 8f0ea67b780f..212d094446ec 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -93,7 +94,7 @@ public enum EnumStringEnum /// [DataMember(Name = "enum_string", EmitDefaultValue = false)] - public EnumStringEnum? EnumString + public Option EnumString { get{ return _EnumString;} set @@ -102,7 +103,7 @@ public EnumStringEnum? EnumString _flagEnumString = true; } } - private EnumStringEnum? _EnumString; + private Option _EnumString; private bool _flagEnumString; /// @@ -216,7 +217,7 @@ public enum EnumIntegerEnum /// [DataMember(Name = "enum_integer", EmitDefaultValue = false)] - public EnumIntegerEnum? EnumInteger + public Option EnumInteger { get{ return _EnumInteger;} set @@ -225,7 +226,7 @@ public EnumIntegerEnum? EnumInteger _flagEnumInteger = true; } } - private EnumIntegerEnum? _EnumInteger; + private Option _EnumInteger; private bool _flagEnumInteger; /// @@ -258,7 +259,7 @@ public enum EnumIntegerOnlyEnum /// [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] - public EnumIntegerOnlyEnum? EnumIntegerOnly + public Option EnumIntegerOnly { get{ return _EnumIntegerOnly;} set @@ -267,7 +268,7 @@ public EnumIntegerOnlyEnum? EnumIntegerOnly _flagEnumIntegerOnly = true; } } - private EnumIntegerOnlyEnum? _EnumIntegerOnly; + private Option _EnumIntegerOnly; private bool _flagEnumIntegerOnly; /// @@ -303,7 +304,7 @@ public enum EnumNumberEnum /// [DataMember(Name = "enum_number", EmitDefaultValue = false)] - public EnumNumberEnum? EnumNumber + public Option EnumNumber { get{ return _EnumNumber;} set @@ -312,7 +313,7 @@ public EnumNumberEnum? EnumNumber _flagEnumNumber = true; } } - private EnumNumberEnum? _EnumNumber; + private Option _EnumNumber; private bool _flagEnumNumber; /// @@ -329,7 +330,7 @@ public bool ShouldSerializeEnumNumber() /// [DataMember(Name = "outerEnum", EmitDefaultValue = true)] - public OuterEnum? OuterEnum + public Option OuterEnum { get{ return _OuterEnum;} set @@ -338,7 +339,7 @@ public OuterEnum? OuterEnum _flagOuterEnum = true; } } - private OuterEnum? _OuterEnum; + private Option _OuterEnum; private bool _flagOuterEnum; /// @@ -355,7 +356,7 @@ public bool ShouldSerializeOuterEnum() /// [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] - public OuterEnumInteger? OuterEnumInteger + public Option OuterEnumInteger { get{ return _OuterEnumInteger;} set @@ -364,7 +365,7 @@ public OuterEnumInteger? OuterEnumInteger _flagOuterEnumInteger = true; } } - private OuterEnumInteger? _OuterEnumInteger; + private Option _OuterEnumInteger; private bool _flagOuterEnumInteger; /// @@ -381,7 +382,7 @@ public bool ShouldSerializeOuterEnumInteger() /// [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue + public Option OuterEnumDefaultValue { get{ return _OuterEnumDefaultValue;} set @@ -390,7 +391,7 @@ public OuterEnumDefaultValue? OuterEnumDefaultValue _flagOuterEnumDefaultValue = true; } } - private OuterEnumDefaultValue? _OuterEnumDefaultValue; + private Option _OuterEnumDefaultValue; private bool _flagOuterEnumDefaultValue; /// @@ -407,7 +408,7 @@ public bool ShouldSerializeOuterEnumDefaultValue() /// [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue + public Option OuterEnumIntegerDefaultValue { get{ return _OuterEnumIntegerDefaultValue;} set @@ -416,7 +417,7 @@ public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue _flagOuterEnumIntegerDefaultValue = true; } } - private OuterEnumIntegerDefaultValue? _OuterEnumIntegerDefaultValue; + private Option _OuterEnumIntegerDefaultValue; private bool _flagOuterEnumIntegerDefaultValue; /// @@ -447,46 +448,47 @@ protected EnumTest() /// outerEnumInteger. /// outerEnumDefaultValue. /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumIntegerOnlyEnum? enumIntegerOnly = default(EnumIntegerOnlyEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) + public EnumTest(Option enumString = default(Option), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), Option enumInteger = default(Option), Option enumIntegerOnly = default(Option), Option enumNumber = default(Option), Option outerEnum = default(Option), Option outerEnumInteger = default(Option), Option outerEnumDefaultValue = default(Option), Option outerEnumIntegerDefaultValue = default(Option)) { - this._EnumStringRequired = enumStringRequired; this._EnumString = enumString; - if (this.EnumString != null) + if (this.EnumString.IsSet) { this._flagEnumString = true; } + this._EnumStringRequired = enumStringRequired; + this._flagEnumStringRequired = true; this._EnumInteger = enumInteger; - if (this.EnumInteger != null) + if (this.EnumInteger.IsSet) { this._flagEnumInteger = true; } this._EnumIntegerOnly = enumIntegerOnly; - if (this.EnumIntegerOnly != null) + if (this.EnumIntegerOnly.IsSet) { this._flagEnumIntegerOnly = true; } this._EnumNumber = enumNumber; - if (this.EnumNumber != null) + if (this.EnumNumber.IsSet) { this._flagEnumNumber = true; } this._OuterEnum = outerEnum; - if (this.OuterEnum != null) + if (this.OuterEnum.IsSet) { this._flagOuterEnum = true; } this._OuterEnumInteger = outerEnumInteger; - if (this.OuterEnumInteger != null) + if (this.OuterEnumInteger.IsSet) { this._flagOuterEnumInteger = true; } this._OuterEnumDefaultValue = outerEnumDefaultValue; - if (this.OuterEnumDefaultValue != null) + if (this.OuterEnumDefaultValue.IsSet) { this._flagOuterEnumDefaultValue = true; } this._OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; - if (this.OuterEnumIntegerDefaultValue != null) + if (this.OuterEnumIntegerDefaultValue.IsSet) { this._flagOuterEnumIntegerDefaultValue = true; } @@ -559,15 +561,39 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); + if (this.EnumString.IsSet) + { + hashCode = (hashCode * 59) + this.EnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); + if (this.EnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.EnumInteger.Value.GetHashCode(); + } + if (this.EnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.EnumIntegerOnly.Value.GetHashCode(); + } + if (this.EnumNumber.IsSet) + { + hashCode = (hashCode * 59) + this.EnumNumber.Value.GetHashCode(); + } + if (this.OuterEnum.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnum.Value.GetHashCode(); + } + if (this.OuterEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumInteger.Value.GetHashCode(); + } + if (this.OuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.OuterEnumIntegerDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index d248b913aadb..555b4751d176 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,18 +48,20 @@ protected EquilateralTriangle() /// triangleType (required). public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for EquilateralTriangle and cannot be null"); } - this._ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for EquilateralTriangle and cannot be null"); } + this._ShapeType = shapeType; + this._flagShapeType = true; this._TriangleType = triangleType; + this._flagTriangleType = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs index bd9c895894d3..e34061d119df 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class File : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// Test capitalization. - public File(string sourceURI = default(string)) + public File(Option sourceURI = default(Option)) { + // to ensure "sourceURI" (not nullable) is not null + if (sourceURI.IsSet && sourceURI.Value == null) + { + throw new ArgumentNullException("sourceURI isn't a nullable property for File and cannot be null"); + } this._SourceURI = sourceURI; - if (this.SourceURI != null) + if (this.SourceURI.IsSet) { this._flagSourceURI = true; } @@ -51,7 +57,7 @@ public partial class File : IEquatable, IValidatableObject /// /// Test capitalization [DataMember(Name = "sourceURI", EmitDefaultValue = false)] - public string SourceURI + public Option SourceURI { get{ return _SourceURI;} set @@ -60,7 +66,7 @@ public string SourceURI _flagSourceURI = true; } } - private string _SourceURI; + private Option _SourceURI; private bool _flagSourceURI; /// @@ -129,9 +135,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SourceURI != null) + if (this.SourceURI.IsSet && this.SourceURI.Value != null) { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); + hashCode = (hashCode * 59) + this.SourceURI.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 71277521b4d5..97227721d357 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,15 +38,25 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// /// file. /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) + public FileSchemaTestClass(Option file = default(Option), Option> files = default(Option>)) { + // to ensure "file" (not nullable) is not null + if (file.IsSet && file.Value == null) + { + throw new ArgumentNullException("file isn't a nullable property for FileSchemaTestClass and cannot be null"); + } + // to ensure "files" (not nullable) is not null + if (files.IsSet && files.Value == null) + { + throw new ArgumentNullException("files isn't a nullable property for FileSchemaTestClass and cannot be null"); + } this._File = file; - if (this.File != null) + if (this.File.IsSet) { this._flagFile = true; } this._Files = files; - if (this.Files != null) + if (this.Files.IsSet) { this._flagFiles = true; } @@ -56,7 +67,7 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// Gets or Sets File /// [DataMember(Name = "file", EmitDefaultValue = false)] - public File File + public Option File { get{ return _File;} set @@ -65,7 +76,7 @@ public File File _flagFile = true; } } - private File _File; + private Option _File; private bool _flagFile; /// @@ -80,7 +91,7 @@ public bool ShouldSerializeFile() /// Gets or Sets Files /// [DataMember(Name = "files", EmitDefaultValue = false)] - public List Files + public Option> Files { get{ return _Files;} set @@ -89,7 +100,7 @@ public List Files _flagFiles = true; } } - private List _Files; + private Option> _Files; private bool _flagFiles; /// @@ -159,13 +170,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.File != null) + if (this.File.IsSet && this.File.Value != null) { - hashCode = (hashCode * 59) + this.File.GetHashCode(); + hashCode = (hashCode * 59) + this.File.Value.GetHashCode(); } - if (this.Files != null) + if (this.Files.IsSet && this.Files.Value != null) { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); + hashCode = (hashCode * 59) + this.Files.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs index 7558351cafaa..436ca5883adf 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,14 @@ public partial class Foo : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// bar (default to "bar"). - public Foo(string bar = @"bar") + public Foo(Option bar = default(Option)) { + // to ensure "bar" (not nullable) is not null + if (bar.IsSet && bar.Value == null) + { + throw new ArgumentNullException("bar isn't a nullable property for Foo and cannot be null"); + } + this._Bar = bar.IsSet ? bar : new Option(@"bar"); this.AdditionalProperties = new Dictionary(); } @@ -45,7 +52,7 @@ public Foo(string bar = @"bar") /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar + public Option Bar { get{ return _Bar;} set @@ -54,7 +61,7 @@ public string Bar _flagBar = true; } } - private string _Bar; + private Option _Bar; private bool _flagBar; /// @@ -123,9 +130,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index a2d3d6cb223e..750a6757e3ca 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class FooGetDefaultResponse : IEquatable, /// Initializes a new instance of the class. /// /// varString. - public FooGetDefaultResponse(Foo varString = default(Foo)) + public FooGetDefaultResponse(Option varString = default(Option)) { + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FooGetDefaultResponse and cannot be null"); + } this._String = varString; - if (this.String != null) + if (this.String.IsSet) { this._flagString = true; } @@ -50,7 +56,7 @@ public partial class FooGetDefaultResponse : IEquatable, /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public Foo String + public Option String { get{ return _String;} set @@ -59,7 +65,7 @@ public Foo String _flagString = true; } } - private Foo _String; + private Option _String; private bool _flagString; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.String != null) + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs index c31adf8c3017..bf9286b93fd8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,94 +63,138 @@ protected FormatTest() /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(Option integer = default(Option), Option int32 = default(Option), Option unsignedInteger = default(Option), Option int64 = default(Option), Option unsignedLong = default(Option), decimal number = default(decimal), Option varFloat = default(Option), Option varDouble = default(Option), Option varDecimal = default(Option), Option varString = default(Option), byte[] varByte = default(byte[]), Option binary = default(Option), DateTime date = default(DateTime), Option dateTime = default(Option), Option uuid = default(Option), string password = default(string), Option patternWithDigits = default(Option), Option patternWithDigitsAndDelimiter = default(Option), Option patternWithBackslash = default(Option)) { - this._Number = number; - // to ensure "varByte" is required (not null) + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "varByte" (not nullable) is not null if (varByte == null) { - throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("varByte isn't a nullable property for FormatTest and cannot be null"); } - this._Byte = varByte; - this._Date = date; - // to ensure "password" is required (not null) + // to ensure "binary" (not nullable) is not null + if (binary.IsSet && binary.Value == null) + { + throw new ArgumentNullException("binary isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "date" (not nullable) is not null + if (date == null) + { + throw new ArgumentNullException("date isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "password" (not nullable) is not null if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("password isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigits" (not nullable) is not null + if (patternWithDigits.IsSet && patternWithDigits.Value == null) + { + throw new ArgumentNullException("patternWithDigits isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigitsAndDelimiter" (not nullable) is not null + if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) + { + throw new ArgumentNullException("patternWithDigitsAndDelimiter isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithBackslash" (not nullable) is not null + if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) + { + throw new ArgumentNullException("patternWithBackslash isn't a nullable property for FormatTest and cannot be null"); } - this._Password = password; this._Integer = integer; - if (this.Integer != null) + if (this.Integer.IsSet) { this._flagInteger = true; } this._Int32 = int32; - if (this.Int32 != null) + if (this.Int32.IsSet) { this._flagInt32 = true; } this._UnsignedInteger = unsignedInteger; - if (this.UnsignedInteger != null) + if (this.UnsignedInteger.IsSet) { this._flagUnsignedInteger = true; } this._Int64 = int64; - if (this.Int64 != null) + if (this.Int64.IsSet) { this._flagInt64 = true; } this._UnsignedLong = unsignedLong; - if (this.UnsignedLong != null) + if (this.UnsignedLong.IsSet) { this._flagUnsignedLong = true; } + this._Number = number; + this._flagNumber = true; this._Float = varFloat; - if (this.Float != null) + if (this.Float.IsSet) { this._flagFloat = true; } this._Double = varDouble; - if (this.Double != null) + if (this.Double.IsSet) { this._flagDouble = true; } this._Decimal = varDecimal; - if (this.Decimal != null) + if (this.Decimal.IsSet) { this._flagDecimal = true; } this._String = varString; - if (this.String != null) + if (this.String.IsSet) { this._flagString = true; } + this._Byte = varByte; + this._flagByte = true; this._Binary = binary; - if (this.Binary != null) + if (this.Binary.IsSet) { this._flagBinary = true; } + this._Date = date; + this._flagDate = true; this._DateTime = dateTime; - if (this.DateTime != null) + if (this.DateTime.IsSet) { this._flagDateTime = true; } this._Uuid = uuid; - if (this.Uuid != null) + if (this.Uuid.IsSet) { this._flagUuid = true; } + this._Password = password; + this._flagPassword = true; this._PatternWithDigits = patternWithDigits; - if (this.PatternWithDigits != null) + if (this.PatternWithDigits.IsSet) { this._flagPatternWithDigits = true; } this._PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; - if (this.PatternWithDigitsAndDelimiter != null) + if (this.PatternWithDigitsAndDelimiter.IsSet) { this._flagPatternWithDigitsAndDelimiter = true; } this._PatternWithBackslash = patternWithBackslash; - if (this.PatternWithBackslash != null) + if (this.PatternWithBackslash.IsSet) { this._flagPatternWithBackslash = true; } @@ -160,7 +205,7 @@ protected FormatTest() /// Gets or Sets Integer /// [DataMember(Name = "integer", EmitDefaultValue = false)] - public int Integer + public Option Integer { get{ return _Integer;} set @@ -169,7 +214,7 @@ public int Integer _flagInteger = true; } } - private int _Integer; + private Option _Integer; private bool _flagInteger; /// @@ -184,7 +229,7 @@ public bool ShouldSerializeInteger() /// Gets or Sets Int32 /// [DataMember(Name = "int32", EmitDefaultValue = false)] - public int Int32 + public Option Int32 { get{ return _Int32;} set @@ -193,7 +238,7 @@ public int Int32 _flagInt32 = true; } } - private int _Int32; + private Option _Int32; private bool _flagInt32; /// @@ -208,7 +253,7 @@ public bool ShouldSerializeInt32() /// Gets or Sets UnsignedInteger /// [DataMember(Name = "unsigned_integer", EmitDefaultValue = false)] - public uint UnsignedInteger + public Option UnsignedInteger { get{ return _UnsignedInteger;} set @@ -217,7 +262,7 @@ public uint UnsignedInteger _flagUnsignedInteger = true; } } - private uint _UnsignedInteger; + private Option _UnsignedInteger; private bool _flagUnsignedInteger; /// @@ -232,7 +277,7 @@ public bool ShouldSerializeUnsignedInteger() /// Gets or Sets Int64 /// [DataMember(Name = "int64", EmitDefaultValue = false)] - public long Int64 + public Option Int64 { get{ return _Int64;} set @@ -241,7 +286,7 @@ public long Int64 _flagInt64 = true; } } - private long _Int64; + private Option _Int64; private bool _flagInt64; /// @@ -256,7 +301,7 @@ public bool ShouldSerializeInt64() /// Gets or Sets UnsignedLong /// [DataMember(Name = "unsigned_long", EmitDefaultValue = false)] - public ulong UnsignedLong + public Option UnsignedLong { get{ return _UnsignedLong;} set @@ -265,7 +310,7 @@ public ulong UnsignedLong _flagUnsignedLong = true; } } - private ulong _UnsignedLong; + private Option _UnsignedLong; private bool _flagUnsignedLong; /// @@ -304,7 +349,7 @@ public bool ShouldSerializeNumber() /// Gets or Sets Float /// [DataMember(Name = "float", EmitDefaultValue = false)] - public float Float + public Option Float { get{ return _Float;} set @@ -313,7 +358,7 @@ public float Float _flagFloat = true; } } - private float _Float; + private Option _Float; private bool _flagFloat; /// @@ -328,7 +373,7 @@ public bool ShouldSerializeFloat() /// Gets or Sets Double /// [DataMember(Name = "double", EmitDefaultValue = false)] - public double Double + public Option Double { get{ return _Double;} set @@ -337,7 +382,7 @@ public double Double _flagDouble = true; } } - private double _Double; + private Option _Double; private bool _flagDouble; /// @@ -352,7 +397,7 @@ public bool ShouldSerializeDouble() /// Gets or Sets Decimal /// [DataMember(Name = "decimal", EmitDefaultValue = false)] - public decimal Decimal + public Option Decimal { get{ return _Decimal;} set @@ -361,7 +406,7 @@ public decimal Decimal _flagDecimal = true; } } - private decimal _Decimal; + private Option _Decimal; private bool _flagDecimal; /// @@ -376,7 +421,7 @@ public bool ShouldSerializeDecimal() /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public string String + public Option String { get{ return _String;} set @@ -385,7 +430,7 @@ public string String _flagString = true; } } - private string _String; + private Option _String; private bool _flagString; /// @@ -424,7 +469,7 @@ public bool ShouldSerializeByte() /// Gets or Sets Binary /// [DataMember(Name = "binary", EmitDefaultValue = false)] - public System.IO.Stream Binary + public Option Binary { get{ return _Binary;} set @@ -433,7 +478,7 @@ public System.IO.Stream Binary _flagBinary = true; } } - private System.IO.Stream _Binary; + private Option _Binary; private bool _flagBinary; /// @@ -475,7 +520,7 @@ public bool ShouldSerializeDate() /// /// 2007-12-03T10:15:30+01:00 [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime + public Option DateTime { get{ return _DateTime;} set @@ -484,7 +529,7 @@ public DateTime DateTime _flagDateTime = true; } } - private DateTime _DateTime; + private Option _DateTime; private bool _flagDateTime; /// @@ -500,7 +545,7 @@ public bool ShouldSerializeDateTime() /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid + public Option Uuid { get{ return _Uuid;} set @@ -509,7 +554,7 @@ public Guid Uuid _flagUuid = true; } } - private Guid _Uuid; + private Option _Uuid; private bool _flagUuid; /// @@ -549,7 +594,7 @@ public bool ShouldSerializePassword() /// /// A string that is a 10 digit number. Can have leading zeros. [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] - public string PatternWithDigits + public Option PatternWithDigits { get{ return _PatternWithDigits;} set @@ -558,7 +603,7 @@ public string PatternWithDigits _flagPatternWithDigits = true; } } - private string _PatternWithDigits; + private Option _PatternWithDigits; private bool _flagPatternWithDigits; /// @@ -574,7 +619,7 @@ public bool ShouldSerializePatternWithDigits() /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] - public string PatternWithDigitsAndDelimiter + public Option PatternWithDigitsAndDelimiter { get{ return _PatternWithDigitsAndDelimiter;} set @@ -583,7 +628,7 @@ public string PatternWithDigitsAndDelimiter _flagPatternWithDigitsAndDelimiter = true; } } - private string _PatternWithDigitsAndDelimiter; + private Option _PatternWithDigitsAndDelimiter; private bool _flagPatternWithDigitsAndDelimiter; /// @@ -599,7 +644,7 @@ public bool ShouldSerializePatternWithDigitsAndDelimiter() /// /// None [DataMember(Name = "pattern_with_backslash", EmitDefaultValue = false)] - public string PatternWithBackslash + public Option PatternWithBackslash { get{ return _PatternWithBackslash;} set @@ -608,7 +653,7 @@ public string PatternWithBackslash _flagPatternWithBackslash = true; } } - private string _PatternWithBackslash; + private Option _PatternWithBackslash; private bool _flagPatternWithBackslash; /// @@ -695,54 +740,78 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode(); + if (this.Integer.IsSet) + { + hashCode = (hashCode * 59) + this.Integer.Value.GetHashCode(); + } + if (this.Int32.IsSet) + { + hashCode = (hashCode * 59) + this.Int32.Value.GetHashCode(); + } + if (this.UnsignedInteger.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedInteger.Value.GetHashCode(); + } + if (this.Int64.IsSet) + { + hashCode = (hashCode * 59) + this.Int64.Value.GetHashCode(); + } + if (this.UnsignedLong.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedLong.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.Number.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) + if (this.Float.IsSet) + { + hashCode = (hashCode * 59) + this.Float.Value.GetHashCode(); + } + if (this.Double.IsSet) + { + hashCode = (hashCode * 59) + this.Double.Value.GetHashCode(); + } + if (this.Decimal.IsSet) + { + hashCode = (hashCode * 59) + this.Decimal.Value.GetHashCode(); + } + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.Byte != null) { hashCode = (hashCode * 59) + this.Byte.GetHashCode(); } - if (this.Binary != null) + if (this.Binary.IsSet && this.Binary.Value != null) { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); + hashCode = (hashCode * 59) + this.Binary.Value.GetHashCode(); } if (this.Date != null) { hashCode = (hashCode * 59) + this.Date.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.Password != null) { hashCode = (hashCode * 59) + this.Password.GetHashCode(); } - if (this.PatternWithDigits != null) + if (this.PatternWithDigits.IsSet && this.PatternWithDigits.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigits.Value.GetHashCode(); } - if (this.PatternWithDigitsAndDelimiter != null) + if (this.PatternWithDigitsAndDelimiter.IsSet && this.PatternWithDigitsAndDelimiter.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.Value.GetHashCode(); } - if (this.PatternWithBackslash != null) + if (this.PatternWithBackslash.IsSet && this.PatternWithBackslash.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithBackslash.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithBackslash.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Fruit.cs index 5e0d760c369f..637e088e9ea9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Fruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FruitReq.cs index 3772b99bdb42..5626c5152e3c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FruitReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/GmFruit.cs index c22ccd6ebb50..bf63b65e7b74 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/GmFruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 6208ebb4ca2b..3cf6ef2b34e6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -50,12 +51,13 @@ protected GrandparentAnimal() /// petType (required). public GrandparentAnimal(string petType = default(string)) { - // to ensure "petType" is required (not null) + // to ensure "petType" (not nullable) is not null if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); + throw new ArgumentNullException("petType isn't a nullable property for GrandparentAnimal and cannot be null"); } this._PetType = petType; + this._flagPetType = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 3c6298d7d8d2..96d854d60872 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,7 +46,7 @@ public HasOnlyReadOnly() /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -59,7 +60,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Foo /// [DataMember(Name = "foo", EmitDefaultValue = false)] - public string Foo { get; private set; } + public Option Foo { get; private set; } /// /// Returns false as Foo should not be serialized given that it's read-only. @@ -128,13 +129,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Foo != null) + if (this.Foo.IsSet && this.Foo.Value != null) { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); + hashCode = (hashCode * 59) + this.Foo.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs index cdcf9c79a897..e0b9694b84d3 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,10 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Initializes a new instance of the class. /// /// nullableMessage. - public HealthCheckResult(string nullableMessage = default(string)) + public HealthCheckResult(Option nullableMessage = default(Option)) { this._NullableMessage = nullableMessage; - if (this.NullableMessage != null) + if (this.NullableMessage.IsSet) { this._flagNullableMessage = true; } @@ -50,7 +51,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Gets or Sets NullableMessage /// [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] - public string NullableMessage + public Option NullableMessage { get{ return _NullableMessage;} set @@ -59,7 +60,7 @@ public string NullableMessage _flagNullableMessage = true; } } - private string _NullableMessage; + private Option _NullableMessage; private bool _flagNullableMessage; /// @@ -128,9 +129,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.NullableMessage != null) + if (this.NullableMessage.IsSet && this.NullableMessage.Value != null) { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableMessage.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index bd9327423338..02ea4acfc335 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,18 +45,20 @@ protected IsoscelesTriangle() { } /// triangleType (required). public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for IsoscelesTriangle and cannot be null"); } - this._ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for IsoscelesTriangle and cannot be null"); } + this._ShapeType = shapeType; + this._flagShapeType = true; this._TriangleType = triangleType; + this._flagTriangleType = true; } /// diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs index 68363d5d71db..1a6c8cf92a62 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class List : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// var123List. - public List(string var123List = default(string)) + public List(Option var123List = default(Option)) { + // to ensure "var123List" (not nullable) is not null + if (var123List.IsSet && var123List.Value == null) + { + throw new ArgumentNullException("var123List isn't a nullable property for List and cannot be null"); + } this._Var123List = var123List; - if (this.Var123List != null) + if (this.Var123List.IsSet) { this._flagVar123List = true; } @@ -50,7 +56,7 @@ public partial class List : IEquatable, IValidatableObject /// Gets or Sets Var123List /// [DataMember(Name = "123-list", EmitDefaultValue = false)] - public string Var123List + public Option Var123List { get{ return _Var123List;} set @@ -59,7 +65,7 @@ public string Var123List _flagVar123List = true; } } - private string _Var123List; + private Option _Var123List; private bool _flagVar123List; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Var123List != null) + if (this.Var123List.IsSet && this.Var123List.Value != null) { - hashCode = (hashCode * 59) + this.Var123List.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123List.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/LiteralStringClass.cs index aca243cc3c53..a648f2f04b01 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,20 @@ public partial class LiteralStringClass : IEquatable, IValid /// /// escapedLiteralString (default to "C:\\Users\\username"). /// unescapedLiteralString (default to "C:\Users\username"). - public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", string unescapedLiteralString = @"C:\Users\username") + public LiteralStringClass(Option escapedLiteralString = default(Option), Option unescapedLiteralString = default(Option)) { + // to ensure "escapedLiteralString" (not nullable) is not null + if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) + { + throw new ArgumentNullException("escapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + // to ensure "unescapedLiteralString" (not nullable) is not null + if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) + { + throw new ArgumentNullException("unescapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + this._EscapedLiteralString = escapedLiteralString.IsSet ? escapedLiteralString : new Option(@"C:\\Users\\username"); + this._UnescapedLiteralString = unescapedLiteralString.IsSet ? unescapedLiteralString : new Option(@"C:\Users\username"); this.AdditionalProperties = new Dictionary(); } @@ -46,7 +59,7 @@ public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", /// Gets or Sets EscapedLiteralString /// [DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)] - public string EscapedLiteralString + public Option EscapedLiteralString { get{ return _EscapedLiteralString;} set @@ -55,7 +68,7 @@ public string EscapedLiteralString _flagEscapedLiteralString = true; } } - private string _EscapedLiteralString; + private Option _EscapedLiteralString; private bool _flagEscapedLiteralString; /// @@ -70,7 +83,7 @@ public bool ShouldSerializeEscapedLiteralString() /// Gets or Sets UnescapedLiteralString /// [DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)] - public string UnescapedLiteralString + public Option UnescapedLiteralString { get{ return _UnescapedLiteralString;} set @@ -79,7 +92,7 @@ public string UnescapedLiteralString _flagUnescapedLiteralString = true; } } - private string _UnescapedLiteralString; + private Option _UnescapedLiteralString; private bool _flagUnescapedLiteralString; /// @@ -149,13 +162,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.EscapedLiteralString != null) + if (this.EscapedLiteralString.IsSet && this.EscapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.EscapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.EscapedLiteralString.Value.GetHashCode(); } - if (this.UnescapedLiteralString != null) + if (this.UnescapedLiteralString.IsSet && this.UnescapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.UnescapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.UnescapedLiteralString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Mammal.cs index 49a7e091c235..9efc46f30641 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Mammal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs index f2f2f90a2f98..14959b6c2eae 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -58,25 +59,45 @@ public enum InnerEnum /// mapOfEnumString. /// directMap. /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + public MapTest(Option>> mapMapOfString = default(Option>>), Option> mapOfEnumString = default(Option>), Option> directMap = default(Option>), Option> indirectMap = default(Option>)) { + // to ensure "mapMapOfString" (not nullable) is not null + if (mapMapOfString.IsSet && mapMapOfString.Value == null) + { + throw new ArgumentNullException("mapMapOfString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "mapOfEnumString" (not nullable) is not null + if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) + { + throw new ArgumentNullException("mapOfEnumString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "directMap" (not nullable) is not null + if (directMap.IsSet && directMap.Value == null) + { + throw new ArgumentNullException("directMap isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "indirectMap" (not nullable) is not null + if (indirectMap.IsSet && indirectMap.Value == null) + { + throw new ArgumentNullException("indirectMap isn't a nullable property for MapTest and cannot be null"); + } this._MapMapOfString = mapMapOfString; - if (this.MapMapOfString != null) + if (this.MapMapOfString.IsSet) { this._flagMapMapOfString = true; } this._MapOfEnumString = mapOfEnumString; - if (this.MapOfEnumString != null) + if (this.MapOfEnumString.IsSet) { this._flagMapOfEnumString = true; } this._DirectMap = directMap; - if (this.DirectMap != null) + if (this.DirectMap.IsSet) { this._flagDirectMap = true; } this._IndirectMap = indirectMap; - if (this.IndirectMap != null) + if (this.IndirectMap.IsSet) { this._flagIndirectMap = true; } @@ -87,7 +108,7 @@ public enum InnerEnum /// Gets or Sets MapMapOfString /// [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] - public Dictionary> MapMapOfString + public Option>> MapMapOfString { get{ return _MapMapOfString;} set @@ -96,7 +117,7 @@ public Dictionary> MapMapOfString _flagMapMapOfString = true; } } - private Dictionary> _MapMapOfString; + private Option>> _MapMapOfString; private bool _flagMapMapOfString; /// @@ -111,7 +132,7 @@ public bool ShouldSerializeMapMapOfString() /// Gets or Sets MapOfEnumString /// [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] - public Dictionary MapOfEnumString + public Option> MapOfEnumString { get{ return _MapOfEnumString;} set @@ -120,7 +141,7 @@ public bool ShouldSerializeMapMapOfString() _flagMapOfEnumString = true; } } - private Dictionary _MapOfEnumString; + private Option> _MapOfEnumString; private bool _flagMapOfEnumString; /// @@ -135,7 +156,7 @@ public bool ShouldSerializeMapOfEnumString() /// Gets or Sets DirectMap /// [DataMember(Name = "direct_map", EmitDefaultValue = false)] - public Dictionary DirectMap + public Option> DirectMap { get{ return _DirectMap;} set @@ -144,7 +165,7 @@ public Dictionary DirectMap _flagDirectMap = true; } } - private Dictionary _DirectMap; + private Option> _DirectMap; private bool _flagDirectMap; /// @@ -159,7 +180,7 @@ public bool ShouldSerializeDirectMap() /// Gets or Sets IndirectMap /// [DataMember(Name = "indirect_map", EmitDefaultValue = false)] - public Dictionary IndirectMap + public Option> IndirectMap { get{ return _IndirectMap;} set @@ -168,7 +189,7 @@ public Dictionary IndirectMap _flagIndirectMap = true; } } - private Dictionary _IndirectMap; + private Option> _IndirectMap; private bool _flagIndirectMap; /// @@ -240,21 +261,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapMapOfString != null) + if (this.MapMapOfString.IsSet && this.MapMapOfString.Value != null) { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapMapOfString.Value.GetHashCode(); } - if (this.MapOfEnumString != null) + if (this.MapOfEnumString.IsSet && this.MapOfEnumString.Value != null) { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfEnumString.Value.GetHashCode(); } - if (this.DirectMap != null) + if (this.DirectMap.IsSet && this.DirectMap.Value != null) { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.DirectMap.Value.GetHashCode(); } - if (this.IndirectMap != null) + if (this.IndirectMap.IsSet && this.IndirectMap.Value != null) { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.IndirectMap.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs index a698b135146d..d8b7d523d5b6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -75,138 +76,261 @@ protected MixLog() /// ProductId is only required for color mixes. /// ProductName is only required for color mixes. /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) + public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Option shopId = default(Option), Option totalPrice = default(Option), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), Option someCode = default(Option), Option batchNumber = default(Option), Option brandCode = default(Option), Option brandId = default(Option), Option brandName = default(Option), Option categoryCode = default(Option), Option color = default(Option), Option colorDescription = default(Option), Option comment = default(Option), Option commercialProductCode = default(Option), Option productLineCode = default(Option), Option country = default(Option), Option createdBy = default(Option), Option createdByFirstName = default(Option), Option createdByLastName = default(Option), Option deltaECalculationRepaired = default(Option), Option deltaECalculationSprayout = default(Option), Option ownColorVariantNumber = default(Option), Option primerProductId = default(Option), Option productId = default(Option), Option productName = default(Option), Option selectedVersionIndex = default(Option)) { - this._Id = id; - // to ensure "description" is required (not null) + // to ensure "id" (not nullable) is not null + if (id == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "description" (not nullable) is not null if (description == null) { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); + throw new ArgumentNullException("description isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "mixDate" (not nullable) is not null + if (mixDate == null) + { + throw new ArgumentNullException("mixDate isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "shopId" (not nullable) is not null + if (shopId.IsSet && shopId.Value == null) + { + throw new ArgumentNullException("shopId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "formulaVersionDate" (not nullable) is not null + if (formulaVersionDate == null) + { + throw new ArgumentNullException("formulaVersionDate isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "batchNumber" (not nullable) is not null + if (batchNumber.IsSet && batchNumber.Value == null) + { + throw new ArgumentNullException("batchNumber isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandCode" (not nullable) is not null + if (brandCode.IsSet && brandCode.Value == null) + { + throw new ArgumentNullException("brandCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandId" (not nullable) is not null + if (brandId.IsSet && brandId.Value == null) + { + throw new ArgumentNullException("brandId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandName" (not nullable) is not null + if (brandName.IsSet && brandName.Value == null) + { + throw new ArgumentNullException("brandName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "categoryCode" (not nullable) is not null + if (categoryCode.IsSet && categoryCode.Value == null) + { + throw new ArgumentNullException("categoryCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "colorDescription" (not nullable) is not null + if (colorDescription.IsSet && colorDescription.Value == null) + { + throw new ArgumentNullException("colorDescription isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "comment" (not nullable) is not null + if (comment.IsSet && comment.Value == null) + { + throw new ArgumentNullException("comment isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "commercialProductCode" (not nullable) is not null + if (commercialProductCode.IsSet && commercialProductCode.Value == null) + { + throw new ArgumentNullException("commercialProductCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "productLineCode" (not nullable) is not null + if (productLineCode.IsSet && productLineCode.Value == null) + { + throw new ArgumentNullException("productLineCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "country" (not nullable) is not null + if (country.IsSet && country.Value == null) + { + throw new ArgumentNullException("country isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdBy" (not nullable) is not null + if (createdBy.IsSet && createdBy.Value == null) + { + throw new ArgumentNullException("createdBy isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdByFirstName" (not nullable) is not null + if (createdByFirstName.IsSet && createdByFirstName.Value == null) + { + throw new ArgumentNullException("createdByFirstName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdByLastName" (not nullable) is not null + if (createdByLastName.IsSet && createdByLastName.Value == null) + { + throw new ArgumentNullException("createdByLastName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "deltaECalculationRepaired" (not nullable) is not null + if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) + { + throw new ArgumentNullException("deltaECalculationRepaired isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "deltaECalculationSprayout" (not nullable) is not null + if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) + { + throw new ArgumentNullException("deltaECalculationSprayout isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "primerProductId" (not nullable) is not null + if (primerProductId.IsSet && primerProductId.Value == null) + { + throw new ArgumentNullException("primerProductId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "productId" (not nullable) is not null + if (productId.IsSet && productId.Value == null) + { + throw new ArgumentNullException("productId isn't a nullable property for MixLog and cannot be null"); } + // to ensure "productName" (not nullable) is not null + if (productName.IsSet && productName.Value == null) + { + throw new ArgumentNullException("productName isn't a nullable property for MixLog and cannot be null"); + } + this._Id = id; + this._flagId = true; this._Description = description; + this._flagDescription = true; this._MixDate = mixDate; - this._TotalRecalculations = totalRecalculations; - this._TotalOverPoors = totalOverPoors; - this._TotalSkips = totalSkips; - this._TotalUnderPours = totalUnderPours; - this._FormulaVersionDate = formulaVersionDate; + this._flagMixDate = true; this._ShopId = shopId; - if (this.ShopId != null) + if (this.ShopId.IsSet) { this._flagShopId = true; } this._TotalPrice = totalPrice; - if (this.TotalPrice != null) + if (this.TotalPrice.IsSet) { this._flagTotalPrice = true; } + this._TotalRecalculations = totalRecalculations; + this._flagTotalRecalculations = true; + this._TotalOverPoors = totalOverPoors; + this._flagTotalOverPoors = true; + this._TotalSkips = totalSkips; + this._flagTotalSkips = true; + this._TotalUnderPours = totalUnderPours; + this._flagTotalUnderPours = true; + this._FormulaVersionDate = formulaVersionDate; + this._flagFormulaVersionDate = true; this._SomeCode = someCode; - if (this.SomeCode != null) + if (this.SomeCode.IsSet) { this._flagSomeCode = true; } this._BatchNumber = batchNumber; - if (this.BatchNumber != null) + if (this.BatchNumber.IsSet) { this._flagBatchNumber = true; } this._BrandCode = brandCode; - if (this.BrandCode != null) + if (this.BrandCode.IsSet) { this._flagBrandCode = true; } this._BrandId = brandId; - if (this.BrandId != null) + if (this.BrandId.IsSet) { this._flagBrandId = true; } this._BrandName = brandName; - if (this.BrandName != null) + if (this.BrandName.IsSet) { this._flagBrandName = true; } this._CategoryCode = categoryCode; - if (this.CategoryCode != null) + if (this.CategoryCode.IsSet) { this._flagCategoryCode = true; } this._Color = color; - if (this.Color != null) + if (this.Color.IsSet) { this._flagColor = true; } this._ColorDescription = colorDescription; - if (this.ColorDescription != null) + if (this.ColorDescription.IsSet) { this._flagColorDescription = true; } this._Comment = comment; - if (this.Comment != null) + if (this.Comment.IsSet) { this._flagComment = true; } this._CommercialProductCode = commercialProductCode; - if (this.CommercialProductCode != null) + if (this.CommercialProductCode.IsSet) { this._flagCommercialProductCode = true; } this._ProductLineCode = productLineCode; - if (this.ProductLineCode != null) + if (this.ProductLineCode.IsSet) { this._flagProductLineCode = true; } this._Country = country; - if (this.Country != null) + if (this.Country.IsSet) { this._flagCountry = true; } this._CreatedBy = createdBy; - if (this.CreatedBy != null) + if (this.CreatedBy.IsSet) { this._flagCreatedBy = true; } this._CreatedByFirstName = createdByFirstName; - if (this.CreatedByFirstName != null) + if (this.CreatedByFirstName.IsSet) { this._flagCreatedByFirstName = true; } this._CreatedByLastName = createdByLastName; - if (this.CreatedByLastName != null) + if (this.CreatedByLastName.IsSet) { this._flagCreatedByLastName = true; } this._DeltaECalculationRepaired = deltaECalculationRepaired; - if (this.DeltaECalculationRepaired != null) + if (this.DeltaECalculationRepaired.IsSet) { this._flagDeltaECalculationRepaired = true; } this._DeltaECalculationSprayout = deltaECalculationSprayout; - if (this.DeltaECalculationSprayout != null) + if (this.DeltaECalculationSprayout.IsSet) { this._flagDeltaECalculationSprayout = true; } this._OwnColorVariantNumber = ownColorVariantNumber; - if (this.OwnColorVariantNumber != null) + if (this.OwnColorVariantNumber.IsSet) { this._flagOwnColorVariantNumber = true; } this._PrimerProductId = primerProductId; - if (this.PrimerProductId != null) + if (this.PrimerProductId.IsSet) { this._flagPrimerProductId = true; } this._ProductId = productId; - if (this.ProductId != null) + if (this.ProductId.IsSet) { this._flagProductId = true; } this._ProductName = productName; - if (this.ProductName != null) + if (this.ProductName.IsSet) { this._flagProductName = true; } this._SelectedVersionIndex = selectedVersionIndex; - if (this.SelectedVersionIndex != null) + if (this.SelectedVersionIndex.IsSet) { this._flagSelectedVersionIndex = true; } @@ -289,7 +413,7 @@ public bool ShouldSerializeMixDate() /// Gets or Sets ShopId /// [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId + public Option ShopId { get{ return _ShopId;} set @@ -298,7 +422,7 @@ public Guid ShopId _flagShopId = true; } } - private Guid _ShopId; + private Option _ShopId; private bool _flagShopId; /// @@ -313,7 +437,7 @@ public bool ShouldSerializeShopId() /// Gets or Sets TotalPrice /// [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice + public Option TotalPrice { get{ return _TotalPrice;} set @@ -322,7 +446,7 @@ public float? TotalPrice _flagTotalPrice = true; } } - private float? _TotalPrice; + private Option _TotalPrice; private bool _flagTotalPrice; /// @@ -458,7 +582,7 @@ public bool ShouldSerializeFormulaVersionDate() /// /// SomeCode is only required for color mixes [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode + public Option SomeCode { get{ return _SomeCode;} set @@ -467,7 +591,7 @@ public string SomeCode _flagSomeCode = true; } } - private string _SomeCode; + private Option _SomeCode; private bool _flagSomeCode; /// @@ -482,7 +606,7 @@ public bool ShouldSerializeSomeCode() /// Gets or Sets BatchNumber /// [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber + public Option BatchNumber { get{ return _BatchNumber;} set @@ -491,7 +615,7 @@ public string BatchNumber _flagBatchNumber = true; } } - private string _BatchNumber; + private Option _BatchNumber; private bool _flagBatchNumber; /// @@ -507,7 +631,7 @@ public bool ShouldSerializeBatchNumber() /// /// BrandCode is only required for non-color mixes [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode + public Option BrandCode { get{ return _BrandCode;} set @@ -516,7 +640,7 @@ public string BrandCode _flagBrandCode = true; } } - private string _BrandCode; + private Option _BrandCode; private bool _flagBrandCode; /// @@ -532,7 +656,7 @@ public bool ShouldSerializeBrandCode() /// /// BrandId is only required for color mixes [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId + public Option BrandId { get{ return _BrandId;} set @@ -541,7 +665,7 @@ public string BrandId _flagBrandId = true; } } - private string _BrandId; + private Option _BrandId; private bool _flagBrandId; /// @@ -557,7 +681,7 @@ public bool ShouldSerializeBrandId() /// /// BrandName is only required for color mixes [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName + public Option BrandName { get{ return _BrandName;} set @@ -566,7 +690,7 @@ public string BrandName _flagBrandName = true; } } - private string _BrandName; + private Option _BrandName; private bool _flagBrandName; /// @@ -582,7 +706,7 @@ public bool ShouldSerializeBrandName() /// /// CategoryCode is not used anymore [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode + public Option CategoryCode { get{ return _CategoryCode;} set @@ -591,7 +715,7 @@ public string CategoryCode _flagCategoryCode = true; } } - private string _CategoryCode; + private Option _CategoryCode; private bool _flagCategoryCode; /// @@ -607,7 +731,7 @@ public bool ShouldSerializeCategoryCode() /// /// Color is only required for color mixes [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color + public Option Color { get{ return _Color;} set @@ -616,7 +740,7 @@ public string Color _flagColor = true; } } - private string _Color; + private Option _Color; private bool _flagColor; /// @@ -631,7 +755,7 @@ public bool ShouldSerializeColor() /// Gets or Sets ColorDescription /// [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription + public Option ColorDescription { get{ return _ColorDescription;} set @@ -640,7 +764,7 @@ public string ColorDescription _flagColorDescription = true; } } - private string _ColorDescription; + private Option _ColorDescription; private bool _flagColorDescription; /// @@ -655,7 +779,7 @@ public bool ShouldSerializeColorDescription() /// Gets or Sets Comment /// [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment + public Option Comment { get{ return _Comment;} set @@ -664,7 +788,7 @@ public string Comment _flagComment = true; } } - private string _Comment; + private Option _Comment; private bool _flagComment; /// @@ -679,7 +803,7 @@ public bool ShouldSerializeComment() /// Gets or Sets CommercialProductCode /// [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode + public Option CommercialProductCode { get{ return _CommercialProductCode;} set @@ -688,7 +812,7 @@ public string CommercialProductCode _flagCommercialProductCode = true; } } - private string _CommercialProductCode; + private Option _CommercialProductCode; private bool _flagCommercialProductCode; /// @@ -704,7 +828,7 @@ public bool ShouldSerializeCommercialProductCode() /// /// ProductLineCode is only required for color mixes [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode + public Option ProductLineCode { get{ return _ProductLineCode;} set @@ -713,7 +837,7 @@ public string ProductLineCode _flagProductLineCode = true; } } - private string _ProductLineCode; + private Option _ProductLineCode; private bool _flagProductLineCode; /// @@ -728,7 +852,7 @@ public bool ShouldSerializeProductLineCode() /// Gets or Sets Country /// [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country + public Option Country { get{ return _Country;} set @@ -737,7 +861,7 @@ public string Country _flagCountry = true; } } - private string _Country; + private Option _Country; private bool _flagCountry; /// @@ -752,7 +876,7 @@ public bool ShouldSerializeCountry() /// Gets or Sets CreatedBy /// [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy + public Option CreatedBy { get{ return _CreatedBy;} set @@ -761,7 +885,7 @@ public string CreatedBy _flagCreatedBy = true; } } - private string _CreatedBy; + private Option _CreatedBy; private bool _flagCreatedBy; /// @@ -776,7 +900,7 @@ public bool ShouldSerializeCreatedBy() /// Gets or Sets CreatedByFirstName /// [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName + public Option CreatedByFirstName { get{ return _CreatedByFirstName;} set @@ -785,7 +909,7 @@ public string CreatedByFirstName _flagCreatedByFirstName = true; } } - private string _CreatedByFirstName; + private Option _CreatedByFirstName; private bool _flagCreatedByFirstName; /// @@ -800,7 +924,7 @@ public bool ShouldSerializeCreatedByFirstName() /// Gets or Sets CreatedByLastName /// [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName + public Option CreatedByLastName { get{ return _CreatedByLastName;} set @@ -809,7 +933,7 @@ public string CreatedByLastName _flagCreatedByLastName = true; } } - private string _CreatedByLastName; + private Option _CreatedByLastName; private bool _flagCreatedByLastName; /// @@ -824,7 +948,7 @@ public bool ShouldSerializeCreatedByLastName() /// Gets or Sets DeltaECalculationRepaired /// [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired + public Option DeltaECalculationRepaired { get{ return _DeltaECalculationRepaired;} set @@ -833,7 +957,7 @@ public string DeltaECalculationRepaired _flagDeltaECalculationRepaired = true; } } - private string _DeltaECalculationRepaired; + private Option _DeltaECalculationRepaired; private bool _flagDeltaECalculationRepaired; /// @@ -848,7 +972,7 @@ public bool ShouldSerializeDeltaECalculationRepaired() /// Gets or Sets DeltaECalculationSprayout /// [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout + public Option DeltaECalculationSprayout { get{ return _DeltaECalculationSprayout;} set @@ -857,7 +981,7 @@ public string DeltaECalculationSprayout _flagDeltaECalculationSprayout = true; } } - private string _DeltaECalculationSprayout; + private Option _DeltaECalculationSprayout; private bool _flagDeltaECalculationSprayout; /// @@ -872,7 +996,7 @@ public bool ShouldSerializeDeltaECalculationSprayout() /// Gets or Sets OwnColorVariantNumber /// [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber + public Option OwnColorVariantNumber { get{ return _OwnColorVariantNumber;} set @@ -881,7 +1005,7 @@ public int? OwnColorVariantNumber _flagOwnColorVariantNumber = true; } } - private int? _OwnColorVariantNumber; + private Option _OwnColorVariantNumber; private bool _flagOwnColorVariantNumber; /// @@ -896,7 +1020,7 @@ public bool ShouldSerializeOwnColorVariantNumber() /// Gets or Sets PrimerProductId /// [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId + public Option PrimerProductId { get{ return _PrimerProductId;} set @@ -905,7 +1029,7 @@ public string PrimerProductId _flagPrimerProductId = true; } } - private string _PrimerProductId; + private Option _PrimerProductId; private bool _flagPrimerProductId; /// @@ -921,7 +1045,7 @@ public bool ShouldSerializePrimerProductId() /// /// ProductId is only required for color mixes [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId + public Option ProductId { get{ return _ProductId;} set @@ -930,7 +1054,7 @@ public string ProductId _flagProductId = true; } } - private string _ProductId; + private Option _ProductId; private bool _flagProductId; /// @@ -946,7 +1070,7 @@ public bool ShouldSerializeProductId() /// /// ProductName is only required for color mixes [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName + public Option ProductName { get{ return _ProductName;} set @@ -955,7 +1079,7 @@ public string ProductName _flagProductName = true; } } - private string _ProductName; + private Option _ProductName; private bool _flagProductName; /// @@ -970,7 +1094,7 @@ public bool ShouldSerializeProductName() /// Gets or Sets SelectedVersionIndex /// [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex + public Option SelectedVersionIndex { get{ return _SelectedVersionIndex;} set @@ -979,7 +1103,7 @@ public int SelectedVersionIndex _flagSelectedVersionIndex = true; } } - private int _SelectedVersionIndex; + private Option _SelectedVersionIndex; private bool _flagSelectedVersionIndex; /// @@ -1091,13 +1215,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); } - if (this.ShopId != null) + if (this.ShopId.IsSet && this.ShopId.Value != null) { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); + hashCode = (hashCode * 59) + this.ShopId.Value.GetHashCode(); } - if (this.TotalPrice != null) + if (this.TotalPrice.IsSet) { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPrice.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); @@ -1107,91 +1231,94 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); } - if (this.SomeCode != null) + if (this.SomeCode.IsSet && this.SomeCode.Value != null) + { + hashCode = (hashCode * 59) + this.SomeCode.Value.GetHashCode(); + } + if (this.BatchNumber.IsSet && this.BatchNumber.Value != null) { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); + hashCode = (hashCode * 59) + this.BatchNumber.Value.GetHashCode(); } - if (this.BatchNumber != null) + if (this.BrandCode.IsSet && this.BrandCode.Value != null) { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandCode.Value.GetHashCode(); } - if (this.BrandCode != null) + if (this.BrandId.IsSet && this.BrandId.Value != null) { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandId.Value.GetHashCode(); } - if (this.BrandId != null) + if (this.BrandName.IsSet && this.BrandName.Value != null) { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandName.Value.GetHashCode(); } - if (this.BrandName != null) + if (this.CategoryCode.IsSet && this.CategoryCode.Value != null) { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); + hashCode = (hashCode * 59) + this.CategoryCode.Value.GetHashCode(); } - if (this.CategoryCode != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } - if (this.Color != null) + if (this.ColorDescription.IsSet && this.ColorDescription.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorDescription.Value.GetHashCode(); } - if (this.ColorDescription != null) + if (this.Comment.IsSet && this.Comment.Value != null) { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); + hashCode = (hashCode * 59) + this.Comment.Value.GetHashCode(); } - if (this.Comment != null) + if (this.CommercialProductCode.IsSet && this.CommercialProductCode.Value != null) { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); + hashCode = (hashCode * 59) + this.CommercialProductCode.Value.GetHashCode(); } - if (this.CommercialProductCode != null) + if (this.ProductLineCode.IsSet && this.ProductLineCode.Value != null) { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductLineCode.Value.GetHashCode(); } - if (this.ProductLineCode != null) + if (this.Country.IsSet && this.Country.Value != null) { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); + hashCode = (hashCode * 59) + this.Country.Value.GetHashCode(); } - if (this.Country != null) + if (this.CreatedBy.IsSet && this.CreatedBy.Value != null) { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedBy.Value.GetHashCode(); } - if (this.CreatedBy != null) + if (this.CreatedByFirstName.IsSet && this.CreatedByFirstName.Value != null) { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedByFirstName.Value.GetHashCode(); } - if (this.CreatedByFirstName != null) + if (this.CreatedByLastName.IsSet && this.CreatedByLastName.Value != null) { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedByLastName.Value.GetHashCode(); } - if (this.CreatedByLastName != null) + if (this.DeltaECalculationRepaired.IsSet && this.DeltaECalculationRepaired.Value != null) { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); + hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.Value.GetHashCode(); } - if (this.DeltaECalculationRepaired != null) + if (this.DeltaECalculationSprayout.IsSet && this.DeltaECalculationSprayout.Value != null) { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); + hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.Value.GetHashCode(); } - if (this.DeltaECalculationSprayout != null) + if (this.OwnColorVariantNumber.IsSet) { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); + hashCode = (hashCode * 59) + this.OwnColorVariantNumber.Value.GetHashCode(); } - if (this.OwnColorVariantNumber != null) + if (this.PrimerProductId.IsSet && this.PrimerProductId.Value != null) { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.PrimerProductId.Value.GetHashCode(); } - if (this.PrimerProductId != null) + if (this.ProductId.IsSet && this.ProductId.Value != null) { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductId.Value.GetHashCode(); } - if (this.ProductId != null) + if (this.ProductName.IsSet && this.ProductName.Value != null) { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductName.Value.GetHashCode(); } - if (this.ProductName != null) + if (this.SelectedVersionIndex.IsSet) { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); + hashCode = (hashCode * 59) + this.SelectedVersionIndex.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 11c452ea3a15..ab3d11b31d20 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedAnyOf(MixedAnyOfContent content = default(MixedAnyOfContent)) + public MixedAnyOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedAnyOf and cannot be null"); + } this._Content = content; - if (this.Content != null) + if (this.Content.IsSet) { this._flagContent = true; } @@ -50,7 +56,7 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedAnyOfContent Content + public Option Content { get{ return _Content;} set @@ -59,7 +65,7 @@ public MixedAnyOfContent Content _flagContent = true; } } - private MixedAnyOfContent _Content; + private Option _Content; private bool _flagContent; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs index 49e94cc5e5db..7c4a5791f8e2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOf.cs index b1b6f56518c7..39a113d2286e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedOneOf(MixedOneOfContent content = default(MixedOneOfContent)) + public MixedOneOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedOneOf and cannot be null"); + } this._Content = content; - if (this.Content != null) + if (this.Content.IsSet) { this._flagContent = true; } @@ -50,7 +56,7 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedOneOfContent Content + public Option Content { get{ return _Content;} set @@ -59,7 +65,7 @@ public MixedOneOfContent Content _flagContent = true; } } - private MixedOneOfContent _Content; + private Option _Content; private bool _flagContent; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOfContent.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOfContent.cs index e2527cc3c315..77af863c507e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 63fbf7fba85f..70cc9207159b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,25 +40,45 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatableuuid. /// dateTime. /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuidWithPattern = default(Guid), Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) + public MixedPropertiesAndAdditionalPropertiesClass(Option uuidWithPattern = default(Option), Option uuid = default(Option), Option dateTime = default(Option), Option> map = default(Option>)) { + // to ensure "uuidWithPattern" (not nullable) is not null + if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) + { + throw new ArgumentNullException("uuidWithPattern isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "map" (not nullable) is not null + if (map.IsSet && map.Value == null) + { + throw new ArgumentNullException("map isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } this._UuidWithPattern = uuidWithPattern; - if (this.UuidWithPattern != null) + if (this.UuidWithPattern.IsSet) { this._flagUuidWithPattern = true; } this._Uuid = uuid; - if (this.Uuid != null) + if (this.Uuid.IsSet) { this._flagUuid = true; } this._DateTime = dateTime; - if (this.DateTime != null) + if (this.DateTime.IsSet) { this._flagDateTime = true; } this._Map = map; - if (this.Map != null) + if (this.Map.IsSet) { this._flagMap = true; } @@ -68,7 +89,7 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable [DataMember(Name = "uuid_with_pattern", EmitDefaultValue = false)] - public Guid UuidWithPattern + public Option UuidWithPattern { get{ return _UuidWithPattern;} set @@ -77,7 +98,7 @@ public Guid UuidWithPattern _flagUuidWithPattern = true; } } - private Guid _UuidWithPattern; + private Option _UuidWithPattern; private bool _flagUuidWithPattern; /// @@ -92,7 +113,7 @@ public bool ShouldSerializeUuidWithPattern() /// Gets or Sets Uuid /// [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid + public Option Uuid { get{ return _Uuid;} set @@ -101,7 +122,7 @@ public Guid Uuid _flagUuid = true; } } - private Guid _Uuid; + private Option _Uuid; private bool _flagUuid; /// @@ -116,7 +137,7 @@ public bool ShouldSerializeUuid() /// Gets or Sets DateTime /// [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime + public Option DateTime { get{ return _DateTime;} set @@ -125,7 +146,7 @@ public DateTime DateTime _flagDateTime = true; } } - private DateTime _DateTime; + private Option _DateTime; private bool _flagDateTime; /// @@ -140,7 +161,7 @@ public bool ShouldSerializeDateTime() /// Gets or Sets Map /// [DataMember(Name = "map", EmitDefaultValue = false)] - public Dictionary Map + public Option> Map { get{ return _Map;} set @@ -149,7 +170,7 @@ public Dictionary Map _flagMap = true; } } - private Dictionary _Map; + private Option> _Map; private bool _flagMap; /// @@ -221,21 +242,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.UuidWithPattern != null) + if (this.UuidWithPattern.IsSet && this.UuidWithPattern.Value != null) { - hashCode = (hashCode * 59) + this.UuidWithPattern.GetHashCode(); + hashCode = (hashCode * 59) + this.UuidWithPattern.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Map != null) + if (this.Map.IsSet && this.Map.Value != null) { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); + hashCode = (hashCode * 59) + this.Map.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedSubId.cs index 917dee7e353b..74a18eb1c5b8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// id. - public MixedSubId(string id = default(string)) + public MixedSubId(Option id = default(Option)) { + // to ensure "id" (not nullable) is not null + if (id.IsSet && id.Value == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixedSubId and cannot be null"); + } this._Id = id; - if (this.Id != null) + if (this.Id.IsSet) { this._flagId = true; } @@ -50,7 +56,7 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id + public Option Id { get{ return _Id;} set @@ -59,7 +65,7 @@ public string Id _flagId = true; } } - private string _Id; + private Option _Id; private bool _flagId; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Id != null) + if (this.Id.IsSet && this.Id.Value != null) { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs index 48815cd97300..af2b2259dcea 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,15 +38,20 @@ public partial class Model200Response : IEquatable, IValidatab /// /// name. /// varClass. - public Model200Response(int name = default(int), string varClass = default(string)) + public Model200Response(Option name = default(Option), Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for Model200Response and cannot be null"); + } this._Name = name; - if (this.Name != null) + if (this.Name.IsSet) { this._flagName = true; } this._Class = varClass; - if (this.Class != null) + if (this.Class.IsSet) { this._flagClass = true; } @@ -56,7 +62,7 @@ public partial class Model200Response : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public int Name + public Option Name { get{ return _Name;} set @@ -65,7 +71,7 @@ public int Name _flagName = true; } } - private int _Name; + private Option _Name; private bool _flagName; /// @@ -80,7 +86,7 @@ public bool ShouldSerializeName() /// Gets or Sets Class /// [DataMember(Name = "class", EmitDefaultValue = false)] - public string Class + public Option Class { get{ return _Class;} set @@ -89,7 +95,7 @@ public string Class _flagClass = true; } } - private string _Class; + private Option _Class; private bool _flagClass; /// @@ -159,10 +165,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) + if (this.Name.IsSet) + { + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); + } + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs index 1a51de5f744a..2c96f61f303b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClient. - public ModelClient(string varClient = default(string)) + public ModelClient(Option varClient = default(Option)) { + // to ensure "varClient" (not nullable) is not null + if (varClient.IsSet && varClient.Value == null) + { + throw new ArgumentNullException("varClient isn't a nullable property for ModelClient and cannot be null"); + } this._VarClient = varClient; - if (this.VarClient != null) + if (this.VarClient.IsSet) { this._flagVarClient = true; } @@ -50,7 +56,7 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public string VarClient + public Option VarClient { get{ return _VarClient;} set @@ -59,7 +65,7 @@ public string VarClient _flagVarClient = true; } } - private string _VarClient; + private Option _VarClient; private bool _flagVarClient; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.VarClient != null) + if (this.VarClient.IsSet && this.VarClient.Value != null) { - hashCode = (hashCode * 59) + this.VarClient.GetHashCode(); + hashCode = (hashCode * 59) + this.VarClient.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs index 8fa808d911cd..af076c612f83 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,11 +46,17 @@ protected Name() /// /// varName (required). /// property. - public Name(int varName = default(int), string property = default(string)) + public Name(int varName = default(int), Option property = default(Option)) { + // to ensure "property" (not nullable) is not null + if (property.IsSet && property.Value == null) + { + throw new ArgumentNullException("property isn't a nullable property for Name and cannot be null"); + } this._VarName = varName; + this._flagVarName = true; this._Property = property; - if (this.Property != null) + if (this.Property.IsSet) { this._flagProperty = true; } @@ -84,7 +91,7 @@ public bool ShouldSerializeVarName() /// Gets or Sets SnakeCase /// [DataMember(Name = "snake_case", EmitDefaultValue = false)] - public int SnakeCase { get; private set; } + public Option SnakeCase { get; private set; } /// /// Returns false as SnakeCase should not be serialized given that it's read-only. @@ -98,7 +105,7 @@ public bool ShouldSerializeSnakeCase() /// Gets or Sets Property /// [DataMember(Name = "property", EmitDefaultValue = false)] - public string Property + public Option Property { get{ return _Property;} set @@ -107,7 +114,7 @@ public string Property _flagProperty = true; } } - private string _Property; + private Option _Property; private bool _flagProperty; /// @@ -122,7 +129,7 @@ public bool ShouldSerializeProperty() /// Gets or Sets Var123Number /// [DataMember(Name = "123Number", EmitDefaultValue = false)] - public int Var123Number { get; private set; } + public Option Var123Number { get; private set; } /// /// Returns false as Var123Number should not be serialized given that it's read-only. @@ -194,12 +201,18 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.VarName.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) + if (this.SnakeCase.IsSet) + { + hashCode = (hashCode * 59) + this.SnakeCase.Value.GetHashCode(); + } + if (this.Property.IsSet && this.Property.Value != null) + { + hashCode = (hashCode * 59) + this.Property.Value.GetHashCode(); + } + if (this.Var123Number.IsSet) { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123Number.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Var123Number.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 072a590b7793..8b8e5e905825 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,13 +48,15 @@ protected NotificationtestGetElementsV1ResponseMPayload() /// aObjVariableobject (required). public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List> aObjVariableobject = default(List>)) { - this._PkiNotificationtestID = pkiNotificationtestID; - // to ensure "aObjVariableobject" is required (not null) + // to ensure "aObjVariableobject" (not nullable) is not null if (aObjVariableobject == null) { - throw new ArgumentNullException("aObjVariableobject is a required property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); + throw new ArgumentNullException("aObjVariableobject isn't a nullable property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); } + this._PkiNotificationtestID = pkiNotificationtestID; + this._flagPkiNotificationtestID = true; this._AObjVariableobject = aObjVariableobject; + this._flagAObjVariableobject = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs index 817623db2e39..43e30f5f2a21 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,65 +48,75 @@ public partial class NullableClass : IEquatable, IValidatableObje /// objectNullableProp. /// objectAndItemsNullableProp. /// objectItemsNullable. - public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateTime? dateProp = default(DateTime?), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) + public NullableClass(Option integerProp = default(Option), Option numberProp = default(Option), Option booleanProp = default(Option), Option stringProp = default(Option), Option dateProp = default(Option), Option datetimeProp = default(Option), Option> arrayNullableProp = default(Option>), Option> arrayAndItemsNullableProp = default(Option>), Option> arrayItemsNullable = default(Option>), Option> objectNullableProp = default(Option>), Option> objectAndItemsNullableProp = default(Option>), Option> objectItemsNullable = default(Option>)) { + // to ensure "arrayItemsNullable" (not nullable) is not null + if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) + { + throw new ArgumentNullException("arrayItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } + // to ensure "objectItemsNullable" (not nullable) is not null + if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) + { + throw new ArgumentNullException("objectItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } this._IntegerProp = integerProp; - if (this.IntegerProp != null) + if (this.IntegerProp.IsSet) { this._flagIntegerProp = true; } this._NumberProp = numberProp; - if (this.NumberProp != null) + if (this.NumberProp.IsSet) { this._flagNumberProp = true; } this._BooleanProp = booleanProp; - if (this.BooleanProp != null) + if (this.BooleanProp.IsSet) { this._flagBooleanProp = true; } this._StringProp = stringProp; - if (this.StringProp != null) + if (this.StringProp.IsSet) { this._flagStringProp = true; } this._DateProp = dateProp; - if (this.DateProp != null) + if (this.DateProp.IsSet) { this._flagDateProp = true; } this._DatetimeProp = datetimeProp; - if (this.DatetimeProp != null) + if (this.DatetimeProp.IsSet) { this._flagDatetimeProp = true; } this._ArrayNullableProp = arrayNullableProp; - if (this.ArrayNullableProp != null) + if (this.ArrayNullableProp.IsSet) { this._flagArrayNullableProp = true; } this._ArrayAndItemsNullableProp = arrayAndItemsNullableProp; - if (this.ArrayAndItemsNullableProp != null) + if (this.ArrayAndItemsNullableProp.IsSet) { this._flagArrayAndItemsNullableProp = true; } this._ArrayItemsNullable = arrayItemsNullable; - if (this.ArrayItemsNullable != null) + if (this.ArrayItemsNullable.IsSet) { this._flagArrayItemsNullable = true; } this._ObjectNullableProp = objectNullableProp; - if (this.ObjectNullableProp != null) + if (this.ObjectNullableProp.IsSet) { this._flagObjectNullableProp = true; } this._ObjectAndItemsNullableProp = objectAndItemsNullableProp; - if (this.ObjectAndItemsNullableProp != null) + if (this.ObjectAndItemsNullableProp.IsSet) { this._flagObjectAndItemsNullableProp = true; } this._ObjectItemsNullable = objectItemsNullable; - if (this.ObjectItemsNullable != null) + if (this.ObjectItemsNullable.IsSet) { this._flagObjectItemsNullable = true; } @@ -116,7 +127,7 @@ public partial class NullableClass : IEquatable, IValidatableObje /// Gets or Sets IntegerProp /// [DataMember(Name = "integer_prop", EmitDefaultValue = true)] - public int? IntegerProp + public Option IntegerProp { get{ return _IntegerProp;} set @@ -125,7 +136,7 @@ public int? IntegerProp _flagIntegerProp = true; } } - private int? _IntegerProp; + private Option _IntegerProp; private bool _flagIntegerProp; /// @@ -140,7 +151,7 @@ public bool ShouldSerializeIntegerProp() /// Gets or Sets NumberProp /// [DataMember(Name = "number_prop", EmitDefaultValue = true)] - public decimal? NumberProp + public Option NumberProp { get{ return _NumberProp;} set @@ -149,7 +160,7 @@ public decimal? NumberProp _flagNumberProp = true; } } - private decimal? _NumberProp; + private Option _NumberProp; private bool _flagNumberProp; /// @@ -164,7 +175,7 @@ public bool ShouldSerializeNumberProp() /// Gets or Sets BooleanProp /// [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] - public bool? BooleanProp + public Option BooleanProp { get{ return _BooleanProp;} set @@ -173,7 +184,7 @@ public bool? BooleanProp _flagBooleanProp = true; } } - private bool? _BooleanProp; + private Option _BooleanProp; private bool _flagBooleanProp; /// @@ -188,7 +199,7 @@ public bool ShouldSerializeBooleanProp() /// Gets or Sets StringProp /// [DataMember(Name = "string_prop", EmitDefaultValue = true)] - public string StringProp + public Option StringProp { get{ return _StringProp;} set @@ -197,7 +208,7 @@ public string StringProp _flagStringProp = true; } } - private string _StringProp; + private Option _StringProp; private bool _flagStringProp; /// @@ -213,7 +224,7 @@ public bool ShouldSerializeStringProp() /// [JsonConverter(typeof(OpenAPIDateConverter))] [DataMember(Name = "date_prop", EmitDefaultValue = true)] - public DateTime? DateProp + public Option DateProp { get{ return _DateProp;} set @@ -222,7 +233,7 @@ public DateTime? DateProp _flagDateProp = true; } } - private DateTime? _DateProp; + private Option _DateProp; private bool _flagDateProp; /// @@ -237,7 +248,7 @@ public bool ShouldSerializeDateProp() /// Gets or Sets DatetimeProp /// [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] - public DateTime? DatetimeProp + public Option DatetimeProp { get{ return _DatetimeProp;} set @@ -246,7 +257,7 @@ public DateTime? DatetimeProp _flagDatetimeProp = true; } } - private DateTime? _DatetimeProp; + private Option _DatetimeProp; private bool _flagDatetimeProp; /// @@ -261,7 +272,7 @@ public bool ShouldSerializeDatetimeProp() /// Gets or Sets ArrayNullableProp /// [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] - public List ArrayNullableProp + public Option> ArrayNullableProp { get{ return _ArrayNullableProp;} set @@ -270,7 +281,7 @@ public List ArrayNullableProp _flagArrayNullableProp = true; } } - private List _ArrayNullableProp; + private Option> _ArrayNullableProp; private bool _flagArrayNullableProp; /// @@ -285,7 +296,7 @@ public bool ShouldSerializeArrayNullableProp() /// Gets or Sets ArrayAndItemsNullableProp /// [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] - public List ArrayAndItemsNullableProp + public Option> ArrayAndItemsNullableProp { get{ return _ArrayAndItemsNullableProp;} set @@ -294,7 +305,7 @@ public List ArrayAndItemsNullableProp _flagArrayAndItemsNullableProp = true; } } - private List _ArrayAndItemsNullableProp; + private Option> _ArrayAndItemsNullableProp; private bool _flagArrayAndItemsNullableProp; /// @@ -309,7 +320,7 @@ public bool ShouldSerializeArrayAndItemsNullableProp() /// Gets or Sets ArrayItemsNullable /// [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] - public List ArrayItemsNullable + public Option> ArrayItemsNullable { get{ return _ArrayItemsNullable;} set @@ -318,7 +329,7 @@ public List ArrayItemsNullable _flagArrayItemsNullable = true; } } - private List _ArrayItemsNullable; + private Option> _ArrayItemsNullable; private bool _flagArrayItemsNullable; /// @@ -333,7 +344,7 @@ public bool ShouldSerializeArrayItemsNullable() /// Gets or Sets ObjectNullableProp /// [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectNullableProp + public Option> ObjectNullableProp { get{ return _ObjectNullableProp;} set @@ -342,7 +353,7 @@ public Dictionary ObjectNullableProp _flagObjectNullableProp = true; } } - private Dictionary _ObjectNullableProp; + private Option> _ObjectNullableProp; private bool _flagObjectNullableProp; /// @@ -357,7 +368,7 @@ public bool ShouldSerializeObjectNullableProp() /// Gets or Sets ObjectAndItemsNullableProp /// [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectAndItemsNullableProp + public Option> ObjectAndItemsNullableProp { get{ return _ObjectAndItemsNullableProp;} set @@ -366,7 +377,7 @@ public Dictionary ObjectAndItemsNullableProp _flagObjectAndItemsNullableProp = true; } } - private Dictionary _ObjectAndItemsNullableProp; + private Option> _ObjectAndItemsNullableProp; private bool _flagObjectAndItemsNullableProp; /// @@ -381,7 +392,7 @@ public bool ShouldSerializeObjectAndItemsNullableProp() /// Gets or Sets ObjectItemsNullable /// [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] - public Dictionary ObjectItemsNullable + public Option> ObjectItemsNullable { get{ return _ObjectItemsNullable;} set @@ -390,7 +401,7 @@ public Dictionary ObjectItemsNullable _flagObjectItemsNullable = true; } } - private Dictionary _ObjectItemsNullable; + private Option> _ObjectItemsNullable; private bool _flagObjectItemsNullable; /// @@ -470,53 +481,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.IntegerProp != null) + if (this.IntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.IntegerProp.Value.GetHashCode(); } - if (this.NumberProp != null) + if (this.NumberProp.IsSet) { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberProp.Value.GetHashCode(); } - if (this.BooleanProp != null) + if (this.BooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.BooleanProp.Value.GetHashCode(); } - if (this.StringProp != null) + if (this.StringProp.IsSet && this.StringProp.Value != null) { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.StringProp.Value.GetHashCode(); } - if (this.DateProp != null) + if (this.DateProp.IsSet && this.DateProp.Value != null) { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DateProp.Value.GetHashCode(); } - if (this.DatetimeProp != null) + if (this.DatetimeProp.IsSet && this.DatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DatetimeProp.Value.GetHashCode(); } - if (this.ArrayNullableProp != null) + if (this.ArrayNullableProp.IsSet && this.ArrayNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNullableProp.Value.GetHashCode(); } - if (this.ArrayAndItemsNullableProp != null) + if (this.ArrayAndItemsNullableProp.IsSet && this.ArrayAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.Value.GetHashCode(); } - if (this.ArrayItemsNullable != null) + if (this.ArrayItemsNullable.IsSet && this.ArrayItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayItemsNullable.Value.GetHashCode(); } - if (this.ObjectNullableProp != null) + if (this.ObjectNullableProp.IsSet && this.ObjectNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectNullableProp.Value.GetHashCode(); } - if (this.ObjectAndItemsNullableProp != null) + if (this.ObjectAndItemsNullableProp.IsSet && this.ObjectAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.Value.GetHashCode(); } - if (this.ObjectItemsNullable != null) + if (this.ObjectItemsNullable.IsSet && this.ObjectItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectItemsNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 0f52b9962cd7..db4146d531a4 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,10 @@ public partial class NullableGuidClass : IEquatable, IValidat /// Initializes a new instance of the class. /// /// uuid. - public NullableGuidClass(Guid? uuid = default(Guid?)) + public NullableGuidClass(Option uuid = default(Option)) { this._Uuid = uuid; - if (this.Uuid != null) + if (this.Uuid.IsSet) { this._flagUuid = true; } @@ -51,7 +52,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = true)] - public Guid? Uuid + public Option Uuid { get{ return _Uuid;} set @@ -60,7 +61,7 @@ public Guid? Uuid _flagUuid = true; } } - private Guid? _Uuid; + private Option _Uuid; private bool _flagUuid; /// @@ -129,9 +130,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableShape.cs index 3c760b3abddf..255842acfbac 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableShape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs index ce6120813dac..8531c7abf3c8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,10 +40,10 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) + public NumberOnly(Option justNumber = default(Option)) { this._JustNumber = justNumber; - if (this.JustNumber != null) + if (this.JustNumber.IsSet) { this._flagJustNumber = true; } @@ -53,7 +54,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Gets or Sets JustNumber /// [DataMember(Name = "JustNumber", EmitDefaultValue = false)] - public decimal JustNumber + public Option JustNumber { get{ return _JustNumber;} set @@ -62,7 +63,7 @@ public decimal JustNumber _flagJustNumber = true; } } - private decimal _JustNumber; + private Option _JustNumber; private bool _flagJustNumber; /// @@ -131,7 +132,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); + if (this.JustNumber.IsSet) + { + hashCode = (hashCode * 59) + this.JustNumber.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 7f4945565272..344d857a3f05 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,25 +40,40 @@ public partial class ObjectWithDeprecatedFields : IEquatableid. /// deprecatedRef. /// bars. - public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List bars = default(List)) + public ObjectWithDeprecatedFields(Option uuid = default(Option), Option id = default(Option), Option deprecatedRef = default(Option), Option> bars = default(Option>)) { + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "deprecatedRef" (not nullable) is not null + if (deprecatedRef.IsSet && deprecatedRef.Value == null) + { + throw new ArgumentNullException("deprecatedRef isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "bars" (not nullable) is not null + if (bars.IsSet && bars.Value == null) + { + throw new ArgumentNullException("bars isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } this._Uuid = uuid; - if (this.Uuid != null) + if (this.Uuid.IsSet) { this._flagUuid = true; } this._Id = id; - if (this.Id != null) + if (this.Id.IsSet) { this._flagId = true; } this._DeprecatedRef = deprecatedRef; - if (this.DeprecatedRef != null) + if (this.DeprecatedRef.IsSet) { this._flagDeprecatedRef = true; } this._Bars = bars; - if (this.Bars != null) + if (this.Bars.IsSet) { this._flagBars = true; } @@ -68,7 +84,7 @@ public partial class ObjectWithDeprecatedFields : IEquatable [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid + public Option Uuid { get{ return _Uuid;} set @@ -77,7 +93,7 @@ public string Uuid _flagUuid = true; } } - private string _Uuid; + private Option _Uuid; private bool _flagUuid; /// @@ -93,7 +109,7 @@ public bool ShouldSerializeUuid() /// [DataMember(Name = "id", EmitDefaultValue = false)] [Obsolete] - public decimal Id + public Option Id { get{ return _Id;} set @@ -102,7 +118,7 @@ public decimal Id _flagId = true; } } - private decimal _Id; + private Option _Id; private bool _flagId; /// @@ -118,7 +134,7 @@ public bool ShouldSerializeId() /// [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] [Obsolete] - public DeprecatedObject DeprecatedRef + public Option DeprecatedRef { get{ return _DeprecatedRef;} set @@ -127,7 +143,7 @@ public DeprecatedObject DeprecatedRef _flagDeprecatedRef = true; } } - private DeprecatedObject _DeprecatedRef; + private Option _DeprecatedRef; private bool _flagDeprecatedRef; /// @@ -143,7 +159,7 @@ public bool ShouldSerializeDeprecatedRef() /// [DataMember(Name = "bars", EmitDefaultValue = false)] [Obsolete] - public List Bars + public Option> Bars { get{ return _Bars;} set @@ -152,7 +168,7 @@ public List Bars _flagBars = true; } } - private List _Bars; + private Option> _Bars; private bool _flagBars; /// @@ -224,18 +240,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) + { + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); + } + if (this.Id.IsSet) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) + if (this.DeprecatedRef.IsSet && this.DeprecatedRef.Value != null) { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); + hashCode = (hashCode * 59) + this.DeprecatedRef.Value.GetHashCode(); } - if (this.Bars != null) + if (this.Bars.IsSet && this.Bars.Value != null) { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); + hashCode = (hashCode * 59) + this.Bars.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OneOfString.cs index b7278bd5600e..fc7a1298bc33 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OneOfString.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs index 435540a69eff..07e791268f58 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -65,7 +66,7 @@ public enum StatusEnum /// Order Status [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status + public Option Status { get{ return _Status;} set @@ -74,7 +75,7 @@ public StatusEnum? Status _flagStatus = true; } } - private StatusEnum? _Status; + private Option _Status; private bool _flagStatus; /// @@ -94,33 +95,39 @@ public bool ShouldSerializeStatus() /// shipDate. /// Order Status. /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) + public Order(Option id = default(Option), Option petId = default(Option), Option quantity = default(Option), Option shipDate = default(Option), Option status = default(Option), Option complete = default(Option)) { + // to ensure "shipDate" (not nullable) is not null + if (shipDate.IsSet && shipDate.Value == null) + { + throw new ArgumentNullException("shipDate isn't a nullable property for Order and cannot be null"); + } this._Id = id; - if (this.Id != null) + if (this.Id.IsSet) { this._flagId = true; } this._PetId = petId; - if (this.PetId != null) + if (this.PetId.IsSet) { this._flagPetId = true; } this._Quantity = quantity; - if (this.Quantity != null) + if (this.Quantity.IsSet) { this._flagQuantity = true; } this._ShipDate = shipDate; - if (this.ShipDate != null) + if (this.ShipDate.IsSet) { this._flagShipDate = true; } this._Status = status; - if (this.Status != null) + if (this.Status.IsSet) { this._flagStatus = true; } + this._Complete = complete.IsSet ? complete : new Option(false); this.AdditionalProperties = new Dictionary(); } @@ -128,7 +135,7 @@ public bool ShouldSerializeStatus() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id + public Option Id { get{ return _Id;} set @@ -137,7 +144,7 @@ public long Id _flagId = true; } } - private long _Id; + private Option _Id; private bool _flagId; /// @@ -152,7 +159,7 @@ public bool ShouldSerializeId() /// Gets or Sets PetId /// [DataMember(Name = "petId", EmitDefaultValue = false)] - public long PetId + public Option PetId { get{ return _PetId;} set @@ -161,7 +168,7 @@ public long PetId _flagPetId = true; } } - private long _PetId; + private Option _PetId; private bool _flagPetId; /// @@ -176,7 +183,7 @@ public bool ShouldSerializePetId() /// Gets or Sets Quantity /// [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int Quantity + public Option Quantity { get{ return _Quantity;} set @@ -185,7 +192,7 @@ public int Quantity _flagQuantity = true; } } - private int _Quantity; + private Option _Quantity; private bool _flagQuantity; /// @@ -201,7 +208,7 @@ public bool ShouldSerializeQuantity() /// /// 2020-02-02T20:20:20.000222Z [DataMember(Name = "shipDate", EmitDefaultValue = false)] - public DateTime ShipDate + public Option ShipDate { get{ return _ShipDate;} set @@ -210,7 +217,7 @@ public DateTime ShipDate _flagShipDate = true; } } - private DateTime _ShipDate; + private Option _ShipDate; private bool _flagShipDate; /// @@ -225,7 +232,7 @@ public bool ShouldSerializeShipDate() /// Gets or Sets Complete /// [DataMember(Name = "complete", EmitDefaultValue = true)] - public bool Complete + public Option Complete { get{ return _Complete;} set @@ -234,7 +241,7 @@ public bool Complete _flagComplete = true; } } - private bool _Complete; + private Option _Complete; private bool _flagComplete; /// @@ -308,15 +315,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.PetId.IsSet) + { + hashCode = (hashCode * 59) + this.PetId.Value.GetHashCode(); + } + if (this.Quantity.IsSet) + { + hashCode = (hashCode * 59) + this.Quantity.Value.GetHashCode(); + } + if (this.ShipDate.IsSet && this.ShipDate.Value != null) + { + hashCode = (hashCode * 59) + this.ShipDate.Value.GetHashCode(); + } + if (this.Status.IsSet) + { + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); + } + if (this.Complete.IsSet) { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); + hashCode = (hashCode * 59) + this.Complete.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs index 066dc26dbe15..de925cdfc802 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,20 +39,25 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// myNumber. /// myString. /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) + public OuterComposite(Option myNumber = default(Option), Option myString = default(Option), Option myBoolean = default(Option)) { + // to ensure "myString" (not nullable) is not null + if (myString.IsSet && myString.Value == null) + { + throw new ArgumentNullException("myString isn't a nullable property for OuterComposite and cannot be null"); + } this._MyNumber = myNumber; - if (this.MyNumber != null) + if (this.MyNumber.IsSet) { this._flagMyNumber = true; } this._MyString = myString; - if (this.MyString != null) + if (this.MyString.IsSet) { this._flagMyString = true; } this._MyBoolean = myBoolean; - if (this.MyBoolean != null) + if (this.MyBoolean.IsSet) { this._flagMyBoolean = true; } @@ -62,7 +68,7 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// Gets or Sets MyNumber /// [DataMember(Name = "my_number", EmitDefaultValue = false)] - public decimal MyNumber + public Option MyNumber { get{ return _MyNumber;} set @@ -71,7 +77,7 @@ public decimal MyNumber _flagMyNumber = true; } } - private decimal _MyNumber; + private Option _MyNumber; private bool _flagMyNumber; /// @@ -86,7 +92,7 @@ public bool ShouldSerializeMyNumber() /// Gets or Sets MyString /// [DataMember(Name = "my_string", EmitDefaultValue = false)] - public string MyString + public Option MyString { get{ return _MyString;} set @@ -95,7 +101,7 @@ public string MyString _flagMyString = true; } } - private string _MyString; + private Option _MyString; private bool _flagMyString; /// @@ -110,7 +116,7 @@ public bool ShouldSerializeMyString() /// Gets or Sets MyBoolean /// [DataMember(Name = "my_boolean", EmitDefaultValue = true)] - public bool MyBoolean + public Option MyBoolean { get{ return _MyBoolean;} set @@ -119,7 +125,7 @@ public bool MyBoolean _flagMyBoolean = true; } } - private bool _MyBoolean; + private Option _MyBoolean; private bool _flagMyBoolean; /// @@ -190,12 +196,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) + if (this.MyNumber.IsSet) + { + hashCode = (hashCode * 59) + this.MyNumber.Value.GetHashCode(); + } + if (this.MyString.IsSet && this.MyString.Value != null) + { + hashCode = (hashCode * 59) + this.MyString.Value.GetHashCode(); + } + if (this.MyBoolean.IsSet) { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); + hashCode = (hashCode * 59) + this.MyBoolean.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnum.cs index 59a9f8e3500a..8d09e4d421bb 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index 40e276b600eb..9217b6a24c9a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 3a70c3716fe2..83a1123c3651 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index 42b36058c031..69a3229977ac 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumTest.cs index 392e199e137f..5fd8f69243a4 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterEnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ParentPet.cs index 7a7421349903..92b018fe797c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ParentPet.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs index ccfaf5892e50..37efdedd0aaf 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -65,7 +66,7 @@ public enum StatusEnum /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status + public Option Status { get{ return _Status;} set @@ -74,7 +75,7 @@ public StatusEnum? Status _flagStatus = true; } } - private StatusEnum? _Status; + private Option _Status; private bool _flagStatus; /// @@ -102,37 +103,49 @@ protected Pet() /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), Option category = default(Option), string name = default(string), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this._Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this._PhotoUrls = photoUrls; this._Id = id; - if (this.Id != null) + if (this.Id.IsSet) { this._flagId = true; } this._Category = category; - if (this.Category != null) + if (this.Category.IsSet) { this._flagCategory = true; } + this._Name = name; + this._flagName = true; + this._PhotoUrls = photoUrls; + this._flagPhotoUrls = true; this._Tags = tags; - if (this.Tags != null) + if (this.Tags.IsSet) { this._flagTags = true; } this._Status = status; - if (this.Status != null) + if (this.Status.IsSet) { this._flagStatus = true; } @@ -143,7 +156,7 @@ protected Pet() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id + public Option Id { get{ return _Id;} set @@ -152,7 +165,7 @@ public long Id _flagId = true; } } - private long _Id; + private Option _Id; private bool _flagId; /// @@ -167,7 +180,7 @@ public bool ShouldSerializeId() /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category + public Option Category { get{ return _Category;} set @@ -176,7 +189,7 @@ public Category Category _flagCategory = true; } } - private Category _Category; + private Option _Category; private bool _flagCategory; /// @@ -240,7 +253,7 @@ public bool ShouldSerializePhotoUrls() /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags + public Option> Tags { get{ return _Tags;} set @@ -249,7 +262,7 @@ public List Tags _flagTags = true; } } - private List _Tags; + private Option> _Tags; private bool _flagTags; /// @@ -323,10 +336,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.Name != null) { @@ -336,11 +352,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pig.cs index 53b52bce70f1..efb16d85c318 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pig.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 5e4472118140..fddb8c8500ad 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Quadrilateral.cs index 1e12804ecd2a..4b1b8777ee3f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index f875a0c461b9..4493fcdf1ea3 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,12 +47,13 @@ protected QuadrilateralInterface() /// quadrilateralType (required). public QuadrilateralInterface(string quadrilateralType = default(string)) { - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for QuadrilateralInterface and cannot be null"); } this._QuadrilateralType = quadrilateralType; + this._flagQuadrilateralType = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 76afb32b0d81..8070cd9ccb61 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// baz. - public ReadOnlyFirst(string baz = default(string)) + public ReadOnlyFirst(Option baz = default(Option)) { + // to ensure "baz" (not nullable) is not null + if (baz.IsSet && baz.Value == null) + { + throw new ArgumentNullException("baz isn't a nullable property for ReadOnlyFirst and cannot be null"); + } this._Baz = baz; - if (this.Baz != null) + if (this.Baz.IsSet) { this._flagBaz = true; } @@ -50,7 +56,7 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -64,7 +70,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Baz /// [DataMember(Name = "baz", EmitDefaultValue = false)] - public string Baz + public Option Baz { get{ return _Baz;} set @@ -73,7 +79,7 @@ public string Baz _flagBaz = true; } } - private string _Baz; + private Option _Baz; private bool _flagBaz; /// @@ -143,13 +149,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Baz != null) + if (this.Baz.IsSet && this.Baz.Value != null) { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); + hashCode = (hashCode * 59) + this.Baz.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs index 307699149098..47e8fd0df10c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -54,7 +55,7 @@ public enum RequiredNullableEnumIntegerEnum /// [DataMember(Name = "required_nullable_enum_integer", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerEnum RequiredNullableEnumInteger + public RequiredNullableEnumIntegerEnum? RequiredNullableEnumInteger { get{ return _RequiredNullableEnumInteger;} set @@ -63,7 +64,7 @@ public RequiredNullableEnumIntegerEnum RequiredNullableEnumInteger _flagRequiredNullableEnumInteger = true; } } - private RequiredNullableEnumIntegerEnum _RequiredNullableEnumInteger; + private RequiredNullableEnumIntegerEnum? _RequiredNullableEnumInteger; private bool _flagRequiredNullableEnumInteger; /// @@ -138,7 +139,7 @@ public enum NotrequiredNullableEnumIntegerEnum /// [DataMember(Name = "notrequired_nullable_enum_integer", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerEnum? NotrequiredNullableEnumInteger + public Option NotrequiredNullableEnumInteger { get{ return _NotrequiredNullableEnumInteger;} set @@ -147,7 +148,7 @@ public NotrequiredNullableEnumIntegerEnum? NotrequiredNullableEnumInteger _flagNotrequiredNullableEnumInteger = true; } } - private NotrequiredNullableEnumIntegerEnum? _NotrequiredNullableEnumInteger; + private Option _NotrequiredNullableEnumInteger; private bool _flagNotrequiredNullableEnumInteger; /// @@ -180,7 +181,7 @@ public enum NotrequiredNotnullableEnumIntegerEnum /// [DataMember(Name = "notrequired_notnullable_enum_integer", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerEnum? NotrequiredNotnullableEnumInteger + public Option NotrequiredNotnullableEnumInteger { get{ return _NotrequiredNotnullableEnumInteger;} set @@ -189,7 +190,7 @@ public NotrequiredNotnullableEnumIntegerEnum? NotrequiredNotnullableEnumInteger _flagNotrequiredNotnullableEnumInteger = true; } } - private NotrequiredNotnullableEnumIntegerEnum? _NotrequiredNotnullableEnumInteger; + private Option _NotrequiredNotnullableEnumInteger; private bool _flagNotrequiredNotnullableEnumInteger; /// @@ -203,7 +204,6 @@ public bool ShouldSerializeNotrequiredNotnullableEnumInteger() /// /// Defines RequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum RequiredNullableEnumIntegerOnlyEnum { /// @@ -223,7 +223,7 @@ public enum RequiredNullableEnumIntegerOnlyEnum /// [DataMember(Name = "required_nullable_enum_integer_only", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnly + public RequiredNullableEnumIntegerOnlyEnum? RequiredNullableEnumIntegerOnly { get{ return _RequiredNullableEnumIntegerOnly;} set @@ -232,7 +232,7 @@ public RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnly _flagRequiredNullableEnumIntegerOnly = true; } } - private RequiredNullableEnumIntegerOnlyEnum _RequiredNullableEnumIntegerOnly; + private RequiredNullableEnumIntegerOnlyEnum? _RequiredNullableEnumIntegerOnly; private bool _flagRequiredNullableEnumIntegerOnly; /// @@ -288,7 +288,6 @@ public bool ShouldSerializeRequiredNotnullableEnumIntegerOnly() /// /// Defines NotrequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum NotrequiredNullableEnumIntegerOnlyEnum { /// @@ -308,7 +307,7 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum /// [DataMember(Name = "notrequired_nullable_enum_integer_only", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerOnlyEnum? NotrequiredNullableEnumIntegerOnly + public Option NotrequiredNullableEnumIntegerOnly { get{ return _NotrequiredNullableEnumIntegerOnly;} set @@ -317,7 +316,7 @@ public NotrequiredNullableEnumIntegerOnlyEnum? NotrequiredNullableEnumIntegerOnl _flagNotrequiredNullableEnumIntegerOnly = true; } } - private NotrequiredNullableEnumIntegerOnlyEnum? _NotrequiredNullableEnumIntegerOnly; + private Option _NotrequiredNullableEnumIntegerOnly; private bool _flagNotrequiredNullableEnumIntegerOnly; /// @@ -350,7 +349,7 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum /// [DataMember(Name = "notrequired_notnullable_enum_integer_only", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerOnlyEnum? NotrequiredNotnullableEnumIntegerOnly + public Option NotrequiredNotnullableEnumIntegerOnly { get{ return _NotrequiredNotnullableEnumIntegerOnly;} set @@ -359,7 +358,7 @@ public NotrequiredNotnullableEnumIntegerOnlyEnum? NotrequiredNotnullableEnumInte _flagNotrequiredNotnullableEnumIntegerOnly = true; } } - private NotrequiredNotnullableEnumIntegerOnlyEnum? _NotrequiredNotnullableEnumIntegerOnly; + private Option _NotrequiredNotnullableEnumIntegerOnly; private bool _flagNotrequiredNotnullableEnumIntegerOnly; /// @@ -512,7 +511,7 @@ public enum RequiredNullableEnumStringEnum /// [DataMember(Name = "required_nullable_enum_string", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumStringEnum RequiredNullableEnumString + public RequiredNullableEnumStringEnum? RequiredNullableEnumString { get{ return _RequiredNullableEnumString;} set @@ -521,7 +520,7 @@ public RequiredNullableEnumStringEnum RequiredNullableEnumString _flagRequiredNullableEnumString = true; } } - private RequiredNullableEnumStringEnum _RequiredNullableEnumString; + private RequiredNullableEnumStringEnum? _RequiredNullableEnumString; private bool _flagRequiredNullableEnumString; /// @@ -593,7 +592,7 @@ public enum NotrequiredNullableEnumStringEnum /// [DataMember(Name = "notrequired_nullable_enum_string", EmitDefaultValue = true)] - public NotrequiredNullableEnumStringEnum? NotrequiredNullableEnumString + public Option NotrequiredNullableEnumString { get{ return _NotrequiredNullableEnumString;} set @@ -602,7 +601,7 @@ public NotrequiredNullableEnumStringEnum? NotrequiredNullableEnumString _flagNotrequiredNullableEnumString = true; } } - private NotrequiredNullableEnumStringEnum? _NotrequiredNullableEnumString; + private Option _NotrequiredNullableEnumString; private bool _flagNotrequiredNullableEnumString; /// @@ -674,7 +673,7 @@ public enum NotrequiredNotnullableEnumStringEnum /// [DataMember(Name = "notrequired_notnullable_enum_string", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumStringEnum? NotrequiredNotnullableEnumString + public Option NotrequiredNotnullableEnumString { get{ return _NotrequiredNotnullableEnumString;} set @@ -683,7 +682,7 @@ public NotrequiredNotnullableEnumStringEnum? NotrequiredNotnullableEnumString _flagNotrequiredNotnullableEnumString = true; } } - private NotrequiredNotnullableEnumStringEnum? _NotrequiredNotnullableEnumString; + private Option _NotrequiredNotnullableEnumString; private bool _flagNotrequiredNotnullableEnumString; /// @@ -752,7 +751,7 @@ public bool ShouldSerializeRequiredNotnullableOuterEnumDefaultValue() /// [DataMember(Name = "notrequired_nullable_outerEnumDefaultValue", EmitDefaultValue = true)] - public OuterEnumDefaultValue? NotrequiredNullableOuterEnumDefaultValue + public Option NotrequiredNullableOuterEnumDefaultValue { get{ return _NotrequiredNullableOuterEnumDefaultValue;} set @@ -761,7 +760,7 @@ public OuterEnumDefaultValue? NotrequiredNullableOuterEnumDefaultValue _flagNotrequiredNullableOuterEnumDefaultValue = true; } } - private OuterEnumDefaultValue? _NotrequiredNullableOuterEnumDefaultValue; + private Option _NotrequiredNullableOuterEnumDefaultValue; private bool _flagNotrequiredNullableOuterEnumDefaultValue; /// @@ -778,7 +777,7 @@ public bool ShouldSerializeNotrequiredNullableOuterEnumDefaultValue() /// [DataMember(Name = "notrequired_notnullable_outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? NotrequiredNotnullableOuterEnumDefaultValue + public Option NotrequiredNotnullableOuterEnumDefaultValue { get{ return _NotrequiredNotnullableOuterEnumDefaultValue;} set @@ -787,7 +786,7 @@ public OuterEnumDefaultValue? NotrequiredNotnullableOuterEnumDefaultValue _flagNotrequiredNotnullableOuterEnumDefaultValue = true; } } - private OuterEnumDefaultValue? _NotrequiredNotnullableOuterEnumDefaultValue; + private Option _NotrequiredNotnullableOuterEnumDefaultValue; private bool _flagNotrequiredNotnullableOuterEnumDefaultValue; /// @@ -853,182 +852,209 @@ protected RequiredClass() /// requiredNotnullableArrayOfString (required). /// notrequiredNullableArrayOfString. /// notrequiredNotnullableArrayOfString. - public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), int? notRequiredNullableIntegerProp = default(int?), int notRequiredNotnullableintegerProp = default(int), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), string notrequiredNullableStringProp = default(string), string notrequiredNotnullableStringProp = default(string), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), bool? notrequiredNullableBooleanProp = default(bool?), bool notrequiredNotnullableBooleanProp = default(bool), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), DateTime? notRequiredNullableDateProp = default(DateTime?), DateTime notRequiredNotnullableDateProp = default(DateTime), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), DateTime? notrequiredNullableDatetimeProp = default(DateTime?), DateTime notrequiredNotnullableDatetimeProp = default(DateTime), RequiredNullableEnumIntegerEnum requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), NotrequiredNullableEnumIntegerEnum? notrequiredNullableEnumInteger = default(NotrequiredNullableEnumIntegerEnum?), NotrequiredNotnullableEnumIntegerEnum? notrequiredNotnullableEnumInteger = default(NotrequiredNotnullableEnumIntegerEnum?), RequiredNullableEnumIntegerOnlyEnum requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), NotrequiredNullableEnumIntegerOnlyEnum? notrequiredNullableEnumIntegerOnly = default(NotrequiredNullableEnumIntegerOnlyEnum?), NotrequiredNotnullableEnumIntegerOnlyEnum? notrequiredNotnullableEnumIntegerOnly = default(NotrequiredNotnullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum requiredNullableEnumString = default(RequiredNullableEnumStringEnum), NotrequiredNullableEnumStringEnum? notrequiredNullableEnumString = default(NotrequiredNullableEnumStringEnum?), NotrequiredNotnullableEnumStringEnum? notrequiredNotnullableEnumString = default(NotrequiredNotnullableEnumStringEnum?), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue? notrequiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue? notrequiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Guid? notrequiredNullableUuid = default(Guid?), Guid notrequiredNotnullableUuid = default(Guid), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), List notrequiredNullableArrayOfString = default(List), List notrequiredNotnullableArrayOfString = default(List)) + public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), Option notRequiredNullableIntegerProp = default(Option), Option notRequiredNotnullableintegerProp = default(Option), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), Option notrequiredNullableStringProp = default(Option), Option notrequiredNotnullableStringProp = default(Option), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), Option notrequiredNullableBooleanProp = default(Option), Option notrequiredNotnullableBooleanProp = default(Option), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), Option notRequiredNullableDateProp = default(Option), Option notRequiredNotnullableDateProp = default(Option), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), Option notrequiredNullableDatetimeProp = default(Option), Option notrequiredNotnullableDatetimeProp = default(Option), RequiredNullableEnumIntegerEnum? requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum?), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), Option notrequiredNullableEnumInteger = default(Option), Option notrequiredNotnullableEnumInteger = default(Option), RequiredNullableEnumIntegerOnlyEnum? requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), Option notrequiredNullableEnumIntegerOnly = default(Option), Option notrequiredNotnullableEnumIntegerOnly = default(Option), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum? requiredNullableEnumString = default(RequiredNullableEnumStringEnum?), Option notrequiredNullableEnumString = default(Option), Option notrequiredNotnullableEnumString = default(Option), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), Option notrequiredNullableOuterEnumDefaultValue = default(Option), Option notrequiredNotnullableOuterEnumDefaultValue = default(Option), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Option notrequiredNullableUuid = default(Option), Option notrequiredNotnullableUuid = default(Option), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), Option> notrequiredNullableArrayOfString = default(Option>), Option> notrequiredNotnullableArrayOfString = default(Option>)) { - // to ensure "requiredNullableIntegerProp" is required (not null) - if (requiredNullableIntegerProp == null) + // to ensure "requiredNotnullableStringProp" (not nullable) is not null + if (requiredNotnullableStringProp == null) { - throw new ArgumentNullException("requiredNullableIntegerProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this._RequiredNullableIntegerProp = requiredNullableIntegerProp; - this._RequiredNotnullableintegerProp = requiredNotnullableintegerProp; - // to ensure "requiredNullableStringProp" is required (not null) - if (requiredNullableStringProp == null) + // to ensure "notrequiredNotnullableStringProp" (not nullable) is not null + if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) { - throw new ArgumentNullException("requiredNullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this._RequiredNullableStringProp = requiredNullableStringProp; - // to ensure "requiredNotnullableStringProp" is required (not null) - if (requiredNotnullableStringProp == null) + // to ensure "requiredNotNullableDateProp" (not nullable) is not null + if (requiredNotNullableDateProp == null) { - throw new ArgumentNullException("requiredNotnullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotNullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this._RequiredNotnullableStringProp = requiredNotnullableStringProp; - // to ensure "requiredNullableBooleanProp" is required (not null) - if (requiredNullableBooleanProp == null) + // to ensure "notRequiredNotnullableDateProp" (not nullable) is not null + if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) { - throw new ArgumentNullException("requiredNullableBooleanProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notRequiredNotnullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this._RequiredNullableBooleanProp = requiredNullableBooleanProp; - this._RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; - // to ensure "requiredNullableDateProp" is required (not null) - if (requiredNullableDateProp == null) + // to ensure "requiredNotnullableDatetimeProp" (not nullable) is not null + if (requiredNotnullableDatetimeProp == null) { - throw new ArgumentNullException("requiredNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this._RequiredNullableDateProp = requiredNullableDateProp; - this._RequiredNotNullableDateProp = requiredNotNullableDateProp; - this._RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; - // to ensure "requiredNullableDatetimeProp" is required (not null) - if (requiredNullableDatetimeProp == null) + // to ensure "notrequiredNotnullableDatetimeProp" (not nullable) is not null + if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) { - throw new ArgumentNullException("requiredNullableDatetimeProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this._RequiredNullableDatetimeProp = requiredNullableDatetimeProp; - this._RequiredNullableEnumInteger = requiredNullableEnumInteger; - this._RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; - this._RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; - this._RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; - this._RequiredNotnullableEnumString = requiredNotnullableEnumString; - this._RequiredNullableEnumString = requiredNullableEnumString; - this._RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; - this._RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; - // to ensure "requiredNullableUuid" is required (not null) - if (requiredNullableUuid == null) + // to ensure "requiredNotnullableUuid" (not nullable) is not null + if (requiredNotnullableUuid == null) { - throw new ArgumentNullException("requiredNullableUuid is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this._RequiredNullableUuid = requiredNullableUuid; - this._RequiredNotnullableUuid = requiredNotnullableUuid; - // to ensure "requiredNullableArrayOfString" is required (not null) - if (requiredNullableArrayOfString == null) + // to ensure "notrequiredNotnullableUuid" (not nullable) is not null + if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) { - throw new ArgumentNullException("requiredNullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this._RequiredNullableArrayOfString = requiredNullableArrayOfString; - // to ensure "requiredNotnullableArrayOfString" is required (not null) + // to ensure "requiredNotnullableArrayOfString" (not nullable) is not null if (requiredNotnullableArrayOfString == null) { - throw new ArgumentNullException("requiredNotnullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this._RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; + // to ensure "notrequiredNotnullableArrayOfString" (not nullable) is not null + if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) + { + throw new ArgumentNullException("notrequiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); + } + this._RequiredNullableIntegerProp = requiredNullableIntegerProp; + this._flagRequiredNullableIntegerProp = true; + this._RequiredNotnullableintegerProp = requiredNotnullableintegerProp; + this._flagRequiredNotnullableintegerProp = true; this._NotRequiredNullableIntegerProp = notRequiredNullableIntegerProp; - if (this.NotRequiredNullableIntegerProp != null) + if (this.NotRequiredNullableIntegerProp.IsSet) { this._flagNotRequiredNullableIntegerProp = true; } this._NotRequiredNotnullableintegerProp = notRequiredNotnullableintegerProp; - if (this.NotRequiredNotnullableintegerProp != null) + if (this.NotRequiredNotnullableintegerProp.IsSet) { this._flagNotRequiredNotnullableintegerProp = true; } + this._RequiredNullableStringProp = requiredNullableStringProp; + this._flagRequiredNullableStringProp = true; + this._RequiredNotnullableStringProp = requiredNotnullableStringProp; + this._flagRequiredNotnullableStringProp = true; this._NotrequiredNullableStringProp = notrequiredNullableStringProp; - if (this.NotrequiredNullableStringProp != null) + if (this.NotrequiredNullableStringProp.IsSet) { this._flagNotrequiredNullableStringProp = true; } this._NotrequiredNotnullableStringProp = notrequiredNotnullableStringProp; - if (this.NotrequiredNotnullableStringProp != null) + if (this.NotrequiredNotnullableStringProp.IsSet) { this._flagNotrequiredNotnullableStringProp = true; } + this._RequiredNullableBooleanProp = requiredNullableBooleanProp; + this._flagRequiredNullableBooleanProp = true; + this._RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; + this._flagRequiredNotnullableBooleanProp = true; this._NotrequiredNullableBooleanProp = notrequiredNullableBooleanProp; - if (this.NotrequiredNullableBooleanProp != null) + if (this.NotrequiredNullableBooleanProp.IsSet) { this._flagNotrequiredNullableBooleanProp = true; } this._NotrequiredNotnullableBooleanProp = notrequiredNotnullableBooleanProp; - if (this.NotrequiredNotnullableBooleanProp != null) + if (this.NotrequiredNotnullableBooleanProp.IsSet) { this._flagNotrequiredNotnullableBooleanProp = true; } + this._RequiredNullableDateProp = requiredNullableDateProp; + this._flagRequiredNullableDateProp = true; + this._RequiredNotNullableDateProp = requiredNotNullableDateProp; + this._flagRequiredNotNullableDateProp = true; this._NotRequiredNullableDateProp = notRequiredNullableDateProp; - if (this.NotRequiredNullableDateProp != null) + if (this.NotRequiredNullableDateProp.IsSet) { this._flagNotRequiredNullableDateProp = true; } this._NotRequiredNotnullableDateProp = notRequiredNotnullableDateProp; - if (this.NotRequiredNotnullableDateProp != null) + if (this.NotRequiredNotnullableDateProp.IsSet) { this._flagNotRequiredNotnullableDateProp = true; } + this._RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; + this._flagRequiredNotnullableDatetimeProp = true; + this._RequiredNullableDatetimeProp = requiredNullableDatetimeProp; + this._flagRequiredNullableDatetimeProp = true; this._NotrequiredNullableDatetimeProp = notrequiredNullableDatetimeProp; - if (this.NotrequiredNullableDatetimeProp != null) + if (this.NotrequiredNullableDatetimeProp.IsSet) { this._flagNotrequiredNullableDatetimeProp = true; } this._NotrequiredNotnullableDatetimeProp = notrequiredNotnullableDatetimeProp; - if (this.NotrequiredNotnullableDatetimeProp != null) + if (this.NotrequiredNotnullableDatetimeProp.IsSet) { this._flagNotrequiredNotnullableDatetimeProp = true; } + this._RequiredNullableEnumInteger = requiredNullableEnumInteger; + this._flagRequiredNullableEnumInteger = true; + this._RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; + this._flagRequiredNotnullableEnumInteger = true; this._NotrequiredNullableEnumInteger = notrequiredNullableEnumInteger; - if (this.NotrequiredNullableEnumInteger != null) + if (this.NotrequiredNullableEnumInteger.IsSet) { this._flagNotrequiredNullableEnumInteger = true; } this._NotrequiredNotnullableEnumInteger = notrequiredNotnullableEnumInteger; - if (this.NotrequiredNotnullableEnumInteger != null) + if (this.NotrequiredNotnullableEnumInteger.IsSet) { this._flagNotrequiredNotnullableEnumInteger = true; } + this._RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; + this._flagRequiredNullableEnumIntegerOnly = true; + this._RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; + this._flagRequiredNotnullableEnumIntegerOnly = true; this._NotrequiredNullableEnumIntegerOnly = notrequiredNullableEnumIntegerOnly; - if (this.NotrequiredNullableEnumIntegerOnly != null) + if (this.NotrequiredNullableEnumIntegerOnly.IsSet) { this._flagNotrequiredNullableEnumIntegerOnly = true; } this._NotrequiredNotnullableEnumIntegerOnly = notrequiredNotnullableEnumIntegerOnly; - if (this.NotrequiredNotnullableEnumIntegerOnly != null) + if (this.NotrequiredNotnullableEnumIntegerOnly.IsSet) { this._flagNotrequiredNotnullableEnumIntegerOnly = true; } + this._RequiredNotnullableEnumString = requiredNotnullableEnumString; + this._flagRequiredNotnullableEnumString = true; + this._RequiredNullableEnumString = requiredNullableEnumString; + this._flagRequiredNullableEnumString = true; this._NotrequiredNullableEnumString = notrequiredNullableEnumString; - if (this.NotrequiredNullableEnumString != null) + if (this.NotrequiredNullableEnumString.IsSet) { this._flagNotrequiredNullableEnumString = true; } this._NotrequiredNotnullableEnumString = notrequiredNotnullableEnumString; - if (this.NotrequiredNotnullableEnumString != null) + if (this.NotrequiredNotnullableEnumString.IsSet) { this._flagNotrequiredNotnullableEnumString = true; } + this._RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; + this._flagRequiredNullableOuterEnumDefaultValue = true; + this._RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; + this._flagRequiredNotnullableOuterEnumDefaultValue = true; this._NotrequiredNullableOuterEnumDefaultValue = notrequiredNullableOuterEnumDefaultValue; - if (this.NotrequiredNullableOuterEnumDefaultValue != null) + if (this.NotrequiredNullableOuterEnumDefaultValue.IsSet) { this._flagNotrequiredNullableOuterEnumDefaultValue = true; } this._NotrequiredNotnullableOuterEnumDefaultValue = notrequiredNotnullableOuterEnumDefaultValue; - if (this.NotrequiredNotnullableOuterEnumDefaultValue != null) + if (this.NotrequiredNotnullableOuterEnumDefaultValue.IsSet) { this._flagNotrequiredNotnullableOuterEnumDefaultValue = true; } + this._RequiredNullableUuid = requiredNullableUuid; + this._flagRequiredNullableUuid = true; + this._RequiredNotnullableUuid = requiredNotnullableUuid; + this._flagRequiredNotnullableUuid = true; this._NotrequiredNullableUuid = notrequiredNullableUuid; - if (this.NotrequiredNullableUuid != null) + if (this.NotrequiredNullableUuid.IsSet) { this._flagNotrequiredNullableUuid = true; } this._NotrequiredNotnullableUuid = notrequiredNotnullableUuid; - if (this.NotrequiredNotnullableUuid != null) + if (this.NotrequiredNotnullableUuid.IsSet) { this._flagNotrequiredNotnullableUuid = true; } + this._RequiredNullableArrayOfString = requiredNullableArrayOfString; + this._flagRequiredNullableArrayOfString = true; + this._RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; + this._flagRequiredNotnullableArrayOfString = true; this._NotrequiredNullableArrayOfString = notrequiredNullableArrayOfString; - if (this.NotrequiredNullableArrayOfString != null) + if (this.NotrequiredNullableArrayOfString.IsSet) { this._flagNotrequiredNullableArrayOfString = true; } this._NotrequiredNotnullableArrayOfString = notrequiredNotnullableArrayOfString; - if (this.NotrequiredNotnullableArrayOfString != null) + if (this.NotrequiredNotnullableArrayOfString.IsSet) { this._flagNotrequiredNotnullableArrayOfString = true; } @@ -1087,7 +1113,7 @@ public bool ShouldSerializeRequiredNotnullableintegerProp() /// Gets or Sets NotRequiredNullableIntegerProp /// [DataMember(Name = "not_required_nullable_integer_prop", EmitDefaultValue = true)] - public int? NotRequiredNullableIntegerProp + public Option NotRequiredNullableIntegerProp { get{ return _NotRequiredNullableIntegerProp;} set @@ -1096,7 +1122,7 @@ public int? NotRequiredNullableIntegerProp _flagNotRequiredNullableIntegerProp = true; } } - private int? _NotRequiredNullableIntegerProp; + private Option _NotRequiredNullableIntegerProp; private bool _flagNotRequiredNullableIntegerProp; /// @@ -1111,7 +1137,7 @@ public bool ShouldSerializeNotRequiredNullableIntegerProp() /// Gets or Sets NotRequiredNotnullableintegerProp /// [DataMember(Name = "not_required_notnullableinteger_prop", EmitDefaultValue = false)] - public int NotRequiredNotnullableintegerProp + public Option NotRequiredNotnullableintegerProp { get{ return _NotRequiredNotnullableintegerProp;} set @@ -1120,7 +1146,7 @@ public int NotRequiredNotnullableintegerProp _flagNotRequiredNotnullableintegerProp = true; } } - private int _NotRequiredNotnullableintegerProp; + private Option _NotRequiredNotnullableintegerProp; private bool _flagNotRequiredNotnullableintegerProp; /// @@ -1183,7 +1209,7 @@ public bool ShouldSerializeRequiredNotnullableStringProp() /// Gets or Sets NotrequiredNullableStringProp /// [DataMember(Name = "notrequired_nullable_string_prop", EmitDefaultValue = true)] - public string NotrequiredNullableStringProp + public Option NotrequiredNullableStringProp { get{ return _NotrequiredNullableStringProp;} set @@ -1192,7 +1218,7 @@ public string NotrequiredNullableStringProp _flagNotrequiredNullableStringProp = true; } } - private string _NotrequiredNullableStringProp; + private Option _NotrequiredNullableStringProp; private bool _flagNotrequiredNullableStringProp; /// @@ -1207,7 +1233,7 @@ public bool ShouldSerializeNotrequiredNullableStringProp() /// Gets or Sets NotrequiredNotnullableStringProp /// [DataMember(Name = "notrequired_notnullable_string_prop", EmitDefaultValue = false)] - public string NotrequiredNotnullableStringProp + public Option NotrequiredNotnullableStringProp { get{ return _NotrequiredNotnullableStringProp;} set @@ -1216,7 +1242,7 @@ public string NotrequiredNotnullableStringProp _flagNotrequiredNotnullableStringProp = true; } } - private string _NotrequiredNotnullableStringProp; + private Option _NotrequiredNotnullableStringProp; private bool _flagNotrequiredNotnullableStringProp; /// @@ -1279,7 +1305,7 @@ public bool ShouldSerializeRequiredNotnullableBooleanProp() /// Gets or Sets NotrequiredNullableBooleanProp /// [DataMember(Name = "notrequired_nullable_boolean_prop", EmitDefaultValue = true)] - public bool? NotrequiredNullableBooleanProp + public Option NotrequiredNullableBooleanProp { get{ return _NotrequiredNullableBooleanProp;} set @@ -1288,7 +1314,7 @@ public bool? NotrequiredNullableBooleanProp _flagNotrequiredNullableBooleanProp = true; } } - private bool? _NotrequiredNullableBooleanProp; + private Option _NotrequiredNullableBooleanProp; private bool _flagNotrequiredNullableBooleanProp; /// @@ -1303,7 +1329,7 @@ public bool ShouldSerializeNotrequiredNullableBooleanProp() /// Gets or Sets NotrequiredNotnullableBooleanProp /// [DataMember(Name = "notrequired_notnullable_boolean_prop", EmitDefaultValue = true)] - public bool NotrequiredNotnullableBooleanProp + public Option NotrequiredNotnullableBooleanProp { get{ return _NotrequiredNotnullableBooleanProp;} set @@ -1312,7 +1338,7 @@ public bool NotrequiredNotnullableBooleanProp _flagNotrequiredNotnullableBooleanProp = true; } } - private bool _NotrequiredNotnullableBooleanProp; + private Option _NotrequiredNotnullableBooleanProp; private bool _flagNotrequiredNotnullableBooleanProp; /// @@ -1378,7 +1404,7 @@ public bool ShouldSerializeRequiredNotNullableDateProp() /// [JsonConverter(typeof(OpenAPIDateConverter))] [DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)] - public DateTime? NotRequiredNullableDateProp + public Option NotRequiredNullableDateProp { get{ return _NotRequiredNullableDateProp;} set @@ -1387,7 +1413,7 @@ public DateTime? NotRequiredNullableDateProp _flagNotRequiredNullableDateProp = true; } } - private DateTime? _NotRequiredNullableDateProp; + private Option _NotRequiredNullableDateProp; private bool _flagNotRequiredNullableDateProp; /// @@ -1403,7 +1429,7 @@ public bool ShouldSerializeNotRequiredNullableDateProp() /// [JsonConverter(typeof(OpenAPIDateConverter))] [DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)] - public DateTime NotRequiredNotnullableDateProp + public Option NotRequiredNotnullableDateProp { get{ return _NotRequiredNotnullableDateProp;} set @@ -1412,7 +1438,7 @@ public DateTime NotRequiredNotnullableDateProp _flagNotRequiredNotnullableDateProp = true; } } - private DateTime _NotRequiredNotnullableDateProp; + private Option _NotRequiredNotnullableDateProp; private bool _flagNotRequiredNotnullableDateProp; /// @@ -1475,7 +1501,7 @@ public bool ShouldSerializeRequiredNullableDatetimeProp() /// Gets or Sets NotrequiredNullableDatetimeProp /// [DataMember(Name = "notrequired_nullable_datetime_prop", EmitDefaultValue = true)] - public DateTime? NotrequiredNullableDatetimeProp + public Option NotrequiredNullableDatetimeProp { get{ return _NotrequiredNullableDatetimeProp;} set @@ -1484,7 +1510,7 @@ public DateTime? NotrequiredNullableDatetimeProp _flagNotrequiredNullableDatetimeProp = true; } } - private DateTime? _NotrequiredNullableDatetimeProp; + private Option _NotrequiredNullableDatetimeProp; private bool _flagNotrequiredNullableDatetimeProp; /// @@ -1499,7 +1525,7 @@ public bool ShouldSerializeNotrequiredNullableDatetimeProp() /// Gets or Sets NotrequiredNotnullableDatetimeProp /// [DataMember(Name = "notrequired_notnullable_datetime_prop", EmitDefaultValue = false)] - public DateTime NotrequiredNotnullableDatetimeProp + public Option NotrequiredNotnullableDatetimeProp { get{ return _NotrequiredNotnullableDatetimeProp;} set @@ -1508,7 +1534,7 @@ public DateTime NotrequiredNotnullableDatetimeProp _flagNotrequiredNotnullableDatetimeProp = true; } } - private DateTime _NotrequiredNotnullableDatetimeProp; + private Option _NotrequiredNotnullableDatetimeProp; private bool _flagNotrequiredNotnullableDatetimeProp; /// @@ -1574,7 +1600,7 @@ public bool ShouldSerializeRequiredNotnullableUuid() /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_nullable_uuid", EmitDefaultValue = true)] - public Guid? NotrequiredNullableUuid + public Option NotrequiredNullableUuid { get{ return _NotrequiredNullableUuid;} set @@ -1583,7 +1609,7 @@ public Guid? NotrequiredNullableUuid _flagNotrequiredNullableUuid = true; } } - private Guid? _NotrequiredNullableUuid; + private Option _NotrequiredNullableUuid; private bool _flagNotrequiredNullableUuid; /// @@ -1599,7 +1625,7 @@ public bool ShouldSerializeNotrequiredNullableUuid() /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_notnullable_uuid", EmitDefaultValue = false)] - public Guid NotrequiredNotnullableUuid + public Option NotrequiredNotnullableUuid { get{ return _NotrequiredNotnullableUuid;} set @@ -1608,7 +1634,7 @@ public Guid NotrequiredNotnullableUuid _flagNotrequiredNotnullableUuid = true; } } - private Guid _NotrequiredNotnullableUuid; + private Option _NotrequiredNotnullableUuid; private bool _flagNotrequiredNotnullableUuid; /// @@ -1671,7 +1697,7 @@ public bool ShouldSerializeRequiredNotnullableArrayOfString() /// Gets or Sets NotrequiredNullableArrayOfString /// [DataMember(Name = "notrequired_nullable_array_of_string", EmitDefaultValue = true)] - public List NotrequiredNullableArrayOfString + public Option> NotrequiredNullableArrayOfString { get{ return _NotrequiredNullableArrayOfString;} set @@ -1680,7 +1706,7 @@ public List NotrequiredNullableArrayOfString _flagNotrequiredNullableArrayOfString = true; } } - private List _NotrequiredNullableArrayOfString; + private Option> _NotrequiredNullableArrayOfString; private bool _flagNotrequiredNullableArrayOfString; /// @@ -1695,7 +1721,7 @@ public bool ShouldSerializeNotrequiredNullableArrayOfString() /// Gets or Sets NotrequiredNotnullableArrayOfString /// [DataMember(Name = "notrequired_notnullable_array_of_string", EmitDefaultValue = false)] - public List NotrequiredNotnullableArrayOfString + public Option> NotrequiredNotnullableArrayOfString { get{ return _NotrequiredNotnullableArrayOfString;} set @@ -1704,7 +1730,7 @@ public List NotrequiredNotnullableArrayOfString _flagNotrequiredNotnullableArrayOfString = true; } } - private List _NotrequiredNotnullableArrayOfString; + private Option> _NotrequiredNotnullableArrayOfString; private bool _flagNotrequiredNotnullableArrayOfString; /// @@ -1816,16 +1842,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RequiredNullableIntegerProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); + if (this.NotRequiredNullableIntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); - if (this.NotRequiredNullableIntegerProp != null) + if (this.NotRequiredNotnullableintegerProp.IsSet) { - hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.GetHashCode(); if (this.RequiredNullableStringProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableStringProp.GetHashCode(); @@ -1834,24 +1860,24 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableStringProp.GetHashCode(); } - if (this.NotrequiredNullableStringProp != null) + if (this.NotrequiredNullableStringProp.IsSet && this.NotrequiredNullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableStringProp != null) + if (this.NotrequiredNotnullableStringProp.IsSet && this.NotrequiredNotnullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.Value.GetHashCode(); } - if (this.RequiredNullableBooleanProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); + if (this.NotrequiredNullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); - if (this.NotrequiredNullableBooleanProp != null) + if (this.NotrequiredNotnullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.GetHashCode(); if (this.RequiredNullableDateProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableDateProp.GetHashCode(); @@ -1860,13 +1886,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotNullableDateProp.GetHashCode(); } - if (this.NotRequiredNullableDateProp != null) + if (this.NotRequiredNullableDateProp.IsSet && this.NotRequiredNullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.Value.GetHashCode(); } - if (this.NotRequiredNotnullableDateProp != null) + if (this.NotRequiredNotnullableDateProp.IsSet && this.NotRequiredNotnullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.Value.GetHashCode(); } if (this.RequiredNotnullableDatetimeProp != null) { @@ -1876,30 +1902,54 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNullableDatetimeProp.GetHashCode(); } - if (this.NotrequiredNullableDatetimeProp != null) + if (this.NotrequiredNullableDatetimeProp.IsSet && this.NotrequiredNullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableDatetimeProp != null) + if (this.NotrequiredNotnullableDatetimeProp.IsSet && this.NotrequiredNotnullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.RequiredNullableEnumInteger.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.GetHashCode(); + if (this.NotrequiredNullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableEnumIntegerOnly.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.GetHashCode(); + if (this.NotrequiredNullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNotnullableEnumString.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.GetHashCode(); + if (this.NotrequiredNullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableOuterEnumDefaultValue.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.GetHashCode(); + if (this.NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.Value.GetHashCode(); + } if (this.RequiredNullableUuid != null) { hashCode = (hashCode * 59) + this.RequiredNullableUuid.GetHashCode(); @@ -1908,13 +1958,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableUuid.GetHashCode(); } - if (this.NotrequiredNullableUuid != null) + if (this.NotrequiredNullableUuid.IsSet && this.NotrequiredNullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.Value.GetHashCode(); } - if (this.NotrequiredNotnullableUuid != null) + if (this.NotrequiredNotnullableUuid.IsSet && this.NotrequiredNotnullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.Value.GetHashCode(); } if (this.RequiredNullableArrayOfString != null) { @@ -1924,13 +1974,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableArrayOfString.GetHashCode(); } - if (this.NotrequiredNullableArrayOfString != null) + if (this.NotrequiredNullableArrayOfString.IsSet && this.NotrequiredNullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.Value.GetHashCode(); } - if (this.NotrequiredNotnullableArrayOfString != null) + if (this.NotrequiredNotnullableArrayOfString.IsSet && this.NotrequiredNotnullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs index e255b357996f..08f442fec937 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,27 +48,29 @@ protected Return() /// varLock (required). /// varAbstract (required). /// varUnsafe. - public Return(int varReturn = default(int), string varLock = default(string), string varAbstract = default(string), string varUnsafe = default(string)) + public Return(Option varReturn = default(Option), string varLock = default(string), string varAbstract = default(string), Option varUnsafe = default(Option)) { - // to ensure "varLock" is required (not null) + // to ensure "varLock" (not nullable) is not null if (varLock == null) { - throw new ArgumentNullException("varLock is a required property for Return and cannot be null"); + throw new ArgumentNullException("varLock isn't a nullable property for Return and cannot be null"); } - this._Lock = varLock; - // to ensure "varAbstract" is required (not null) - if (varAbstract == null) + // to ensure "varUnsafe" (not nullable) is not null + if (varUnsafe.IsSet && varUnsafe.Value == null) { - throw new ArgumentNullException("varAbstract is a required property for Return and cannot be null"); + throw new ArgumentNullException("varUnsafe isn't a nullable property for Return and cannot be null"); } - this._Abstract = varAbstract; this._VarReturn = varReturn; - if (this.VarReturn != null) + if (this.VarReturn.IsSet) { this._flagVarReturn = true; } + this._Lock = varLock; + this._flagLock = true; + this._Abstract = varAbstract; + this._flagAbstract = true; this._Unsafe = varUnsafe; - if (this.Unsafe != null) + if (this.Unsafe.IsSet) { this._flagUnsafe = true; } @@ -78,7 +81,7 @@ protected Return() /// Gets or Sets VarReturn /// [DataMember(Name = "return", EmitDefaultValue = false)] - public int VarReturn + public Option VarReturn { get{ return _VarReturn;} set @@ -87,7 +90,7 @@ public int VarReturn _flagVarReturn = true; } } - private int _VarReturn; + private Option _VarReturn; private bool _flagVarReturn; /// @@ -150,7 +153,7 @@ public bool ShouldSerializeAbstract() /// Gets or Sets Unsafe /// [DataMember(Name = "unsafe", EmitDefaultValue = false)] - public string Unsafe + public Option Unsafe { get{ return _Unsafe;} set @@ -159,7 +162,7 @@ public string Unsafe _flagUnsafe = true; } } - private string _Unsafe; + private Option _Unsafe; private bool _flagUnsafe; /// @@ -231,7 +234,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.VarReturn.GetHashCode(); + if (this.VarReturn.IsSet) + { + hashCode = (hashCode * 59) + this.VarReturn.Value.GetHashCode(); + } if (this.Lock != null) { hashCode = (hashCode * 59) + this.Lock.GetHashCode(); @@ -240,9 +246,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Abstract.GetHashCode(); } - if (this.Unsafe != null) + if (this.Unsafe.IsSet && this.Unsafe.Value != null) { - hashCode = (hashCode * 59) + this.Unsafe.GetHashCode(); + hashCode = (hashCode * 59) + this.Unsafe.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 39c65b7da193..e0599726173d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,15 +38,25 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// /// roleUuid. /// role. - public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole)) + public RolesReportsHash(Option roleUuid = default(Option), Option role = default(Option)) { + // to ensure "roleUuid" (not nullable) is not null + if (roleUuid.IsSet && roleUuid.Value == null) + { + throw new ArgumentNullException("roleUuid isn't a nullable property for RolesReportsHash and cannot be null"); + } + // to ensure "role" (not nullable) is not null + if (role.IsSet && role.Value == null) + { + throw new ArgumentNullException("role isn't a nullable property for RolesReportsHash and cannot be null"); + } this._RoleUuid = roleUuid; - if (this.RoleUuid != null) + if (this.RoleUuid.IsSet) { this._flagRoleUuid = true; } this._Role = role; - if (this.Role != null) + if (this.Role.IsSet) { this._flagRole = true; } @@ -56,7 +67,7 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// Gets or Sets RoleUuid /// [DataMember(Name = "role_uuid", EmitDefaultValue = false)] - public Guid RoleUuid + public Option RoleUuid { get{ return _RoleUuid;} set @@ -65,7 +76,7 @@ public Guid RoleUuid _flagRoleUuid = true; } } - private Guid _RoleUuid; + private Option _RoleUuid; private bool _flagRoleUuid; /// @@ -80,7 +91,7 @@ public bool ShouldSerializeRoleUuid() /// Gets or Sets Role /// [DataMember(Name = "role", EmitDefaultValue = false)] - public RolesReportsHashRole Role + public Option Role { get{ return _Role;} set @@ -89,7 +100,7 @@ public RolesReportsHashRole Role _flagRole = true; } } - private RolesReportsHashRole _Role; + private Option _Role; private bool _flagRole; /// @@ -159,13 +170,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RoleUuid != null) + if (this.RoleUuid.IsSet && this.RoleUuid.Value != null) { - hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.RoleUuid.Value.GetHashCode(); } - if (this.Role != null) + if (this.Role.IsSet && this.Role.Value != null) { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); + hashCode = (hashCode * 59) + this.Role.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 48d21628ea70..43b9b2ea0156 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Initializes a new instance of the class. /// /// name. - public RolesReportsHashRole(string name = default(string)) + public RolesReportsHashRole(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for RolesReportsHashRole and cannot be null"); + } this._Name = name; - if (this.Name != null) + if (this.Name.IsSet) { this._flagName = true; } @@ -50,7 +56,7 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name + public Option Name { get{ return _Name;} set @@ -59,7 +65,7 @@ public string Name _flagName = true; } } - private string _Name; + private Option _Name; private bool _flagName; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 4be5f3b852ba..9c272b52ee4b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,18 +48,20 @@ protected ScaleneTriangle() /// triangleType (required). public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ScaleneTriangle and cannot be null"); } - this._ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for ScaleneTriangle and cannot be null"); } + this._ShapeType = shapeType; + this._flagShapeType = true; this._TriangleType = triangleType; + this._flagTriangleType = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Shape.cs index 12e4af151482..f7f7c7dcc627 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Shape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs index d0f237740cf3..b4e685991904 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,12 +47,13 @@ protected ShapeInterface() /// shapeType (required). public ShapeInterface(string shapeType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ShapeInterface and cannot be null"); } this._ShapeType = shapeType; + this._flagShapeType = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 6d8279a8beda..b5fc4a013b0a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index abb6ed2a1e23..b470dd37dac9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,18 +48,20 @@ protected SimpleQuadrilateral() /// quadrilateralType (required). public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } - this._ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } + this._ShapeType = shapeType; + this._flagShapeType = true; this._QuadrilateralType = quadrilateralType; + this._flagQuadrilateralType = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs index 0a0faf3cba34..f886925d6ebb 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,15 +38,20 @@ public partial class SpecialModelName : IEquatable, IValidatab /// /// specialPropertyName. /// varSpecialModelName. - public SpecialModelName(long specialPropertyName = default(long), string varSpecialModelName = default(string)) + public SpecialModelName(Option specialPropertyName = default(Option), Option varSpecialModelName = default(Option)) { + // to ensure "varSpecialModelName" (not nullable) is not null + if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) + { + throw new ArgumentNullException("varSpecialModelName isn't a nullable property for SpecialModelName and cannot be null"); + } this._SpecialPropertyName = specialPropertyName; - if (this.SpecialPropertyName != null) + if (this.SpecialPropertyName.IsSet) { this._flagSpecialPropertyName = true; } this._VarSpecialModelName = varSpecialModelName; - if (this.VarSpecialModelName != null) + if (this.VarSpecialModelName.IsSet) { this._flagVarSpecialModelName = true; } @@ -56,7 +62,7 @@ public partial class SpecialModelName : IEquatable, IValidatab /// Gets or Sets SpecialPropertyName /// [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] - public long SpecialPropertyName + public Option SpecialPropertyName { get{ return _SpecialPropertyName;} set @@ -65,7 +71,7 @@ public long SpecialPropertyName _flagSpecialPropertyName = true; } } - private long _SpecialPropertyName; + private Option _SpecialPropertyName; private bool _flagSpecialPropertyName; /// @@ -80,7 +86,7 @@ public bool ShouldSerializeSpecialPropertyName() /// Gets or Sets VarSpecialModelName /// [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string VarSpecialModelName + public Option VarSpecialModelName { get{ return _VarSpecialModelName;} set @@ -89,7 +95,7 @@ public string VarSpecialModelName _flagVarSpecialModelName = true; } } - private string _VarSpecialModelName; + private Option _VarSpecialModelName; private bool _flagVarSpecialModelName; /// @@ -159,10 +165,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.VarSpecialModelName != null) + if (this.SpecialPropertyName.IsSet) + { + hashCode = (hashCode * 59) + this.SpecialPropertyName.Value.GetHashCode(); + } + if (this.VarSpecialModelName.IsSet && this.VarSpecialModelName.Value != null) { - hashCode = (hashCode * 59) + this.VarSpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.VarSpecialModelName.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs index b631ebc96160..97085564b6a3 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,15 +38,20 @@ public partial class Tag : IEquatable, IValidatableObject /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this._Id = id; - if (this.Id != null) + if (this.Id.IsSet) { this._flagId = true; } this._Name = name; - if (this.Name != null) + if (this.Name.IsSet) { this._flagName = true; } @@ -56,7 +62,7 @@ public partial class Tag : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id + public Option Id { get{ return _Id;} set @@ -65,7 +71,7 @@ public long Id _flagId = true; } } - private long _Id; + private Option _Id; private bool _flagId; /// @@ -80,7 +86,7 @@ public bool ShouldSerializeId() /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name + public Option Name { get{ return _Name;} set @@ -89,7 +95,7 @@ public string Name _flagName = true; } } - private string _Name; + private Option _Name; private bool _flagName; /// @@ -159,10 +165,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 0ab53418b5d8..52906ed913ed 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class TestCollectionEndingWithWordList : IEquatable class. /// /// value. - public TestCollectionEndingWithWordList(string value = default(string)) + public TestCollectionEndingWithWordList(Option value = default(Option)) { + // to ensure "value" (not nullable) is not null + if (value.IsSet && value.Value == null) + { + throw new ArgumentNullException("value isn't a nullable property for TestCollectionEndingWithWordList and cannot be null"); + } this._Value = value; - if (this.Value != null) + if (this.Value.IsSet) { this._flagValue = true; } @@ -50,7 +56,7 @@ public partial class TestCollectionEndingWithWordList : IEquatable [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value + public Option Value { get{ return _Value;} set @@ -59,7 +65,7 @@ public string Value _flagValue = true; } } - private string _Value; + private Option _Value; private bool _flagValue; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Value != null) + if (this.Value.IsSet && this.Value.Value != null) { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 29a0deb13ec7..42e2abf6377e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable class. /// /// testCollectionEndingWithWordList. - public TestCollectionEndingWithWordListObject(List testCollectionEndingWithWordList = default(List)) + public TestCollectionEndingWithWordListObject(Option> testCollectionEndingWithWordList = default(Option>)) { + // to ensure "testCollectionEndingWithWordList" (not nullable) is not null + if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) + { + throw new ArgumentNullException("testCollectionEndingWithWordList isn't a nullable property for TestCollectionEndingWithWordListObject and cannot be null"); + } this._TestCollectionEndingWithWordList = testCollectionEndingWithWordList; - if (this.TestCollectionEndingWithWordList != null) + if (this.TestCollectionEndingWithWordList.IsSet) { this._flagTestCollectionEndingWithWordList = true; } @@ -50,7 +56,7 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable [DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)] - public List TestCollectionEndingWithWordList + public Option> TestCollectionEndingWithWordList { get{ return _TestCollectionEndingWithWordList;} set @@ -59,7 +65,7 @@ public List TestCollectionEndingWithWordList _flagTestCollectionEndingWithWordList = true; } } - private List _TestCollectionEndingWithWordList; + private Option> _TestCollectionEndingWithWordList; private bool _flagTestCollectionEndingWithWordList; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.TestCollectionEndingWithWordList != null) + if (this.TestCollectionEndingWithWordList.IsSet && this.TestCollectionEndingWithWordList.Value != null) { - hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.GetHashCode(); + hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 92995d8b5ca2..94bf6c7e0e47 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,15 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Initializes a new instance of the class. /// /// someProperty. - public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) + public TestInlineFreeformAdditionalPropertiesRequest(Option someProperty = default(Option)) { + // to ensure "someProperty" (not nullable) is not null + if (someProperty.IsSet && someProperty.Value == null) + { + throw new ArgumentNullException("someProperty isn't a nullable property for TestInlineFreeformAdditionalPropertiesRequest and cannot be null"); + } this._SomeProperty = someProperty; - if (this.SomeProperty != null) + if (this.SomeProperty.IsSet) { this._flagSomeProperty = true; } @@ -50,7 +56,7 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Gets or Sets SomeProperty /// [DataMember(Name = "someProperty", EmitDefaultValue = false)] - public string SomeProperty + public Option SomeProperty { get{ return _SomeProperty;} set @@ -59,7 +65,7 @@ public string SomeProperty _flagSomeProperty = true; } } - private string _SomeProperty; + private Option _SomeProperty; private bool _flagSomeProperty; /// @@ -128,9 +134,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SomeProperty != null) + if (this.SomeProperty.IsSet && this.SomeProperty.Value != null) { - hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.SomeProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Triangle.cs index 37729a438160..4874223e8554 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Triangle.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs index ee631710fb6b..cbbb52ff0dfd 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,12 +47,13 @@ protected TriangleInterface() /// triangleType (required). public TriangleInterface(string triangleType = default(string)) { - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for TriangleInterface and cannot be null"); } this._TriangleType = triangleType; + this._flagTriangleType = true; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs index 21c819cf09ac..44725e31a3c4 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,65 +48,100 @@ public partial class User : IEquatable, IValidatableObject /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) + public User(Option id = default(Option), Option username = default(Option), Option firstName = default(Option), Option lastName = default(Option), Option email = default(Option), Option password = default(Option), Option phone = default(Option), Option userStatus = default(Option), Option objectWithNoDeclaredProps = default(Option), Option objectWithNoDeclaredPropsNullable = default(Option), Option anyTypeProp = default(Option), Option anyTypePropNullable = default(Option)) { + // to ensure "username" (not nullable) is not null + if (username.IsSet && username.Value == null) + { + throw new ArgumentNullException("username isn't a nullable property for User and cannot be null"); + } + // to ensure "firstName" (not nullable) is not null + if (firstName.IsSet && firstName.Value == null) + { + throw new ArgumentNullException("firstName isn't a nullable property for User and cannot be null"); + } + // to ensure "lastName" (not nullable) is not null + if (lastName.IsSet && lastName.Value == null) + { + throw new ArgumentNullException("lastName isn't a nullable property for User and cannot be null"); + } + // to ensure "email" (not nullable) is not null + if (email.IsSet && email.Value == null) + { + throw new ArgumentNullException("email isn't a nullable property for User and cannot be null"); + } + // to ensure "password" (not nullable) is not null + if (password.IsSet && password.Value == null) + { + throw new ArgumentNullException("password isn't a nullable property for User and cannot be null"); + } + // to ensure "phone" (not nullable) is not null + if (phone.IsSet && phone.Value == null) + { + throw new ArgumentNullException("phone isn't a nullable property for User and cannot be null"); + } + // to ensure "objectWithNoDeclaredProps" (not nullable) is not null + if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) + { + throw new ArgumentNullException("objectWithNoDeclaredProps isn't a nullable property for User and cannot be null"); + } this._Id = id; - if (this.Id != null) + if (this.Id.IsSet) { this._flagId = true; } this._Username = username; - if (this.Username != null) + if (this.Username.IsSet) { this._flagUsername = true; } this._FirstName = firstName; - if (this.FirstName != null) + if (this.FirstName.IsSet) { this._flagFirstName = true; } this._LastName = lastName; - if (this.LastName != null) + if (this.LastName.IsSet) { this._flagLastName = true; } this._Email = email; - if (this.Email != null) + if (this.Email.IsSet) { this._flagEmail = true; } this._Password = password; - if (this.Password != null) + if (this.Password.IsSet) { this._flagPassword = true; } this._Phone = phone; - if (this.Phone != null) + if (this.Phone.IsSet) { this._flagPhone = true; } this._UserStatus = userStatus; - if (this.UserStatus != null) + if (this.UserStatus.IsSet) { this._flagUserStatus = true; } this._ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; - if (this.ObjectWithNoDeclaredProps != null) + if (this.ObjectWithNoDeclaredProps.IsSet) { this._flagObjectWithNoDeclaredProps = true; } this._ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; - if (this.ObjectWithNoDeclaredPropsNullable != null) + if (this.ObjectWithNoDeclaredPropsNullable.IsSet) { this._flagObjectWithNoDeclaredPropsNullable = true; } this._AnyTypeProp = anyTypeProp; - if (this.AnyTypeProp != null) + if (this.AnyTypeProp.IsSet) { this._flagAnyTypeProp = true; } this._AnyTypePropNullable = anyTypePropNullable; - if (this.AnyTypePropNullable != null) + if (this.AnyTypePropNullable.IsSet) { this._flagAnyTypePropNullable = true; } @@ -116,7 +152,7 @@ public partial class User : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id + public Option Id { get{ return _Id;} set @@ -125,7 +161,7 @@ public long Id _flagId = true; } } - private long _Id; + private Option _Id; private bool _flagId; /// @@ -140,7 +176,7 @@ public bool ShouldSerializeId() /// Gets or Sets Username /// [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username + public Option Username { get{ return _Username;} set @@ -149,7 +185,7 @@ public string Username _flagUsername = true; } } - private string _Username; + private Option _Username; private bool _flagUsername; /// @@ -164,7 +200,7 @@ public bool ShouldSerializeUsername() /// Gets or Sets FirstName /// [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName + public Option FirstName { get{ return _FirstName;} set @@ -173,7 +209,7 @@ public string FirstName _flagFirstName = true; } } - private string _FirstName; + private Option _FirstName; private bool _flagFirstName; /// @@ -188,7 +224,7 @@ public bool ShouldSerializeFirstName() /// Gets or Sets LastName /// [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName + public Option LastName { get{ return _LastName;} set @@ -197,7 +233,7 @@ public string LastName _flagLastName = true; } } - private string _LastName; + private Option _LastName; private bool _flagLastName; /// @@ -212,7 +248,7 @@ public bool ShouldSerializeLastName() /// Gets or Sets Email /// [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email + public Option Email { get{ return _Email;} set @@ -221,7 +257,7 @@ public string Email _flagEmail = true; } } - private string _Email; + private Option _Email; private bool _flagEmail; /// @@ -236,7 +272,7 @@ public bool ShouldSerializeEmail() /// Gets or Sets Password /// [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password + public Option Password { get{ return _Password;} set @@ -245,7 +281,7 @@ public string Password _flagPassword = true; } } - private string _Password; + private Option _Password; private bool _flagPassword; /// @@ -260,7 +296,7 @@ public bool ShouldSerializePassword() /// Gets or Sets Phone /// [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone + public Option Phone { get{ return _Phone;} set @@ -269,7 +305,7 @@ public string Phone _flagPhone = true; } } - private string _Phone; + private Option _Phone; private bool _flagPhone; /// @@ -285,7 +321,7 @@ public bool ShouldSerializePhone() /// /// User Status [DataMember(Name = "userStatus", EmitDefaultValue = false)] - public int UserStatus + public Option UserStatus { get{ return _UserStatus;} set @@ -294,7 +330,7 @@ public int UserStatus _flagUserStatus = true; } } - private int _UserStatus; + private Option _UserStatus; private bool _flagUserStatus; /// @@ -310,7 +346,7 @@ public bool ShouldSerializeUserStatus() /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] - public Object ObjectWithNoDeclaredProps + public Option ObjectWithNoDeclaredProps { get{ return _ObjectWithNoDeclaredProps;} set @@ -319,7 +355,7 @@ public Object ObjectWithNoDeclaredProps _flagObjectWithNoDeclaredProps = true; } } - private Object _ObjectWithNoDeclaredProps; + private Option _ObjectWithNoDeclaredProps; private bool _flagObjectWithNoDeclaredProps; /// @@ -335,7 +371,7 @@ public bool ShouldSerializeObjectWithNoDeclaredProps() /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] - public Object ObjectWithNoDeclaredPropsNullable + public Option ObjectWithNoDeclaredPropsNullable { get{ return _ObjectWithNoDeclaredPropsNullable;} set @@ -344,7 +380,7 @@ public Object ObjectWithNoDeclaredPropsNullable _flagObjectWithNoDeclaredPropsNullable = true; } } - private Object _ObjectWithNoDeclaredPropsNullable; + private Option _ObjectWithNoDeclaredPropsNullable; private bool _flagObjectWithNoDeclaredPropsNullable; /// @@ -360,7 +396,7 @@ public bool ShouldSerializeObjectWithNoDeclaredPropsNullable() /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] - public Object AnyTypeProp + public Option AnyTypeProp { get{ return _AnyTypeProp;} set @@ -369,7 +405,7 @@ public Object AnyTypeProp _flagAnyTypeProp = true; } } - private Object _AnyTypeProp; + private Option _AnyTypeProp; private bool _flagAnyTypeProp; /// @@ -385,7 +421,7 @@ public bool ShouldSerializeAnyTypeProp() /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] - public Object AnyTypePropNullable + public Option AnyTypePropNullable { get{ return _AnyTypePropNullable;} set @@ -394,7 +430,7 @@ public Object AnyTypePropNullable _flagAnyTypePropNullable = true; } } - private Object _AnyTypePropNullable; + private Option _AnyTypePropNullable; private bool _flagAnyTypePropNullable; /// @@ -474,47 +510,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Username.IsSet && this.Username.Value != null) + { + hashCode = (hashCode * 59) + this.Username.Value.GetHashCode(); + } + if (this.FirstName.IsSet && this.FirstName.Value != null) { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); + hashCode = (hashCode * 59) + this.FirstName.Value.GetHashCode(); } - if (this.FirstName != null) + if (this.LastName.IsSet && this.LastName.Value != null) { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.LastName.Value.GetHashCode(); } - if (this.LastName != null) + if (this.Email.IsSet && this.Email.Value != null) { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + hashCode = (hashCode * 59) + this.Email.Value.GetHashCode(); } - if (this.Email != null) + if (this.Password.IsSet && this.Password.Value != null) { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); + hashCode = (hashCode * 59) + this.Password.Value.GetHashCode(); } - if (this.Password != null) + if (this.Phone.IsSet && this.Phone.Value != null) { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); + hashCode = (hashCode * 59) + this.Phone.Value.GetHashCode(); } - if (this.Phone != null) + if (this.UserStatus.IsSet) { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); + hashCode = (hashCode * 59) + this.UserStatus.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) + if (this.ObjectWithNoDeclaredProps.IsSet && this.ObjectWithNoDeclaredProps.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.Value.GetHashCode(); } - if (this.ObjectWithNoDeclaredPropsNullable != null) + if (this.ObjectWithNoDeclaredPropsNullable.IsSet && this.ObjectWithNoDeclaredPropsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.Value.GetHashCode(); } - if (this.AnyTypeProp != null) + if (this.AnyTypeProp.IsSet && this.AnyTypeProp.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypeProp.Value.GetHashCode(); } - if (this.AnyTypePropNullable != null) + if (this.AnyTypePropNullable.IsSet && this.AnyTypePropNullable.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypePropNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs index 24659725b63f..96850518213a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,24 +47,25 @@ protected Whale() /// hasBaleen. /// hasTeeth. /// className (required). - public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) + public Whale(Option hasBaleen = default(Option), Option hasTeeth = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Whale and cannot be null"); } - this._ClassName = className; this._HasBaleen = hasBaleen; - if (this.HasBaleen != null) + if (this.HasBaleen.IsSet) { this._flagHasBaleen = true; } this._HasTeeth = hasTeeth; - if (this.HasTeeth != null) + if (this.HasTeeth.IsSet) { this._flagHasTeeth = true; } + this._ClassName = className; + this._flagClassName = true; this.AdditionalProperties = new Dictionary(); } @@ -71,7 +73,7 @@ protected Whale() /// Gets or Sets HasBaleen /// [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] - public bool HasBaleen + public Option HasBaleen { get{ return _HasBaleen;} set @@ -80,7 +82,7 @@ public bool HasBaleen _flagHasBaleen = true; } } - private bool _HasBaleen; + private Option _HasBaleen; private bool _flagHasBaleen; /// @@ -95,7 +97,7 @@ public bool ShouldSerializeHasBaleen() /// Gets or Sets HasTeeth /// [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] - public bool HasTeeth + public Option HasTeeth { get{ return _HasTeeth;} set @@ -104,7 +106,7 @@ public bool HasTeeth _flagHasTeeth = true; } } - private bool _HasTeeth; + private Option _HasTeeth; private bool _flagHasTeeth; /// @@ -199,8 +201,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); + if (this.HasBaleen.IsSet) + { + hashCode = (hashCode * 59) + this.HasBaleen.Value.GetHashCode(); + } + if (this.HasTeeth.IsSet) + { + hashCode = (hashCode * 59) + this.HasTeeth.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs index bb8efe4f45d5..826d0b396189 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -63,7 +64,7 @@ public enum TypeEnum /// [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type + public Option Type { get{ return _Type;} set @@ -72,7 +73,7 @@ public TypeEnum? Type _flagType = true; } } - private TypeEnum? _Type; + private Option _Type; private bool _flagType; /// @@ -96,19 +97,20 @@ protected Zebra() /// /// type. /// className (required). - public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) + public Zebra(Option type = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Zebra and cannot be null"); } - this._ClassName = className; this._Type = type; - if (this.Type != null) + if (this.Type.IsSet) { this._flagType = true; } + this._ClassName = className; + this._flagClassName = true; this.AdditionalProperties = new Dictionary(); } @@ -195,7 +197,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Type.IsSet) + { + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs index b4ff8d51adb7..15c623dc8d8f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 5d5ab2efcd31..322cb23d49f9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -57,7 +58,7 @@ public enum ZeroBasedEnumEnum /// [DataMember(Name = "ZeroBasedEnum", EmitDefaultValue = false)] - public ZeroBasedEnumEnum? ZeroBasedEnum + public Option ZeroBasedEnum { get{ return _ZeroBasedEnum;} set @@ -66,7 +67,7 @@ public ZeroBasedEnumEnum? ZeroBasedEnum _flagZeroBasedEnum = true; } } - private ZeroBasedEnumEnum? _ZeroBasedEnum; + private Option _ZeroBasedEnum; private bool _flagZeroBasedEnum; /// @@ -81,10 +82,10 @@ public bool ShouldSerializeZeroBasedEnum() /// Initializes a new instance of the class. /// /// zeroBasedEnum. - public ZeroBasedEnumClass(ZeroBasedEnumEnum? zeroBasedEnum = default(ZeroBasedEnumEnum?)) + public ZeroBasedEnumClass(Option zeroBasedEnum = default(Option)) { this._ZeroBasedEnum = zeroBasedEnum; - if (this.ZeroBasedEnum != null) + if (this.ZeroBasedEnum.IsSet) { this._flagZeroBasedEnum = true; } @@ -149,7 +150,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.ZeroBasedEnum.GetHashCode(); + if (this.ZeroBasedEnum.IsSet) + { + hashCode = (hashCode * 59) + this.ZeroBasedEnum.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/.openapi-generator/FILES index 23eda3b9d097..bdca239e5d9d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/.openapi-generator/FILES @@ -131,6 +131,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FakeApi.md index 06309f31e8a5..b926dc908fd9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool? body = null) +> bool FakeOuterBooleanSerialize (bool body = null) @@ -134,7 +134,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = true; // bool? | Input boolean as post body (optional) + var body = true; // bool | Input boolean as post body (optional) try { @@ -175,7 +175,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **bool?** | Input boolean as post body | [optional] | +| **body** | **bool** | Input boolean as post body | [optional] | ### Return type @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal? body = null) +> decimal FakeOuterNumberSerialize (decimal body = null) @@ -312,7 +312,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14D; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal | Input number as post body (optional) try { @@ -353,7 +353,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **decimal?** | Input number as post body | [optional] | +| **body** | **decimal** | Input number as post body | [optional] | ### Return type @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1098,14 +1098,14 @@ namespace Example var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789L; // long? | None (optional) - var varFloat = 3.4F; // float? | None (optional) + var integer = 56; // int | None (optional) + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var varFloat = 3.4F; // float | None (optional) var varString = "varString_example"; // string | None (optional) var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) @@ -1150,14 +1150,14 @@ catch (ApiException e) | **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int?** | None | [optional] | -| **int32** | **int?** | None | [optional] | -| **int64** | **long?** | None | [optional] | -| **varFloat** | **float?** | None | [optional] | +| **integer** | **int** | None | [optional] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **varFloat** | **float** | None | [optional] | | **varString** | **string** | None | [optional] | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | -| **date** | **DateTime?** | None | [optional] | -| **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **date** | **DateTime** | None | [optional] | +| **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | | **password** | **string** | None | [optional] | | **callback** | **string** | None | [optional] | @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -1212,8 +1212,8 @@ namespace Example var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -1258,8 +1258,8 @@ catch (ApiException e) | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | -| **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | | **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) Fake endpoint to test group parameters (optional) @@ -1316,9 +1316,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789L; // long? | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) + var booleanGroup = true; // bool | Boolean in group parameters (optional) + var int64Group = 789L; // long | Integer in group parameters (optional) try { @@ -1360,9 +1360,9 @@ catch (ApiException e) | **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | -| **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | -| **int64Group** | **long?** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | +| **booleanGroup** | **bool** | Boolean in group parameters | [optional] | +| **int64Group** | **long** | Integer in group parameters | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/RequiredClass.md b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/RequiredClass.md index 07b6f018f6c1..3400459756d2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/RequiredClass.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/RequiredClass.md @@ -33,8 +33,8 @@ Name | Type | Description | Notes **NotrequiredNullableEnumIntegerOnly** | **int?** | | [optional] **NotrequiredNotnullableEnumIntegerOnly** | **int** | | [optional] **RequiredNotnullableEnumString** | **string** | | -**RequiredNullableEnumString** | **string** | | -**NotrequiredNullableEnumString** | **string** | | [optional] +**RequiredNullableEnumString** | **string?** | | +**NotrequiredNullableEnumString** | **string?** | | [optional] **NotrequiredNotnullableEnumString** | **string** | | [optional] **RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | **RequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 95d41fcbd942..3437138cacd2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -301,9 +299,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs index 354f9eb6d9f2..11aeb829749a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -517,9 +517,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -588,9 +586,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index 82d3054c5a90..85535bfbd190 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -55,7 +55,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); + bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -67,7 +67,7 @@ public interface IFakeApiSync : IApiAccessor /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -78,7 +78,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0); /// /// @@ -90,7 +90,7 @@ public interface IFakeApiSync : IApiAccessor /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0); /// /// /// @@ -101,7 +101,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); + decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0); /// /// @@ -113,7 +113,7 @@ public interface IFakeApiSync : IApiAccessor /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0); /// /// /// @@ -125,7 +125,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// string - string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string), int operationIndex = 0); + string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// @@ -138,7 +138,7 @@ public interface IFakeApiSync : IApiAccessor /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string), int operationIndex = 0); + ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0); /// /// Array of Enums /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -329,7 +329,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0); /// /// To test enum parameters /// @@ -347,7 +347,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// To test enum parameters @@ -366,7 +366,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -382,7 +382,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -399,7 +399,7 @@ public interface IFakeApiSync : IApiAccessor /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0); /// /// test inline additionalProperties /// @@ -480,7 +480,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// @@ -500,7 +500,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0); /// /// test referenced string map /// @@ -564,7 +564,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -577,7 +577,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -589,7 +589,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -602,7 +602,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -614,7 +614,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -627,7 +627,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -640,7 +640,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -654,7 +654,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -850,7 +850,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -876,7 +876,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -895,7 +895,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -915,7 +915,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -932,7 +932,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -950,7 +950,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -1047,7 +1047,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -1068,7 +1068,7 @@ public interface IFakeApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test referenced string map /// @@ -1347,7 +1347,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) + public bool FakeOuterBooleanSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1360,7 +1360,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1413,7 +1413,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1427,7 +1427,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1481,7 +1481,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1494,8 +1494,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option), int operationIndex = 0) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1547,7 +1551,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1561,8 +1565,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1615,7 +1623,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) + public decimal FakeOuterNumberSerialize(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1628,7 +1636,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1681,7 +1689,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1695,7 +1703,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1750,7 +1758,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string), int operationIndex = 0) + public string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, body); return localVarResponse.Data; @@ -1764,8 +1772,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1819,7 +1835,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(requiredStringUuid, body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1834,8 +1850,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2283,9 +2307,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2354,9 +2376,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2425,9 +2445,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2496,9 +2514,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2569,15 +2585,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2649,15 +2661,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2728,9 +2736,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2801,9 +2807,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2870,7 +2874,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); } @@ -2895,19 +2899,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2931,49 +2955,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3021,7 +3045,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEndpointParametersWithHttpInfoAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3047,19 +3071,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3084,49 +3128,49 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { - localVarRequestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary.Value); } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; @@ -3168,7 +3212,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -3187,8 +3231,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -3211,37 +3279,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3277,7 +3345,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3297,8 +3365,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3322,37 +3414,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.Serialize(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; @@ -3386,7 +3478,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -3403,7 +3495,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3428,18 +3520,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3479,7 +3571,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3497,7 +3589,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3523,18 +3615,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; @@ -3585,9 +3677,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3656,9 +3746,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3727,9 +3815,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3798,9 +3884,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3871,15 +3955,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3951,15 +4031,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4021,7 +4097,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } @@ -4041,49 +4117,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4113,13 +4183,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4156,7 +4226,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -4177,49 +4247,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4250,13 +4314,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; @@ -4301,9 +4365,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -4372,9 +4434,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index dd74c66d1544..9f168cc6adb2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -228,9 +228,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -306,9 +304,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs index 7a34dc4fe192..20b583356df9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs @@ -55,7 +55,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); + void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Deletes a pet @@ -68,7 +68,7 @@ public interface IPetApiSync : IApiAccessor /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); + ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0); /// /// Finds Pets by status /// @@ -169,7 +169,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -183,7 +183,7 @@ public interface IPetApiSync : IApiAccessor /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0); /// /// uploads an image /// @@ -193,7 +193,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image @@ -207,7 +207,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0); /// /// uploads an image (required) /// @@ -217,7 +217,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); /// /// uploads an image (required) @@ -231,7 +231,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0); #endregion Synchronous Operations } @@ -278,7 +278,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -292,7 +292,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -408,7 +408,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -423,7 +423,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -437,7 +437,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -452,7 +452,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -466,7 +466,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -481,7 +481,7 @@ public interface IPetApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -625,9 +625,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -729,9 +727,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -818,7 +814,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) + public void DeletePet(long petId, Option apiKey = default(Option), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -831,8 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option), int operationIndex = 0) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -855,9 +855,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -903,7 +903,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -917,8 +917,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -942,9 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, i } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } localVarRequestOptions.Operation = "PetApi.DeletePet"; @@ -1006,9 +1010,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1111,9 +1113,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1218,9 +1218,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,9 +1323,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1583,9 +1579,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1687,9 +1681,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1777,7 +1769,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1791,8 +1783,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1816,13 +1816,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1869,7 +1869,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1884,8 +1884,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1910,13 +1918,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; @@ -1963,7 +1971,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1978,8 +1986,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2004,13 +2020,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2057,7 +2073,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2073,8 +2089,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2100,13 +2124,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { - localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file.Value); } localVarRequestOptions.Operation = "PetApi.UploadFile"; @@ -2153,7 +2177,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -2168,13 +2192,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2201,9 +2227,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); @@ -2251,7 +2277,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2267,13 +2293,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2301,9 +2329,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs index e8bed0a150ec..1ffc5a694f5b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -364,9 +364,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -434,9 +432,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -775,9 +771,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -849,9 +843,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index 8efb827cdc00..3a89a6e99556 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -552,9 +552,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -623,9 +621,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -694,9 +690,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -765,9 +759,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -836,9 +828,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -907,9 +897,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -978,9 +966,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1048,9 +1034,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1119,9 +1103,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1192,9 +1174,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1267,15 +1247,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1349,15 +1325,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1552,15 +1524,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1632,15 +1600,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - { - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - } + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index a55d7f34afc6..9c2644600398 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -32,6 +32,7 @@ using Polly; using Org.OpenAPITools.Client.Auth; using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -51,7 +52,8 @@ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -185,7 +187,8 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..722d06c6b323 --- /dev/null +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,124 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + Type innerType = value.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 08a39249cb82..64ec72ede072 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class Activity : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// activityOutputs. - public Activity(Dictionary> activityOutputs = default(Dictionary>)) + public Activity(Option>> activityOutputs = default(Option>>)) { + // to ensure "activityOutputs" (not nullable) is not null + if (activityOutputs.IsSet && activityOutputs.Value == null) + { + throw new ArgumentNullException("activityOutputs isn't a nullable property for Activity and cannot be null"); + } this.ActivityOutputs = activityOutputs; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class Activity : IEquatable, IValidatableObject /// Gets or Sets ActivityOutputs /// [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] - public Dictionary> ActivityOutputs { get; set; } + public Option>> ActivityOutputs { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActivityOutputs != null) + if (this.ActivityOutputs.IsSet && this.ActivityOutputs.Value != null) { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); + hashCode = (hashCode * 59) + this.ActivityOutputs.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index dce3f9134dbb..1b186a8771ed 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class ActivityOutputElementRepresentation : IEquatable /// prop1. /// prop2. - public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + public ActivityOutputElementRepresentation(Option prop1 = default(Option), Option prop2 = default(Option)) { + // to ensure "prop1" (not nullable) is not null + if (prop1.IsSet && prop1.Value == null) + { + throw new ArgumentNullException("prop1 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } + // to ensure "prop2" (not nullable) is not null + if (prop2.IsSet && prop2.Value == null) + { + throw new ArgumentNullException("prop2 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } this.Prop1 = prop1; this.Prop2 = prop2; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class ActivityOutputElementRepresentation : IEquatable [DataMember(Name = "prop1", EmitDefaultValue = false)] - public string Prop1 { get; set; } + public Option Prop1 { get; set; } /// /// Gets or Sets Prop2 /// [DataMember(Name = "prop2", EmitDefaultValue = false)] - public Object Prop2 { get; set; } + public Option Prop2 { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Prop1 != null) + if (this.Prop1.IsSet && this.Prop1.Value != null) { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop1.Value.GetHashCode(); } - if (this.Prop2 != null) + if (this.Prop2.IsSet && this.Prop2.Value != null) { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop2.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index c83597fc607e..c84fba57b967 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -43,8 +44,43 @@ public partial class AdditionalPropertiesClass : IEquatablemapWithUndeclaredPropertiesAnytype3. /// an object with no declared properties and no undeclared properties, hence it's an empty map.. /// mapWithUndeclaredPropertiesString. - public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) + public AdditionalPropertiesClass(Option> mapProperty = default(Option>), Option>> mapOfMapProperty = default(Option>>), Option anytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype2 = default(Option), Option> mapWithUndeclaredPropertiesAnytype3 = default(Option>), Option emptyMap = default(Option), Option> mapWithUndeclaredPropertiesString = default(Option>)) { + // to ensure "mapProperty" (not nullable) is not null + if (mapProperty.IsSet && mapProperty.Value == null) + { + throw new ArgumentNullException("mapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapOfMapProperty" (not nullable) is not null + if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) + { + throw new ArgumentNullException("mapOfMapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype1" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype2" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype3" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "emptyMap" (not nullable) is not null + if (emptyMap.IsSet && emptyMap.Value == null) + { + throw new ArgumentNullException("emptyMap isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesString" (not nullable) is not null + if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesString isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } this.MapProperty = mapProperty; this.MapOfMapProperty = mapOfMapProperty; this.Anytype1 = anytype1; @@ -60,50 +96,50 @@ public partial class AdditionalPropertiesClass : IEquatable [DataMember(Name = "map_property", EmitDefaultValue = false)] - public Dictionary MapProperty { get; set; } + public Option> MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] - public Dictionary> MapOfMapProperty { get; set; } + public Option>> MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// [DataMember(Name = "anytype_1", EmitDefaultValue = true)] - public Object Anytype1 { get; set; } + public Option Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } + public Option> MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. [DataMember(Name = "empty_map", EmitDefaultValue = false)] - public Object EmptyMap { get; set; } + public Option EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesString { get; set; } + public Option> MapWithUndeclaredPropertiesString { get; set; } /// /// Gets or Sets additional properties @@ -170,37 +206,37 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapProperty != null) + if (this.MapProperty.IsSet && this.MapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapProperty.Value.GetHashCode(); } - if (this.MapOfMapProperty != null) + if (this.MapOfMapProperty.IsSet && this.MapOfMapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfMapProperty.Value.GetHashCode(); } - if (this.Anytype1 != null) + if (this.Anytype1.IsSet && this.Anytype1.Value != null) { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.Anytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) + if (this.MapWithUndeclaredPropertiesAnytype1.IsSet && this.MapWithUndeclaredPropertiesAnytype1.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) + if (this.MapWithUndeclaredPropertiesAnytype2.IsSet && this.MapWithUndeclaredPropertiesAnytype2.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) + if (this.MapWithUndeclaredPropertiesAnytype3.IsSet && this.MapWithUndeclaredPropertiesAnytype3.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.Value.GetHashCode(); } - if (this.EmptyMap != null) + if (this.EmptyMap.IsSet && this.EmptyMap.Value != null) { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); + hashCode = (hashCode * 59) + this.EmptyMap.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesString != null) + if (this.MapWithUndeclaredPropertiesString.IsSet && this.MapWithUndeclaredPropertiesString.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 9ddb56ebad6c..a9332678ea77 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -49,16 +50,20 @@ protected Animal() /// /// className (required). /// color (default to "red"). - public Animal(string className = default(string), string color = @"red") + public Animal(string className = default(string), Option color = default(Option)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Animal and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for Animal and cannot be null"); } this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? @"red"; + this.Color = color.IsSet ? color : new Option(@"red"); this.AdditionalProperties = new Dictionary(); } @@ -72,7 +77,7 @@ protected Animal() /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Gets or Sets additional properties @@ -137,9 +142,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); } - if (this.Color != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index e55d523aad1f..72fba0eefb19 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,18 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// code. /// type. /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) + public ApiResponse(Option code = default(Option), Option type = default(Option), Option message = default(Option)) { + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for ApiResponse and cannot be null"); + } + // to ensure "message" (not nullable) is not null + if (message.IsSet && message.Value == null) + { + throw new ArgumentNullException("message isn't a nullable property for ApiResponse and cannot be null"); + } this.Code = code; this.Type = type; this.Message = message; @@ -50,19 +61,19 @@ public partial class ApiResponse : IEquatable, IValidatableObject /// Gets or Sets Code /// [DataMember(Name = "code", EmitDefaultValue = false)] - public int Code { get; set; } + public Option Code { get; set; } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + public Option Type { get; set; } /// /// Gets or Sets Message /// [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } + public Option Message { get; set; } /// /// Gets or Sets additional properties @@ -124,14 +135,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) + if (this.Code.IsSet) + { + hashCode = (hashCode * 59) + this.Code.Value.GetHashCode(); + } + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.Message != null) + if (this.Message.IsSet && this.Message.Value != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this.Message.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 8d3f9af56df6..f085a6b77f31 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class Apple : IEquatable, IValidatableObject /// cultivar. /// origin. /// colorCode. - public Apple(string cultivar = default(string), string origin = default(string), string colorCode = default(string)) + public Apple(Option cultivar = default(Option), Option origin = default(Option), Option colorCode = default(Option)) { + // to ensure "cultivar" (not nullable) is not null + if (cultivar.IsSet && cultivar.Value == null) + { + throw new ArgumentNullException("cultivar isn't a nullable property for Apple and cannot be null"); + } + // to ensure "origin" (not nullable) is not null + if (origin.IsSet && origin.Value == null) + { + throw new ArgumentNullException("origin isn't a nullable property for Apple and cannot be null"); + } + // to ensure "colorCode" (not nullable) is not null + if (colorCode.IsSet && colorCode.Value == null) + { + throw new ArgumentNullException("colorCode isn't a nullable property for Apple and cannot be null"); + } this.Cultivar = cultivar; this.Origin = origin; this.ColorCode = colorCode; @@ -50,19 +66,19 @@ public partial class Apple : IEquatable, IValidatableObject /// Gets or Sets Cultivar /// [DataMember(Name = "cultivar", EmitDefaultValue = false)] - public string Cultivar { get; set; } + public Option Cultivar { get; set; } /// /// Gets or Sets Origin /// [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin { get; set; } + public Option Origin { get; set; } /// /// Gets or Sets ColorCode /// [DataMember(Name = "color_code", EmitDefaultValue = false)] - public string ColorCode { get; set; } + public Option ColorCode { get; set; } /// /// Gets or Sets additional properties @@ -124,17 +140,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Cultivar != null) + if (this.Cultivar.IsSet && this.Cultivar.Value != null) { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); + hashCode = (hashCode * 59) + this.Cultivar.Value.GetHashCode(); } - if (this.Origin != null) + if (this.Origin.IsSet && this.Origin.Value != null) { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); + hashCode = (hashCode * 59) + this.Origin.Value.GetHashCode(); } - if (this.ColorCode != null) + if (this.ColorCode.IsSet && this.ColorCode.Value != null) { - hashCode = (hashCode * 59) + this.ColorCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorCode.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index 3eef221be3e3..f2a1e63e3787 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,12 +43,12 @@ protected AppleReq() { } /// /// cultivar (required). /// mealy. - public AppleReq(string cultivar = default(string), bool mealy = default(bool)) + public AppleReq(string cultivar = default(string), Option mealy = default(Option)) { - // to ensure "cultivar" is required (not null) + // to ensure "cultivar" (not nullable) is not null if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); + throw new ArgumentNullException("cultivar isn't a nullable property for AppleReq and cannot be null"); } this.Cultivar = cultivar; this.Mealy = mealy; @@ -63,7 +64,7 @@ protected AppleReq() { } /// Gets or Sets Mealy /// [DataMember(Name = "mealy", EmitDefaultValue = true)] - public bool Mealy { get; set; } + public Option Mealy { get; set; } /// /// Returns the string presentation of the object @@ -121,7 +122,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); + if (this.Mealy.IsSet) + { + hashCode = (hashCode * 59) + this.Mealy.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 3e1666ca90f8..7cc2ebed0e24 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable class. /// /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + public ArrayOfArrayOfNumberOnly(Option>> arrayArrayNumber = default(Option>>)) { + // to ensure "arrayArrayNumber" (not nullable) is not null + if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) + { + throw new ArgumentNullException("arrayArrayNumber isn't a nullable property for ArrayOfArrayOfNumberOnly and cannot be null"); + } this.ArrayArrayNumber = arrayArrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] - public List> ArrayArrayNumber { get; set; } + public Option>> ArrayArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayArrayNumber != null) + if (this.ArrayArrayNumber.IsSet && this.ArrayArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index f2946f435b53..7d85fc169003 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Initializes a new instance of the class. /// /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) + public ArrayOfNumberOnly(Option> arrayNumber = default(Option>)) { + // to ensure "arrayNumber" (not nullable) is not null + if (arrayNumber.IsSet && arrayNumber.Value == null) + { + throw new ArgumentNullException("arrayNumber isn't a nullable property for ArrayOfNumberOnly and cannot be null"); + } this.ArrayNumber = arrayNumber; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat /// Gets or Sets ArrayNumber /// [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] - public List ArrayNumber { get; set; } + public Option> ArrayNumber { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayNumber != null) + if (this.ArrayNumber.IsSet && this.ArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNumber.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 343e486f6575..119862eca2e8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,23 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// arrayOfString. /// arrayArrayOfInteger. /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + public ArrayTest(Option> arrayOfString = default(Option>), Option>> arrayArrayOfInteger = default(Option>>), Option>> arrayArrayOfModel = default(Option>>)) { + // to ensure "arrayOfString" (not nullable) is not null + if (arrayOfString.IsSet && arrayOfString.Value == null) + { + throw new ArgumentNullException("arrayOfString isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfInteger" (not nullable) is not null + if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) + { + throw new ArgumentNullException("arrayArrayOfInteger isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfModel" (not nullable) is not null + if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) + { + throw new ArgumentNullException("arrayArrayOfModel isn't a nullable property for ArrayTest and cannot be null"); + } this.ArrayOfString = arrayOfString; this.ArrayArrayOfInteger = arrayArrayOfInteger; this.ArrayArrayOfModel = arrayArrayOfModel; @@ -50,19 +66,19 @@ public partial class ArrayTest : IEquatable, IValidatableObject /// Gets or Sets ArrayOfString /// [DataMember(Name = "array_of_string", EmitDefaultValue = false)] - public List ArrayOfString { get; set; } + public Option> ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] - public List> ArrayArrayOfInteger { get; set; } + public Option>> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] - public List> ArrayArrayOfModel { get; set; } + public Option>> ArrayArrayOfModel { get; set; } /// /// Gets or Sets additional properties @@ -124,17 +140,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayOfString != null) + if (this.ArrayOfString.IsSet && this.ArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayOfString.Value.GetHashCode(); } - if (this.ArrayArrayOfInteger != null) + if (this.ArrayArrayOfInteger.IsSet && this.ArrayArrayOfInteger.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.Value.GetHashCode(); } - if (this.ArrayArrayOfModel != null) + if (this.ArrayArrayOfModel.IsSet && this.ArrayArrayOfModel.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfModel.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 04d69550656d..3d6f908c4487 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// lengthCm. - public Banana(decimal lengthCm = default(decimal)) + public Banana(Option lengthCm = default(Option)) { this.LengthCm = lengthCm; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class Banana : IEquatable, IValidatableObject /// Gets or Sets LengthCm /// [DataMember(Name = "lengthCm", EmitDefaultValue = false)] - public decimal LengthCm { get; set; } + public Option LengthCm { get; set; } /// /// Gets or Sets additional properties @@ -106,7 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); + if (this.LengthCm.IsSet) + { + hashCode = (hashCode * 59) + this.LengthCm.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 360cb5281e80..02703e4025a9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -42,7 +43,7 @@ protected BananaReq() { } /// /// lengthCm (required). /// sweet. - public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool)) + public BananaReq(decimal lengthCm = default(decimal), Option sweet = default(Option)) { this.LengthCm = lengthCm; this.Sweet = sweet; @@ -58,7 +59,7 @@ protected BananaReq() { } /// Gets or Sets Sweet /// [DataMember(Name = "sweet", EmitDefaultValue = true)] - public bool Sweet { get; set; } + public Option Sweet { get; set; } /// /// Returns the string presentation of the object @@ -113,7 +114,10 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); + if (this.Sweet.IsSet) + { + hashCode = (hashCode * 59) + this.Sweet.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index 868cba98eeea..8771aa57a2b8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected BasquePig() /// className (required). public BasquePig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for BasquePig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index f46fffa0ad6c..46478517456c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -41,8 +42,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// capitalSnake. /// sCAETHFlowPoints. /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) + public Capitalization(Option smallCamel = default(Option), Option capitalCamel = default(Option), Option smallSnake = default(Option), Option capitalSnake = default(Option), Option sCAETHFlowPoints = default(Option), Option aTTNAME = default(Option)) { + // to ensure "smallCamel" (not nullable) is not null + if (smallCamel.IsSet && smallCamel.Value == null) + { + throw new ArgumentNullException("smallCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalCamel" (not nullable) is not null + if (capitalCamel.IsSet && capitalCamel.Value == null) + { + throw new ArgumentNullException("capitalCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "smallSnake" (not nullable) is not null + if (smallSnake.IsSet && smallSnake.Value == null) + { + throw new ArgumentNullException("smallSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalSnake" (not nullable) is not null + if (capitalSnake.IsSet && capitalSnake.Value == null) + { + throw new ArgumentNullException("capitalSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "sCAETHFlowPoints" (not nullable) is not null + if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) + { + throw new ArgumentNullException("sCAETHFlowPoints isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "aTTNAME" (not nullable) is not null + if (aTTNAME.IsSet && aTTNAME.Value == null) + { + throw new ArgumentNullException("aTTNAME isn't a nullable property for Capitalization and cannot be null"); + } this.SmallCamel = smallCamel; this.CapitalCamel = capitalCamel; this.SmallSnake = smallSnake; @@ -56,38 +87,38 @@ public partial class Capitalization : IEquatable, IValidatableOb /// Gets or Sets SmallCamel /// [DataMember(Name = "smallCamel", EmitDefaultValue = false)] - public string SmallCamel { get; set; } + public Option SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] - public string CapitalCamel { get; set; } + public Option CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// [DataMember(Name = "small_Snake", EmitDefaultValue = false)] - public string SmallSnake { get; set; } + public Option SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] - public string CapitalSnake { get; set; } + public Option CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] - public string SCAETHFlowPoints { get; set; } + public Option SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] - public string ATT_NAME { get; set; } + public Option ATT_NAME { get; set; } /// /// Gets or Sets additional properties @@ -152,29 +183,29 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SmallCamel != null) + if (this.SmallCamel.IsSet && this.SmallCamel.Value != null) { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallCamel.Value.GetHashCode(); } - if (this.CapitalCamel != null) + if (this.CapitalCamel.IsSet && this.CapitalCamel.Value != null) { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalCamel.Value.GetHashCode(); } - if (this.SmallSnake != null) + if (this.SmallSnake.IsSet && this.SmallSnake.Value != null) { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallSnake.Value.GetHashCode(); } - if (this.CapitalSnake != null) + if (this.CapitalSnake.IsSet && this.CapitalSnake.Value != null) { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalSnake.Value.GetHashCode(); } - if (this.SCAETHFlowPoints != null) + if (this.SCAETHFlowPoints.IsSet && this.SCAETHFlowPoints.Value != null) { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); + hashCode = (hashCode * 59) + this.SCAETHFlowPoints.Value.GetHashCode(); } - if (this.ATT_NAME != null) + if (this.ATT_NAME.IsSet && this.ATT_NAME.Value != null) { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); + hashCode = (hashCode * 59) + this.ATT_NAME.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs index a427b55727d7..c2e163db6026 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,7 +49,7 @@ protected Cat() /// declawed. /// className (required) (default to "Cat"). /// color (default to "red"). - public Cat(bool declawed = default(bool), string className = @"Cat", string color = @"red") : base(className, color) + public Cat(Option declawed = default(Option), string className = @"Cat", Option color = default(Option)) : base(className, color) { this.Declawed = declawed; this.AdditionalProperties = new Dictionary(); @@ -58,7 +59,7 @@ protected Cat() /// Gets or Sets Declawed /// [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed { get; set; } + public Option Declawed { get; set; } /// /// Gets or Sets additional properties @@ -119,7 +120,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); + if (this.Declawed.IsSet) + { + hashCode = (hashCode * 59) + this.Declawed.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs index 5edb4edfea4a..fa5cfbd9a2d5 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,15 +46,15 @@ protected Category() /// /// id. /// name (required) (default to "default-name"). - public Category(long id = default(long), string name = @"default-name") + public Category(Option id = default(Option), string name = @"default-name") { - // to ensure "name" is required (not null) + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); } - this.Name = name; this.Id = id; + this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -61,7 +62,7 @@ protected Category() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name @@ -128,7 +129,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index a5d404bd17d6..fd54f56a6ea9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -66,10 +67,15 @@ protected ChildCat() /// /// name. /// petType (required) (default to PetTypeEnum.ChildCat). - public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() + public ChildCat(Option name = default(Option), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.PetType = petType; + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for ChildCat and cannot be null"); + } this.Name = name; + this.PetType = petType; this.AdditionalProperties = new Dictionary(); } @@ -77,7 +83,7 @@ protected ChildCat() /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -139,9 +145,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.PetType.GetHashCode(); if (this.AdditionalProperties != null) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 7a0846aec4e1..c7e10769716c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClass. - public ClassModel(string varClass = default(string)) + public ClassModel(Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for ClassModel and cannot be null"); + } this.Class = varClass; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ClassModel : IEquatable, IValidatableObject /// Gets or Sets Class /// [DataMember(Name = "_class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Class != null) + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index bbed21283745..fbabd075d34f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected ComplexQuadrilateral() /// quadrilateralType (required). public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 3c81f50d00d7..3816eb30acd4 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected DanishPig() /// className (required). public DanishPig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for DanishPig and cannot be null"); } this.ClassName = className; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 9933ec57ea9e..3b5f665905e4 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// dateOnlyProperty. - public DateOnlyClass(DateTime dateOnlyProperty = default(DateTime)) + public DateOnlyClass(Option dateOnlyProperty = default(Option)) { + // to ensure "dateOnlyProperty" (not nullable) is not null + if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) + { + throw new ArgumentNullException("dateOnlyProperty isn't a nullable property for DateOnlyClass and cannot be null"); + } this.DateOnlyProperty = dateOnlyProperty; this.AdditionalProperties = new Dictionary(); } @@ -48,7 +54,7 @@ public partial class DateOnlyClass : IEquatable, IValidatableObje /// Fri Jul 21 00:00:00 UTC 2017 [DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOnlyProperty { get; set; } + public Option DateOnlyProperty { get; set; } /// /// Gets or Sets additional properties @@ -108,9 +114,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.DateOnlyProperty != null) + if (this.DateOnlyProperty.IsSet && this.DateOnlyProperty.Value != null) { - hashCode = (hashCode * 59) + this.DateOnlyProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.DateOnlyProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 2895d518a81f..d323606d4072 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Initializes a new instance of the class. /// /// name. - public DeprecatedObject(string name = default(string)) + public DeprecatedObject(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for DeprecatedObject and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class DeprecatedObject : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 44f95fa0fe05..d638ec7f4551 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -48,8 +49,13 @@ protected Dog() /// breed. /// className (required) (default to "Dog"). /// color (default to "red"). - public Dog(string breed = default(string), string className = @"Dog", string color = @"red") : base(className, color) + public Dog(Option breed = default(Option), string className = @"Dog", Option color = default(Option)) : base(className, color) { + // to ensure "breed" (not nullable) is not null + if (breed.IsSet && breed.Value == null) + { + throw new ArgumentNullException("breed isn't a nullable property for Dog and cannot be null"); + } this.Breed = breed; this.AdditionalProperties = new Dictionary(); } @@ -58,7 +64,7 @@ protected Dog() /// Gets or Sets Breed /// [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed { get; set; } + public Option Breed { get; set; } /// /// Gets or Sets additional properties @@ -119,9 +125,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) + if (this.Breed.IsSet && this.Breed.Value != null) { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); + hashCode = (hashCode * 59) + this.Breed.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 98c683539e6f..bcb1878282cf 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,18 @@ public partial class Drawing : IEquatable, IValidatableObject /// shapeOrNull. /// nullableShape. /// shapes. - public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) + public Drawing(Option mainShape = default(Option), Option shapeOrNull = default(Option), Option nullableShape = default(Option), Option> shapes = default(Option>)) { + // to ensure "mainShape" (not nullable) is not null + if (mainShape.IsSet && mainShape.Value == null) + { + throw new ArgumentNullException("mainShape isn't a nullable property for Drawing and cannot be null"); + } + // to ensure "shapes" (not nullable) is not null + if (shapes.IsSet && shapes.Value == null) + { + throw new ArgumentNullException("shapes isn't a nullable property for Drawing and cannot be null"); + } this.MainShape = mainShape; this.ShapeOrNull = shapeOrNull; this.NullableShape = nullableShape; @@ -52,25 +63,25 @@ public partial class Drawing : IEquatable, IValidatableObject /// Gets or Sets MainShape /// [DataMember(Name = "mainShape", EmitDefaultValue = false)] - public Shape MainShape { get; set; } + public Option MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// [DataMember(Name = "shapeOrNull", EmitDefaultValue = true)] - public ShapeOrNull ShapeOrNull { get; set; } + public Option ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// [DataMember(Name = "nullableShape", EmitDefaultValue = true)] - public NullableShape NullableShape { get; set; } + public Option NullableShape { get; set; } /// /// Gets or Sets Shapes /// [DataMember(Name = "shapes", EmitDefaultValue = false)] - public List Shapes { get; set; } + public Option> Shapes { get; set; } /// /// Gets or Sets additional properties @@ -133,21 +144,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MainShape != null) + if (this.MainShape.IsSet && this.MainShape.Value != null) { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); + hashCode = (hashCode * 59) + this.MainShape.Value.GetHashCode(); } - if (this.ShapeOrNull != null) + if (this.ShapeOrNull.IsSet && this.ShapeOrNull.Value != null) { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); + hashCode = (hashCode * 59) + this.ShapeOrNull.Value.GetHashCode(); } - if (this.NullableShape != null) + if (this.NullableShape.IsSet && this.NullableShape.Value != null) { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableShape.Value.GetHashCode(); } - if (this.Shapes != null) + if (this.Shapes.IsSet && this.Shapes.Value != null) { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); + hashCode = (hashCode * 59) + this.Shapes.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 2bec93345bb7..569a1bbf1ea4 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,7 +57,7 @@ public enum JustSymbolEnum /// Gets or Sets JustSymbol /// [DataMember(Name = "just_symbol", EmitDefaultValue = false)] - public JustSymbolEnum? JustSymbol { get; set; } + public Option JustSymbol { get; set; } /// /// Defines ArrayEnum /// @@ -81,8 +82,13 @@ public enum ArrayEnumEnum /// /// justSymbol. /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) + public EnumArrays(Option justSymbol = default(Option), Option> arrayEnum = default(Option>)) { + // to ensure "arrayEnum" (not nullable) is not null + if (arrayEnum.IsSet && arrayEnum.Value == null) + { + throw new ArgumentNullException("arrayEnum isn't a nullable property for EnumArrays and cannot be null"); + } this.JustSymbol = justSymbol; this.ArrayEnum = arrayEnum; this.AdditionalProperties = new Dictionary(); @@ -92,7 +98,7 @@ public enum ArrayEnumEnum /// Gets or Sets ArrayEnum /// [DataMember(Name = "array_enum", EmitDefaultValue = false)] - public List ArrayEnum { get; set; } + public Option> ArrayEnum { get; set; } /// /// Gets or Sets additional properties @@ -153,10 +159,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) + if (this.JustSymbol.IsSet) + { + hashCode = (hashCode * 59) + this.JustSymbol.Value.GetHashCode(); + } + if (this.ArrayEnum.IsSet && this.ArrayEnum.Value != null) { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayEnum.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs index c47540b557a3..eb2aa0bd1217 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 27d1193954ea..20e394af4bc2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -92,7 +93,7 @@ public enum EnumStringEnum /// Gets or Sets EnumString /// [DataMember(Name = "enum_string", EmitDefaultValue = false)] - public EnumStringEnum? EnumString { get; set; } + public Option EnumString { get; set; } /// /// Defines EnumStringRequired /// @@ -175,7 +176,7 @@ public enum EnumIntegerEnum /// Gets or Sets EnumInteger /// [DataMember(Name = "enum_integer", EmitDefaultValue = false)] - public EnumIntegerEnum? EnumInteger { get; set; } + public Option EnumInteger { get; set; } /// /// Defines EnumIntegerOnly /// @@ -197,7 +198,7 @@ public enum EnumIntegerOnlyEnum /// Gets or Sets EnumIntegerOnly /// [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] - public EnumIntegerOnlyEnum? EnumIntegerOnly { get; set; } + public Option EnumIntegerOnly { get; set; } /// /// Defines EnumNumber /// @@ -222,31 +223,31 @@ public enum EnumNumberEnum /// Gets or Sets EnumNumber /// [DataMember(Name = "enum_number", EmitDefaultValue = false)] - public EnumNumberEnum? EnumNumber { get; set; } + public Option EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// [DataMember(Name = "outerEnum", EmitDefaultValue = true)] - public OuterEnum? OuterEnum { get; set; } + public Option OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] - public OuterEnumInteger? OuterEnumInteger { get; set; } + public Option OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } + public Option OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } + public Option OuterEnumIntegerDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -267,10 +268,10 @@ protected EnumTest() /// outerEnumInteger. /// outerEnumDefaultValue. /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumIntegerOnlyEnum? enumIntegerOnly = default(EnumIntegerOnlyEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) + public EnumTest(Option enumString = default(Option), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), Option enumInteger = default(Option), Option enumIntegerOnly = default(Option), Option enumNumber = default(Option), Option outerEnum = default(Option), Option outerEnumInteger = default(Option), Option outerEnumDefaultValue = default(Option), Option outerEnumIntegerDefaultValue = default(Option)) { - this.EnumStringRequired = enumStringRequired; this.EnumString = enumString; + this.EnumStringRequired = enumStringRequired; this.EnumInteger = enumInteger; this.EnumIntegerOnly = enumIntegerOnly; this.EnumNumber = enumNumber; @@ -347,15 +348,39 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); + if (this.EnumString.IsSet) + { + hashCode = (hashCode * 59) + this.EnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); + if (this.EnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.EnumInteger.Value.GetHashCode(); + } + if (this.EnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.EnumIntegerOnly.Value.GetHashCode(); + } + if (this.EnumNumber.IsSet) + { + hashCode = (hashCode * 59) + this.EnumNumber.Value.GetHashCode(); + } + if (this.OuterEnum.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnum.Value.GetHashCode(); + } + if (this.OuterEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumInteger.Value.GetHashCode(); + } + if (this.OuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.OuterEnumIntegerDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 7fb0e2094548..26e4c5b5984b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected EquilateralTriangle() /// triangleType (required). public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for EquilateralTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for EquilateralTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs index 72b34e492626..3073d9ce4919 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class File : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// Test capitalization. - public File(string sourceURI = default(string)) + public File(Option sourceURI = default(Option)) { + // to ensure "sourceURI" (not nullable) is not null + if (sourceURI.IsSet && sourceURI.Value == null) + { + throw new ArgumentNullException("sourceURI isn't a nullable property for File and cannot be null"); + } this.SourceURI = sourceURI; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +53,7 @@ public partial class File : IEquatable, IValidatableObject /// /// Test capitalization [DataMember(Name = "sourceURI", EmitDefaultValue = false)] - public string SourceURI { get; set; } + public Option SourceURI { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +113,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SourceURI != null) + if (this.SourceURI.IsSet && this.SourceURI.Value != null) { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); + hashCode = (hashCode * 59) + this.SourceURI.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index cd75dba4a925..bdd81d64aace 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// /// file. /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) + public FileSchemaTestClass(Option file = default(Option), Option> files = default(Option>)) { + // to ensure "file" (not nullable) is not null + if (file.IsSet && file.Value == null) + { + throw new ArgumentNullException("file isn't a nullable property for FileSchemaTestClass and cannot be null"); + } + // to ensure "files" (not nullable) is not null + if (files.IsSet && files.Value == null) + { + throw new ArgumentNullException("files isn't a nullable property for FileSchemaTestClass and cannot be null"); + } this.File = file; this.Files = files; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class FileSchemaTestClass : IEquatable, IVal /// Gets or Sets File /// [DataMember(Name = "file", EmitDefaultValue = false)] - public File File { get; set; } + public Option File { get; set; } /// /// Gets or Sets Files /// [DataMember(Name = "files", EmitDefaultValue = false)] - public List Files { get; set; } + public Option> Files { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.File != null) + if (this.File.IsSet && this.File.Value != null) { - hashCode = (hashCode * 59) + this.File.GetHashCode(); + hashCode = (hashCode * 59) + this.File.Value.GetHashCode(); } - if (this.Files != null) + if (this.Files.IsSet && this.Files.Value != null) { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); + hashCode = (hashCode * 59) + this.Files.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 3108c8a86913..d899e3f91fa0 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,10 +37,14 @@ public partial class Foo : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// bar (default to "bar"). - public Foo(string bar = @"bar") + public Foo(Option bar = default(Option)) { - // use default value if no "bar" provided - this.Bar = bar ?? @"bar"; + // to ensure "bar" (not nullable) is not null + if (bar.IsSet && bar.Value == null) + { + throw new ArgumentNullException("bar isn't a nullable property for Foo and cannot be null"); + } + this.Bar = bar.IsSet ? bar : new Option(@"bar"); this.AdditionalProperties = new Dictionary(); } @@ -47,7 +52,7 @@ public Foo(string bar = @"bar") /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; set; } + public Option Bar { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 1ce81eece3ee..3465ee4146ea 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class FooGetDefaultResponse : IEquatable, /// Initializes a new instance of the class. /// /// varString. - public FooGetDefaultResponse(Foo varString = default(Foo)) + public FooGetDefaultResponse(Option varString = default(Option)) { + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FooGetDefaultResponse and cannot be null"); + } this.String = varString; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class FooGetDefaultResponse : IEquatable, /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public Foo String { get; set; } + public Option String { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.String != null) + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 7158640c24e2..63345fa27a20 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,34 +63,74 @@ protected FormatTest() /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(Option integer = default(Option), Option int32 = default(Option), Option unsignedInteger = default(Option), Option int64 = default(Option), Option unsignedLong = default(Option), decimal number = default(decimal), Option varFloat = default(Option), Option varDouble = default(Option), Option varDecimal = default(Option), Option varString = default(Option), byte[] varByte = default(byte[]), Option binary = default(Option), DateTime date = default(DateTime), Option dateTime = default(Option), Option uuid = default(Option), string password = default(string), Option patternWithDigits = default(Option), Option patternWithDigitsAndDelimiter = default(Option), Option patternWithBackslash = default(Option)) { - this.Number = number; - // to ensure "varByte" is required (not null) + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "varByte" (not nullable) is not null if (varByte == null) { - throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("varByte isn't a nullable property for FormatTest and cannot be null"); } - this.Byte = varByte; - this.Date = date; - // to ensure "password" is required (not null) + // to ensure "binary" (not nullable) is not null + if (binary.IsSet && binary.Value == null) + { + throw new ArgumentNullException("binary isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "date" (not nullable) is not null + if (date == null) + { + throw new ArgumentNullException("date isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "password" (not nullable) is not null if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("password isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigits" (not nullable) is not null + if (patternWithDigits.IsSet && patternWithDigits.Value == null) + { + throw new ArgumentNullException("patternWithDigits isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigitsAndDelimiter" (not nullable) is not null + if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) + { + throw new ArgumentNullException("patternWithDigitsAndDelimiter isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithBackslash" (not nullable) is not null + if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) + { + throw new ArgumentNullException("patternWithBackslash isn't a nullable property for FormatTest and cannot be null"); } - this.Password = password; this.Integer = integer; this.Int32 = int32; this.UnsignedInteger = unsignedInteger; this.Int64 = int64; this.UnsignedLong = unsignedLong; + this.Number = number; this.Float = varFloat; this.Double = varDouble; this.Decimal = varDecimal; this.String = varString; + this.Byte = varByte; this.Binary = binary; + this.Date = date; this.DateTime = dateTime; this.Uuid = uuid; + this.Password = password; this.PatternWithDigits = patternWithDigits; this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; this.PatternWithBackslash = patternWithBackslash; @@ -100,31 +141,31 @@ protected FormatTest() /// Gets or Sets Integer /// [DataMember(Name = "integer", EmitDefaultValue = false)] - public int Integer { get; set; } + public Option Integer { get; set; } /// /// Gets or Sets Int32 /// [DataMember(Name = "int32", EmitDefaultValue = false)] - public int Int32 { get; set; } + public Option Int32 { get; set; } /// /// Gets or Sets UnsignedInteger /// [DataMember(Name = "unsigned_integer", EmitDefaultValue = false)] - public uint UnsignedInteger { get; set; } + public Option UnsignedInteger { get; set; } /// /// Gets or Sets Int64 /// [DataMember(Name = "int64", EmitDefaultValue = false)] - public long Int64 { get; set; } + public Option Int64 { get; set; } /// /// Gets or Sets UnsignedLong /// [DataMember(Name = "unsigned_long", EmitDefaultValue = false)] - public ulong UnsignedLong { get; set; } + public Option UnsignedLong { get; set; } /// /// Gets or Sets Number @@ -136,25 +177,25 @@ protected FormatTest() /// Gets or Sets Float /// [DataMember(Name = "float", EmitDefaultValue = false)] - public float Float { get; set; } + public Option Float { get; set; } /// /// Gets or Sets Double /// [DataMember(Name = "double", EmitDefaultValue = false)] - public double Double { get; set; } + public Option Double { get; set; } /// /// Gets or Sets Decimal /// [DataMember(Name = "decimal", EmitDefaultValue = false)] - public decimal Decimal { get; set; } + public Option Decimal { get; set; } /// /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public string String { get; set; } + public Option String { get; set; } /// /// Gets or Sets Byte @@ -166,7 +207,7 @@ protected FormatTest() /// Gets or Sets Binary /// [DataMember(Name = "binary", EmitDefaultValue = false)] - public System.IO.Stream Binary { get; set; } + public Option Binary { get; set; } /// /// Gets or Sets Date @@ -181,14 +222,14 @@ protected FormatTest() /// /// 2007-12-03T10:15:30+01:00 [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Uuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Password @@ -201,21 +242,21 @@ protected FormatTest() /// /// A string that is a 10 digit number. Can have leading zeros. [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] - public string PatternWithDigits { get; set; } + public Option PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] - public string PatternWithDigitsAndDelimiter { get; set; } + public Option PatternWithDigitsAndDelimiter { get; set; } /// /// None /// /// None [DataMember(Name = "pattern_with_backslash", EmitDefaultValue = false)] - public string PatternWithBackslash { get; set; } + public Option PatternWithBackslash { get; set; } /// /// Gets or Sets additional properties @@ -293,54 +334,78 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode(); + if (this.Integer.IsSet) + { + hashCode = (hashCode * 59) + this.Integer.Value.GetHashCode(); + } + if (this.Int32.IsSet) + { + hashCode = (hashCode * 59) + this.Int32.Value.GetHashCode(); + } + if (this.UnsignedInteger.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedInteger.Value.GetHashCode(); + } + if (this.Int64.IsSet) + { + hashCode = (hashCode * 59) + this.Int64.Value.GetHashCode(); + } + if (this.UnsignedLong.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedLong.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.Number.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) + if (this.Float.IsSet) + { + hashCode = (hashCode * 59) + this.Float.Value.GetHashCode(); + } + if (this.Double.IsSet) + { + hashCode = (hashCode * 59) + this.Double.Value.GetHashCode(); + } + if (this.Decimal.IsSet) + { + hashCode = (hashCode * 59) + this.Decimal.Value.GetHashCode(); + } + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.Byte != null) { hashCode = (hashCode * 59) + this.Byte.GetHashCode(); } - if (this.Binary != null) + if (this.Binary.IsSet && this.Binary.Value != null) { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); + hashCode = (hashCode * 59) + this.Binary.Value.GetHashCode(); } if (this.Date != null) { hashCode = (hashCode * 59) + this.Date.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.Password != null) { hashCode = (hashCode * 59) + this.Password.GetHashCode(); } - if (this.PatternWithDigits != null) + if (this.PatternWithDigits.IsSet && this.PatternWithDigits.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigits.Value.GetHashCode(); } - if (this.PatternWithDigitsAndDelimiter != null) + if (this.PatternWithDigitsAndDelimiter.IsSet && this.PatternWithDigitsAndDelimiter.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.Value.GetHashCode(); } - if (this.PatternWithBackslash != null) + if (this.PatternWithBackslash.IsSet && this.PatternWithBackslash.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithBackslash.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithBackslash.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index 5e0d760c369f..637e088e9ea9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs index 3772b99bdb42..5626c5152e3c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index c22ccd6ebb50..bf63b65e7b74 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 75285a73f6ca..a537191d7d12 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -50,10 +51,10 @@ protected GrandparentAnimal() /// petType (required). public GrandparentAnimal(string petType = default(string)) { - // to ensure "petType" is required (not null) + // to ensure "petType" (not nullable) is not null if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); + throw new ArgumentNullException("petType isn't a nullable property for GrandparentAnimal and cannot be null"); } this.PetType = petType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 3c6298d7d8d2..96d854d60872 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,7 +46,7 @@ public HasOnlyReadOnly() /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -59,7 +60,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Foo /// [DataMember(Name = "foo", EmitDefaultValue = false)] - public string Foo { get; private set; } + public Option Foo { get; private set; } /// /// Returns false as Foo should not be serialized given that it's read-only. @@ -128,13 +129,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Foo != null) + if (this.Foo.IsSet && this.Foo.Value != null) { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); + hashCode = (hashCode * 59) + this.Foo.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 6fe074907762..cced5965aa84 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Initializes a new instance of the class. /// /// nullableMessage. - public HealthCheckResult(string nullableMessage = default(string)) + public HealthCheckResult(Option nullableMessage = default(Option)) { this.NullableMessage = nullableMessage; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class HealthCheckResult : IEquatable, IValidat /// Gets or Sets NullableMessage /// [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] - public string NullableMessage { get; set; } + public Option NullableMessage { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +107,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.NullableMessage != null) + if (this.NullableMessage.IsSet && this.NullableMessage.Value != null) { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableMessage.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index acf86063d050..9b860ce985ee 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -44,17 +45,17 @@ protected IsoscelesTriangle() { } /// triangleType (required). public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for IsoscelesTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for IsoscelesTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs index e06a3f381f12..358846cdd689 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class List : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// var123List. - public List(string var123List = default(string)) + public List(Option var123List = default(Option)) { + // to ensure "var123List" (not nullable) is not null + if (var123List.IsSet && var123List.Value == null) + { + throw new ArgumentNullException("var123List isn't a nullable property for List and cannot be null"); + } this.Var123List = var123List; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class List : IEquatable, IValidatableObject /// Gets or Sets Var123List /// [DataMember(Name = "123-list", EmitDefaultValue = false)] - public string Var123List { get; set; } + public Option Var123List { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Var123List != null) + if (this.Var123List.IsSet && this.Var123List.Value != null) { - hashCode = (hashCode * 59) + this.Var123List.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123List.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 57cc8110fbb8..63e1726e5f79 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,12 +38,20 @@ public partial class LiteralStringClass : IEquatable, IValid /// /// escapedLiteralString (default to "C:\\Users\\username"). /// unescapedLiteralString (default to "C:\Users\username"). - public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", string unescapedLiteralString = @"C:\Users\username") + public LiteralStringClass(Option escapedLiteralString = default(Option), Option unescapedLiteralString = default(Option)) { - // use default value if no "escapedLiteralString" provided - this.EscapedLiteralString = escapedLiteralString ?? @"C:\\Users\\username"; - // use default value if no "unescapedLiteralString" provided - this.UnescapedLiteralString = unescapedLiteralString ?? @"C:\Users\username"; + // to ensure "escapedLiteralString" (not nullable) is not null + if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) + { + throw new ArgumentNullException("escapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + // to ensure "unescapedLiteralString" (not nullable) is not null + if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) + { + throw new ArgumentNullException("unescapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + this.EscapedLiteralString = escapedLiteralString.IsSet ? escapedLiteralString : new Option(@"C:\\Users\\username"); + this.UnescapedLiteralString = unescapedLiteralString.IsSet ? unescapedLiteralString : new Option(@"C:\Users\username"); this.AdditionalProperties = new Dictionary(); } @@ -50,13 +59,13 @@ public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", /// Gets or Sets EscapedLiteralString /// [DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)] - public string EscapedLiteralString { get; set; } + public Option EscapedLiteralString { get; set; } /// /// Gets or Sets UnescapedLiteralString /// [DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)] - public string UnescapedLiteralString { get; set; } + public Option UnescapedLiteralString { get; set; } /// /// Gets or Sets additional properties @@ -117,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.EscapedLiteralString != null) + if (this.EscapedLiteralString.IsSet && this.EscapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.EscapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.EscapedLiteralString.Value.GetHashCode(); } - if (this.UnescapedLiteralString != null) + if (this.UnescapedLiteralString.IsSet && this.UnescapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.UnescapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.UnescapedLiteralString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 49a7e091c235..9efc46f30641 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 691f128ea5fb..004bf942c034 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -58,8 +59,28 @@ public enum InnerEnum /// mapOfEnumString. /// directMap. /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + public MapTest(Option>> mapMapOfString = default(Option>>), Option> mapOfEnumString = default(Option>), Option> directMap = default(Option>), Option> indirectMap = default(Option>)) { + // to ensure "mapMapOfString" (not nullable) is not null + if (mapMapOfString.IsSet && mapMapOfString.Value == null) + { + throw new ArgumentNullException("mapMapOfString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "mapOfEnumString" (not nullable) is not null + if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) + { + throw new ArgumentNullException("mapOfEnumString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "directMap" (not nullable) is not null + if (directMap.IsSet && directMap.Value == null) + { + throw new ArgumentNullException("directMap isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "indirectMap" (not nullable) is not null + if (indirectMap.IsSet && indirectMap.Value == null) + { + throw new ArgumentNullException("indirectMap isn't a nullable property for MapTest and cannot be null"); + } this.MapMapOfString = mapMapOfString; this.MapOfEnumString = mapOfEnumString; this.DirectMap = directMap; @@ -71,25 +92,25 @@ public enum InnerEnum /// Gets or Sets MapMapOfString /// [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] - public Dictionary> MapMapOfString { get; set; } + public Option>> MapMapOfString { get; set; } /// /// Gets or Sets MapOfEnumString /// [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] - public Dictionary MapOfEnumString { get; set; } + public Option> MapOfEnumString { get; set; } /// /// Gets or Sets DirectMap /// [DataMember(Name = "direct_map", EmitDefaultValue = false)] - public Dictionary DirectMap { get; set; } + public Option> DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// [DataMember(Name = "indirect_map", EmitDefaultValue = false)] - public Dictionary IndirectMap { get; set; } + public Option> IndirectMap { get; set; } /// /// Gets or Sets additional properties @@ -152,21 +173,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapMapOfString != null) + if (this.MapMapOfString.IsSet && this.MapMapOfString.Value != null) { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapMapOfString.Value.GetHashCode(); } - if (this.MapOfEnumString != null) + if (this.MapOfEnumString.IsSet && this.MapOfEnumString.Value != null) { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfEnumString.Value.GetHashCode(); } - if (this.DirectMap != null) + if (this.DirectMap.IsSet && this.DirectMap.Value != null) { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.DirectMap.Value.GetHashCode(); } - if (this.IndirectMap != null) + if (this.IndirectMap.IsSet && this.IndirectMap.Value != null) { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.IndirectMap.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 2b62d5975478..5dbb7d0ef732 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedAnyOf(MixedAnyOfContent content = default(MixedAnyOfContent)) + public MixedAnyOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedAnyOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedAnyOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedAnyOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs index 49e94cc5e5db..7c4a5791f8e2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index bd0255888b86..f18b4793a139 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// content. - public MixedOneOf(MixedOneOfContent content = default(MixedOneOfContent)) + public MixedOneOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedOneOf and cannot be null"); + } this.Content = content; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedOneOf : IEquatable, IValidatableObject /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedOneOfContent Content { get; set; } + public Option Content { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs index e2527cc3c315..77af863c507e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 5f51e31aa034..fc342925735f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,28 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatableuuid. /// dateTime. /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuidWithPattern = default(Guid), Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) + public MixedPropertiesAndAdditionalPropertiesClass(Option uuidWithPattern = default(Option), Option uuid = default(Option), Option dateTime = default(Option), Option> map = default(Option>)) { + // to ensure "uuidWithPattern" (not nullable) is not null + if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) + { + throw new ArgumentNullException("uuidWithPattern isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "map" (not nullable) is not null + if (map.IsSet && map.Value == null) + { + throw new ArgumentNullException("map isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } this.UuidWithPattern = uuidWithPattern; this.Uuid = uuid; this.DateTime = dateTime; @@ -52,25 +73,25 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable [DataMember(Name = "uuid_with_pattern", EmitDefaultValue = false)] - public Guid UuidWithPattern { get; set; } + public Option UuidWithPattern { get; set; } /// /// Gets or Sets Uuid /// [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets DateTime /// [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Map /// [DataMember(Name = "map", EmitDefaultValue = false)] - public Dictionary Map { get; set; } + public Option> Map { get; set; } /// /// Gets or Sets additional properties @@ -133,21 +154,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.UuidWithPattern != null) + if (this.UuidWithPattern.IsSet && this.UuidWithPattern.Value != null) { - hashCode = (hashCode * 59) + this.UuidWithPattern.GetHashCode(); + hashCode = (hashCode * 59) + this.UuidWithPattern.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Map != null) + if (this.Map.IsSet && this.Map.Value != null) { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); + hashCode = (hashCode * 59) + this.Map.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 1906ce0b2709..9d5c0bc35f6f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// id. - public MixedSubId(string id = default(string)) + public MixedSubId(Option id = default(Option)) { + // to ensure "id" (not nullable) is not null + if (id.IsSet && id.Value == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixedSubId and cannot be null"); + } this.Id = id; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class MixedSubId : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Id != null) + if (this.Id.IsSet && this.Id.Value != null) { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index a023e3c3e754..d22b1c824ceb 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Model200Response : IEquatable, IValidatab /// /// name. /// varClass. - public Model200Response(int name = default(int), string varClass = default(string)) + public Model200Response(Option name = default(Option), Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for Model200Response and cannot be null"); + } this.Name = name; this.Class = varClass; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class Model200Response : IEquatable, IValidatab /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public int Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets Class /// [DataMember(Name = "class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) + if (this.Name.IsSet) + { + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); + } + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 690894994947..4c8ff7320d98 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varClient. - public ModelClient(string varClient = default(string)) + public ModelClient(Option varClient = default(Option)) { + // to ensure "varClient" (not nullable) is not null + if (varClient.IsSet && varClient.Value == null) + { + throw new ArgumentNullException("varClient isn't a nullable property for ModelClient and cannot be null"); + } this.VarClient = varClient; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ModelClient : IEquatable, IValidatableObject /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public string VarClient { get; set; } + public Option VarClient { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.VarClient != null) + if (this.VarClient.IsSet && this.VarClient.Value != null) { - hashCode = (hashCode * 59) + this.VarClient.GetHashCode(); + hashCode = (hashCode * 59) + this.VarClient.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs index f34052aa706c..10b22f09b12a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -45,8 +46,13 @@ protected Name() /// /// varName (required). /// property. - public Name(int varName = default(int), string property = default(string)) + public Name(int varName = default(int), Option property = default(Option)) { + // to ensure "property" (not nullable) is not null + if (property.IsSet && property.Value == null) + { + throw new ArgumentNullException("property isn't a nullable property for Name and cannot be null"); + } this.VarName = varName; this.Property = property; this.AdditionalProperties = new Dictionary(); @@ -62,7 +68,7 @@ protected Name() /// Gets or Sets SnakeCase /// [DataMember(Name = "snake_case", EmitDefaultValue = false)] - public int SnakeCase { get; private set; } + public Option SnakeCase { get; private set; } /// /// Returns false as SnakeCase should not be serialized given that it's read-only. @@ -76,13 +82,13 @@ public bool ShouldSerializeSnakeCase() /// Gets or Sets Property /// [DataMember(Name = "property", EmitDefaultValue = false)] - public string Property { get; set; } + public Option Property { get; set; } /// /// Gets or Sets Var123Number /// [DataMember(Name = "123Number", EmitDefaultValue = false)] - public int Var123Number { get; private set; } + public Option Var123Number { get; private set; } /// /// Returns false as Var123Number should not be serialized given that it's read-only. @@ -154,12 +160,18 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.VarName.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) + if (this.SnakeCase.IsSet) + { + hashCode = (hashCode * 59) + this.SnakeCase.Value.GetHashCode(); + } + if (this.Property.IsSet && this.Property.Value != null) + { + hashCode = (hashCode * 59) + this.Property.Value.GetHashCode(); + } + if (this.Var123Number.IsSet) { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123Number.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Var123Number.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 3fbd6e83ef29..b4b03a3be7c9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,12 +48,12 @@ protected NotificationtestGetElementsV1ResponseMPayload() /// aObjVariableobject (required). public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List> aObjVariableobject = default(List>)) { - this.PkiNotificationtestID = pkiNotificationtestID; - // to ensure "aObjVariableobject" is required (not null) + // to ensure "aObjVariableobject" (not nullable) is not null if (aObjVariableobject == null) { - throw new ArgumentNullException("aObjVariableobject is a required property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); + throw new ArgumentNullException("aObjVariableobject isn't a nullable property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); } + this.PkiNotificationtestID = pkiNotificationtestID; this.AObjVariableobject = aObjVariableobject; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 6e4a6ef50e7b..c384e5bfa54f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,18 @@ public partial class NullableClass : IEquatable, IValidatableObje /// objectNullableProp. /// objectAndItemsNullableProp. /// objectItemsNullable. - public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateTime? dateProp = default(DateTime?), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) + public NullableClass(Option integerProp = default(Option), Option numberProp = default(Option), Option booleanProp = default(Option), Option stringProp = default(Option), Option dateProp = default(Option), Option datetimeProp = default(Option), Option> arrayNullableProp = default(Option>), Option> arrayAndItemsNullableProp = default(Option>), Option> arrayItemsNullable = default(Option>), Option> objectNullableProp = default(Option>), Option> objectAndItemsNullableProp = default(Option>), Option> objectItemsNullable = default(Option>)) { + // to ensure "arrayItemsNullable" (not nullable) is not null + if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) + { + throw new ArgumentNullException("arrayItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } + // to ensure "objectItemsNullable" (not nullable) is not null + if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) + { + throw new ArgumentNullException("objectItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } this.IntegerProp = integerProp; this.NumberProp = numberProp; this.BooleanProp = booleanProp; @@ -68,74 +79,74 @@ public partial class NullableClass : IEquatable, IValidatableObje /// Gets or Sets IntegerProp /// [DataMember(Name = "integer_prop", EmitDefaultValue = true)] - public int? IntegerProp { get; set; } + public Option IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// [DataMember(Name = "number_prop", EmitDefaultValue = true)] - public decimal? NumberProp { get; set; } + public Option NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] - public bool? BooleanProp { get; set; } + public Option BooleanProp { get; set; } /// /// Gets or Sets StringProp /// [DataMember(Name = "string_prop", EmitDefaultValue = true)] - public string StringProp { get; set; } + public Option StringProp { get; set; } /// /// Gets or Sets DateProp /// [DataMember(Name = "date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? DateProp { get; set; } + public Option DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] - public DateTime? DatetimeProp { get; set; } + public Option DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] - public List ArrayNullableProp { get; set; } + public Option> ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] - public List ArrayAndItemsNullableProp { get; set; } + public Option> ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] - public List ArrayItemsNullable { get; set; } + public Option> ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectNullableProp { get; set; } + public Option> ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectAndItemsNullableProp { get; set; } + public Option> ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] - public Dictionary ObjectItemsNullable { get; set; } + public Option> ObjectItemsNullable { get; set; } /// /// Gets or Sets additional properties @@ -206,53 +217,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.IntegerProp != null) + if (this.IntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.IntegerProp.Value.GetHashCode(); } - if (this.NumberProp != null) + if (this.NumberProp.IsSet) { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberProp.Value.GetHashCode(); } - if (this.BooleanProp != null) + if (this.BooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.BooleanProp.Value.GetHashCode(); } - if (this.StringProp != null) + if (this.StringProp.IsSet && this.StringProp.Value != null) { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.StringProp.Value.GetHashCode(); } - if (this.DateProp != null) + if (this.DateProp.IsSet && this.DateProp.Value != null) { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DateProp.Value.GetHashCode(); } - if (this.DatetimeProp != null) + if (this.DatetimeProp.IsSet && this.DatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DatetimeProp.Value.GetHashCode(); } - if (this.ArrayNullableProp != null) + if (this.ArrayNullableProp.IsSet && this.ArrayNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNullableProp.Value.GetHashCode(); } - if (this.ArrayAndItemsNullableProp != null) + if (this.ArrayAndItemsNullableProp.IsSet && this.ArrayAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.Value.GetHashCode(); } - if (this.ArrayItemsNullable != null) + if (this.ArrayItemsNullable.IsSet && this.ArrayItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayItemsNullable.Value.GetHashCode(); } - if (this.ObjectNullableProp != null) + if (this.ObjectNullableProp.IsSet && this.ObjectNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectNullableProp.Value.GetHashCode(); } - if (this.ObjectAndItemsNullableProp != null) + if (this.ObjectAndItemsNullableProp.IsSet && this.ObjectAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.Value.GetHashCode(); } - if (this.ObjectItemsNullable != null) + if (this.ObjectItemsNullable.IsSet && this.ObjectItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectItemsNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 8a3011986ecd..059dd8c09a0b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// Initializes a new instance of the class. /// /// uuid. - public NullableGuidClass(Guid? uuid = default(Guid?)) + public NullableGuidClass(Option uuid = default(Option)) { this.Uuid = uuid; this.AdditionalProperties = new Dictionary(); @@ -47,7 +48,7 @@ public partial class NullableGuidClass : IEquatable, IValidat /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = true)] - public Guid? Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets additional properties @@ -107,9 +108,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index 3c760b3abddf..255842acfbac 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 7218451d9fb0..eabf9cccc135 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,7 +40,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) + public NumberOnly(Option justNumber = default(Option)) { this.JustNumber = justNumber; this.AdditionalProperties = new Dictionary(); @@ -49,7 +50,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject /// Gets or Sets JustNumber /// [DataMember(Name = "JustNumber", EmitDefaultValue = false)] - public decimal JustNumber { get; set; } + public Option JustNumber { get; set; } /// /// Gets or Sets additional properties @@ -109,7 +110,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); + if (this.JustNumber.IsSet) + { + hashCode = (hashCode * 59) + this.JustNumber.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 76faa5154c86..fe77912ea4be 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -39,8 +40,23 @@ public partial class ObjectWithDeprecatedFields : IEquatableid. /// deprecatedRef. /// bars. - public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List bars = default(List)) + public ObjectWithDeprecatedFields(Option uuid = default(Option), Option id = default(Option), Option deprecatedRef = default(Option), Option> bars = default(Option>)) { + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "deprecatedRef" (not nullable) is not null + if (deprecatedRef.IsSet && deprecatedRef.Value == null) + { + throw new ArgumentNullException("deprecatedRef isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "bars" (not nullable) is not null + if (bars.IsSet && bars.Value == null) + { + throw new ArgumentNullException("bars isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } this.Uuid = uuid; this.Id = id; this.DeprecatedRef = deprecatedRef; @@ -52,28 +68,28 @@ public partial class ObjectWithDeprecatedFields : IEquatable [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] [Obsolete] - public decimal Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets DeprecatedRef /// [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } + public Option DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// [DataMember(Name = "bars", EmitDefaultValue = false)] [Obsolete] - public List Bars { get; set; } + public Option> Bars { get; set; } /// /// Gets or Sets additional properties @@ -136,18 +152,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) + { + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); + } + if (this.Id.IsSet) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) + if (this.DeprecatedRef.IsSet && this.DeprecatedRef.Value != null) { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); + hashCode = (hashCode * 59) + this.DeprecatedRef.Value.GetHashCode(); } - if (this.Bars != null) + if (this.Bars.IsSet && this.Bars.Value != null) { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); + hashCode = (hashCode * 59) + this.Bars.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs index b7278bd5600e..fc7a1298bc33 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs index e9471d3ba022..22df3b5b7b01 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// Order Status [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -74,14 +75,19 @@ public enum StatusEnum /// shipDate. /// Order Status. /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) + public Order(Option id = default(Option), Option petId = default(Option), Option quantity = default(Option), Option shipDate = default(Option), Option status = default(Option), Option complete = default(Option)) { + // to ensure "shipDate" (not nullable) is not null + if (shipDate.IsSet && shipDate.Value == null) + { + throw new ArgumentNullException("shipDate isn't a nullable property for Order and cannot be null"); + } this.Id = id; this.PetId = petId; this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - this.Complete = complete; + this.Complete = complete.IsSet ? complete : new Option(false); this.AdditionalProperties = new Dictionary(); } @@ -89,32 +95,32 @@ public enum StatusEnum /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets PetId /// [DataMember(Name = "petId", EmitDefaultValue = false)] - public long PetId { get; set; } + public Option PetId { get; set; } /// /// Gets or Sets Quantity /// [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int Quantity { get; set; } + public Option Quantity { get; set; } /// /// Gets or Sets ShipDate /// /// 2020-02-02T20:20:20.000222Z [DataMember(Name = "shipDate", EmitDefaultValue = false)] - public DateTime ShipDate { get; set; } + public Option ShipDate { get; set; } /// /// Gets or Sets Complete /// [DataMember(Name = "complete", EmitDefaultValue = true)] - public bool Complete { get; set; } + public Option Complete { get; set; } /// /// Gets or Sets additional properties @@ -179,15 +185,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.PetId.IsSet) + { + hashCode = (hashCode * 59) + this.PetId.Value.GetHashCode(); + } + if (this.Quantity.IsSet) + { + hashCode = (hashCode * 59) + this.Quantity.Value.GetHashCode(); + } + if (this.ShipDate.IsSet && this.ShipDate.Value != null) + { + hashCode = (hashCode * 59) + this.ShipDate.Value.GetHashCode(); + } + if (this.Status.IsSet) + { + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); + } + if (this.Complete.IsSet) { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); + hashCode = (hashCode * 59) + this.Complete.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 47d598a27e6f..f55b2f8c2454 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -38,8 +39,13 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// myNumber. /// myString. /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) + public OuterComposite(Option myNumber = default(Option), Option myString = default(Option), Option myBoolean = default(Option)) { + // to ensure "myString" (not nullable) is not null + if (myString.IsSet && myString.Value == null) + { + throw new ArgumentNullException("myString isn't a nullable property for OuterComposite and cannot be null"); + } this.MyNumber = myNumber; this.MyString = myString; this.MyBoolean = myBoolean; @@ -50,19 +56,19 @@ public partial class OuterComposite : IEquatable, IValidatableOb /// Gets or Sets MyNumber /// [DataMember(Name = "my_number", EmitDefaultValue = false)] - public decimal MyNumber { get; set; } + public Option MyNumber { get; set; } /// /// Gets or Sets MyString /// [DataMember(Name = "my_string", EmitDefaultValue = false)] - public string MyString { get; set; } + public Option MyString { get; set; } /// /// Gets or Sets MyBoolean /// [DataMember(Name = "my_boolean", EmitDefaultValue = true)] - public bool MyBoolean { get; set; } + public Option MyBoolean { get; set; } /// /// Gets or Sets additional properties @@ -124,12 +130,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) + if (this.MyNumber.IsSet) + { + hashCode = (hashCode * 59) + this.MyNumber.Value.GetHashCode(); + } + if (this.MyString.IsSet && this.MyString.Value != null) + { + hashCode = (hashCode * 59) + this.MyString.Value.GetHashCode(); + } + if (this.MyBoolean.IsSet) { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); + hashCode = (hashCode * 59) + this.MyBoolean.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs index 59a9f8e3500a..8d09e4d421bb 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index 40e276b600eb..9217b6a24c9a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 3a70c3716fe2..83a1123c3651 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index 42b36058c031..69a3229977ac 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs index 392e199e137f..5fd8f69243a4 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index 7a7421349903..92b018fe797c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs index e4722f4a5379..bbd65be3d7fd 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -64,7 +65,7 @@ public enum StatusEnum /// /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -82,22 +83,32 @@ protected Pet() /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), Option category = default(Option), string name = default(string), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this.Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this.PhotoUrls = photoUrls; this.Id = id; this.Category = category; + this.Name = name; + this.PhotoUrls = photoUrls; this.Tags = tags; this.Status = status; this.AdditionalProperties = new Dictionary(); @@ -107,13 +118,13 @@ protected Pet() /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category { get; set; } + public Option Category { get; set; } /// /// Gets or Sets Name @@ -132,7 +143,7 @@ protected Pet() /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags { get; set; } + public Option> Tags { get; set; } /// /// Gets or Sets additional properties @@ -197,10 +208,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.Name != null) { @@ -210,11 +224,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 53b52bce70f1..efb16d85c318 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 5e4472118140..fddb8c8500ad 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index 1e12804ecd2a..4b1b8777ee3f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 3a364f98c1e2..3bc8ef02e009 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected QuadrilateralInterface() /// quadrilateralType (required). public QuadrilateralInterface(string quadrilateralType = default(string)) { - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 46ed3b3948c0..d6715914adc5 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Initializes a new instance of the class. /// /// baz. - public ReadOnlyFirst(string baz = default(string)) + public ReadOnlyFirst(Option baz = default(Option)) { + // to ensure "baz" (not nullable) is not null + if (baz.IsSet && baz.Value == null) + { + throw new ArgumentNullException("baz isn't a nullable property for ReadOnlyFirst and cannot be null"); + } this.Baz = baz; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -60,7 +66,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Baz /// [DataMember(Name = "baz", EmitDefaultValue = false)] - public string Baz { get; set; } + public Option Baz { get; set; } /// /// Gets or Sets additional properties @@ -121,13 +127,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Baz != null) + if (this.Baz.IsSet && this.Baz.Value != null) { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); + hashCode = (hashCode * 59) + this.Baz.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index d040204ece33..7fbdfa344d3c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -53,7 +54,7 @@ public enum RequiredNullableEnumIntegerEnum /// Gets or Sets RequiredNullableEnumInteger /// [DataMember(Name = "required_nullable_enum_integer", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerEnum RequiredNullableEnumInteger { get; set; } + public RequiredNullableEnumIntegerEnum? RequiredNullableEnumInteger { get; set; } /// /// Defines RequiredNotnullableEnumInteger /// @@ -97,7 +98,7 @@ public enum NotrequiredNullableEnumIntegerEnum /// Gets or Sets NotrequiredNullableEnumInteger /// [DataMember(Name = "notrequired_nullable_enum_integer", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerEnum? NotrequiredNullableEnumInteger { get; set; } + public Option NotrequiredNullableEnumInteger { get; set; } /// /// Defines NotrequiredNotnullableEnumInteger /// @@ -119,11 +120,10 @@ public enum NotrequiredNotnullableEnumIntegerEnum /// Gets or Sets NotrequiredNotnullableEnumInteger /// [DataMember(Name = "notrequired_notnullable_enum_integer", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerEnum? NotrequiredNotnullableEnumInteger { get; set; } + public Option NotrequiredNotnullableEnumInteger { get; set; } /// /// Defines RequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum RequiredNullableEnumIntegerOnlyEnum { /// @@ -142,7 +142,7 @@ public enum RequiredNullableEnumIntegerOnlyEnum /// Gets or Sets RequiredNullableEnumIntegerOnly /// [DataMember(Name = "required_nullable_enum_integer_only", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnly { get; set; } + public RequiredNullableEnumIntegerOnlyEnum? RequiredNullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumIntegerOnly /// @@ -168,7 +168,6 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum /// /// Defines NotrequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum NotrequiredNullableEnumIntegerOnlyEnum { /// @@ -187,7 +186,7 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNullableEnumIntegerOnly /// [DataMember(Name = "notrequired_nullable_enum_integer_only", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerOnlyEnum? NotrequiredNullableEnumIntegerOnly { get; set; } + public Option NotrequiredNullableEnumIntegerOnly { get; set; } /// /// Defines NotrequiredNotnullableEnumIntegerOnly /// @@ -209,7 +208,7 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNotnullableEnumIntegerOnly /// [DataMember(Name = "notrequired_notnullable_enum_integer_only", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerOnlyEnum? NotrequiredNotnullableEnumIntegerOnly { get; set; } + public Option NotrequiredNotnullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumString /// @@ -331,7 +330,7 @@ public enum RequiredNullableEnumStringEnum /// Gets or Sets RequiredNullableEnumString /// [DataMember(Name = "required_nullable_enum_string", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumStringEnum RequiredNullableEnumString { get; set; } + public RequiredNullableEnumStringEnum? RequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNullableEnumString /// @@ -392,7 +391,7 @@ public enum NotrequiredNullableEnumStringEnum /// Gets or Sets NotrequiredNullableEnumString /// [DataMember(Name = "notrequired_nullable_enum_string", EmitDefaultValue = true)] - public NotrequiredNullableEnumStringEnum? NotrequiredNullableEnumString { get; set; } + public Option NotrequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNotnullableEnumString /// @@ -453,7 +452,7 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNotnullableEnumString /// [DataMember(Name = "notrequired_notnullable_enum_string", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumStringEnum? NotrequiredNotnullableEnumString { get; set; } + public Option NotrequiredNotnullableEnumString { get; set; } /// /// Gets or Sets RequiredNullableOuterEnumDefaultValue @@ -471,13 +470,13 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_nullable_outerEnumDefaultValue", EmitDefaultValue = true)] - public OuterEnumDefaultValue? NotrequiredNullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNullableOuterEnumDefaultValue { get; set; } /// /// Gets or Sets NotrequiredNotnullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_notnullable_outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? NotrequiredNotnullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNotnullableOuterEnumDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -533,95 +532,100 @@ protected RequiredClass() /// requiredNotnullableArrayOfString (required). /// notrequiredNullableArrayOfString. /// notrequiredNotnullableArrayOfString. - public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), int? notRequiredNullableIntegerProp = default(int?), int notRequiredNotnullableintegerProp = default(int), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), string notrequiredNullableStringProp = default(string), string notrequiredNotnullableStringProp = default(string), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), bool? notrequiredNullableBooleanProp = default(bool?), bool notrequiredNotnullableBooleanProp = default(bool), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), DateTime? notRequiredNullableDateProp = default(DateTime?), DateTime notRequiredNotnullableDateProp = default(DateTime), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), DateTime? notrequiredNullableDatetimeProp = default(DateTime?), DateTime notrequiredNotnullableDatetimeProp = default(DateTime), RequiredNullableEnumIntegerEnum requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), NotrequiredNullableEnumIntegerEnum? notrequiredNullableEnumInteger = default(NotrequiredNullableEnumIntegerEnum?), NotrequiredNotnullableEnumIntegerEnum? notrequiredNotnullableEnumInteger = default(NotrequiredNotnullableEnumIntegerEnum?), RequiredNullableEnumIntegerOnlyEnum requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), NotrequiredNullableEnumIntegerOnlyEnum? notrequiredNullableEnumIntegerOnly = default(NotrequiredNullableEnumIntegerOnlyEnum?), NotrequiredNotnullableEnumIntegerOnlyEnum? notrequiredNotnullableEnumIntegerOnly = default(NotrequiredNotnullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum requiredNullableEnumString = default(RequiredNullableEnumStringEnum), NotrequiredNullableEnumStringEnum? notrequiredNullableEnumString = default(NotrequiredNullableEnumStringEnum?), NotrequiredNotnullableEnumStringEnum? notrequiredNotnullableEnumString = default(NotrequiredNotnullableEnumStringEnum?), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue? notrequiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue? notrequiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Guid? notrequiredNullableUuid = default(Guid?), Guid notrequiredNotnullableUuid = default(Guid), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), List notrequiredNullableArrayOfString = default(List), List notrequiredNotnullableArrayOfString = default(List)) + public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), Option notRequiredNullableIntegerProp = default(Option), Option notRequiredNotnullableintegerProp = default(Option), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), Option notrequiredNullableStringProp = default(Option), Option notrequiredNotnullableStringProp = default(Option), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), Option notrequiredNullableBooleanProp = default(Option), Option notrequiredNotnullableBooleanProp = default(Option), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), Option notRequiredNullableDateProp = default(Option), Option notRequiredNotnullableDateProp = default(Option), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), Option notrequiredNullableDatetimeProp = default(Option), Option notrequiredNotnullableDatetimeProp = default(Option), RequiredNullableEnumIntegerEnum? requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum?), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), Option notrequiredNullableEnumInteger = default(Option), Option notrequiredNotnullableEnumInteger = default(Option), RequiredNullableEnumIntegerOnlyEnum? requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), Option notrequiredNullableEnumIntegerOnly = default(Option), Option notrequiredNotnullableEnumIntegerOnly = default(Option), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum? requiredNullableEnumString = default(RequiredNullableEnumStringEnum?), Option notrequiredNullableEnumString = default(Option), Option notrequiredNotnullableEnumString = default(Option), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), Option notrequiredNullableOuterEnumDefaultValue = default(Option), Option notrequiredNotnullableOuterEnumDefaultValue = default(Option), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Option notrequiredNullableUuid = default(Option), Option notrequiredNotnullableUuid = default(Option), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), Option> notrequiredNullableArrayOfString = default(Option>), Option> notrequiredNotnullableArrayOfString = default(Option>)) { - // to ensure "requiredNullableIntegerProp" is required (not null) - if (requiredNullableIntegerProp == null) + // to ensure "requiredNotnullableStringProp" (not nullable) is not null + if (requiredNotnullableStringProp == null) { - throw new ArgumentNullException("requiredNullableIntegerProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableIntegerProp = requiredNullableIntegerProp; - this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; - // to ensure "requiredNullableStringProp" is required (not null) - if (requiredNullableStringProp == null) + // to ensure "notrequiredNotnullableStringProp" (not nullable) is not null + if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) { - throw new ArgumentNullException("requiredNullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableStringProp = requiredNullableStringProp; - // to ensure "requiredNotnullableStringProp" is required (not null) - if (requiredNotnullableStringProp == null) + // to ensure "requiredNotNullableDateProp" (not nullable) is not null + if (requiredNotNullableDateProp == null) { - throw new ArgumentNullException("requiredNotnullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotNullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableStringProp = requiredNotnullableStringProp; - // to ensure "requiredNullableBooleanProp" is required (not null) - if (requiredNullableBooleanProp == null) + // to ensure "notRequiredNotnullableDateProp" (not nullable) is not null + if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) { - throw new ArgumentNullException("requiredNullableBooleanProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notRequiredNotnullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableBooleanProp = requiredNullableBooleanProp; - this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; - // to ensure "requiredNullableDateProp" is required (not null) - if (requiredNullableDateProp == null) + // to ensure "requiredNotnullableDatetimeProp" (not nullable) is not null + if (requiredNotnullableDatetimeProp == null) { - throw new ArgumentNullException("requiredNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDateProp = requiredNullableDateProp; - this.RequiredNotNullableDateProp = requiredNotNullableDateProp; - this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; - // to ensure "requiredNullableDatetimeProp" is required (not null) - if (requiredNullableDatetimeProp == null) + // to ensure "notrequiredNotnullableDatetimeProp" (not nullable) is not null + if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) { - throw new ArgumentNullException("requiredNullableDatetimeProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; - this.RequiredNullableEnumInteger = requiredNullableEnumInteger; - this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; - this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; - this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; - this.RequiredNotnullableEnumString = requiredNotnullableEnumString; - this.RequiredNullableEnumString = requiredNullableEnumString; - this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; - this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; - // to ensure "requiredNullableUuid" is required (not null) - if (requiredNullableUuid == null) + // to ensure "requiredNotnullableUuid" (not nullable) is not null + if (requiredNotnullableUuid == null) { - throw new ArgumentNullException("requiredNullableUuid is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableUuid = requiredNullableUuid; - this.RequiredNotnullableUuid = requiredNotnullableUuid; - // to ensure "requiredNullableArrayOfString" is required (not null) - if (requiredNullableArrayOfString == null) + // to ensure "notrequiredNotnullableUuid" (not nullable) is not null + if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) { - throw new ArgumentNullException("requiredNullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableArrayOfString = requiredNullableArrayOfString; - // to ensure "requiredNotnullableArrayOfString" is required (not null) + // to ensure "requiredNotnullableArrayOfString" (not nullable) is not null if (requiredNotnullableArrayOfString == null) { - throw new ArgumentNullException("requiredNotnullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; + // to ensure "notrequiredNotnullableArrayOfString" (not nullable) is not null + if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) + { + throw new ArgumentNullException("notrequiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); + } + this.RequiredNullableIntegerProp = requiredNullableIntegerProp; + this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; this.NotRequiredNullableIntegerProp = notRequiredNullableIntegerProp; this.NotRequiredNotnullableintegerProp = notRequiredNotnullableintegerProp; + this.RequiredNullableStringProp = requiredNullableStringProp; + this.RequiredNotnullableStringProp = requiredNotnullableStringProp; this.NotrequiredNullableStringProp = notrequiredNullableStringProp; this.NotrequiredNotnullableStringProp = notrequiredNotnullableStringProp; + this.RequiredNullableBooleanProp = requiredNullableBooleanProp; + this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; this.NotrequiredNullableBooleanProp = notrequiredNullableBooleanProp; this.NotrequiredNotnullableBooleanProp = notrequiredNotnullableBooleanProp; + this.RequiredNullableDateProp = requiredNullableDateProp; + this.RequiredNotNullableDateProp = requiredNotNullableDateProp; this.NotRequiredNullableDateProp = notRequiredNullableDateProp; this.NotRequiredNotnullableDateProp = notRequiredNotnullableDateProp; + this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; + this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; this.NotrequiredNullableDatetimeProp = notrequiredNullableDatetimeProp; this.NotrequiredNotnullableDatetimeProp = notrequiredNotnullableDatetimeProp; + this.RequiredNullableEnumInteger = requiredNullableEnumInteger; + this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; this.NotrequiredNullableEnumInteger = notrequiredNullableEnumInteger; this.NotrequiredNotnullableEnumInteger = notrequiredNotnullableEnumInteger; + this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; + this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; this.NotrequiredNullableEnumIntegerOnly = notrequiredNullableEnumIntegerOnly; this.NotrequiredNotnullableEnumIntegerOnly = notrequiredNotnullableEnumIntegerOnly; + this.RequiredNotnullableEnumString = requiredNotnullableEnumString; + this.RequiredNullableEnumString = requiredNullableEnumString; this.NotrequiredNullableEnumString = notrequiredNullableEnumString; this.NotrequiredNotnullableEnumString = notrequiredNotnullableEnumString; + this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; + this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; this.NotrequiredNullableOuterEnumDefaultValue = notrequiredNullableOuterEnumDefaultValue; this.NotrequiredNotnullableOuterEnumDefaultValue = notrequiredNotnullableOuterEnumDefaultValue; + this.RequiredNullableUuid = requiredNullableUuid; + this.RequiredNotnullableUuid = requiredNotnullableUuid; this.NotrequiredNullableUuid = notrequiredNullableUuid; this.NotrequiredNotnullableUuid = notrequiredNotnullableUuid; + this.RequiredNullableArrayOfString = requiredNullableArrayOfString; + this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; this.NotrequiredNullableArrayOfString = notrequiredNullableArrayOfString; this.NotrequiredNotnullableArrayOfString = notrequiredNotnullableArrayOfString; this.AdditionalProperties = new Dictionary(); @@ -643,13 +647,13 @@ protected RequiredClass() /// Gets or Sets NotRequiredNullableIntegerProp /// [DataMember(Name = "not_required_nullable_integer_prop", EmitDefaultValue = true)] - public int? NotRequiredNullableIntegerProp { get; set; } + public Option NotRequiredNullableIntegerProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableintegerProp /// [DataMember(Name = "not_required_notnullableinteger_prop", EmitDefaultValue = false)] - public int NotRequiredNotnullableintegerProp { get; set; } + public Option NotRequiredNotnullableintegerProp { get; set; } /// /// Gets or Sets RequiredNullableStringProp @@ -667,13 +671,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableStringProp /// [DataMember(Name = "notrequired_nullable_string_prop", EmitDefaultValue = true)] - public string NotrequiredNullableStringProp { get; set; } + public Option NotrequiredNullableStringProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableStringProp /// [DataMember(Name = "notrequired_notnullable_string_prop", EmitDefaultValue = false)] - public string NotrequiredNotnullableStringProp { get; set; } + public Option NotrequiredNotnullableStringProp { get; set; } /// /// Gets or Sets RequiredNullableBooleanProp @@ -691,13 +695,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableBooleanProp /// [DataMember(Name = "notrequired_nullable_boolean_prop", EmitDefaultValue = true)] - public bool? NotrequiredNullableBooleanProp { get; set; } + public Option NotrequiredNullableBooleanProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableBooleanProp /// [DataMember(Name = "notrequired_notnullable_boolean_prop", EmitDefaultValue = true)] - public bool NotrequiredNotnullableBooleanProp { get; set; } + public Option NotrequiredNotnullableBooleanProp { get; set; } /// /// Gets or Sets RequiredNullableDateProp @@ -718,14 +722,14 @@ protected RequiredClass() /// [DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? NotRequiredNullableDateProp { get; set; } + public Option NotRequiredNullableDateProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableDateProp /// [DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime NotRequiredNotnullableDateProp { get; set; } + public Option NotRequiredNotnullableDateProp { get; set; } /// /// Gets or Sets RequiredNotnullableDatetimeProp @@ -743,13 +747,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableDatetimeProp /// [DataMember(Name = "notrequired_nullable_datetime_prop", EmitDefaultValue = true)] - public DateTime? NotrequiredNullableDatetimeProp { get; set; } + public Option NotrequiredNullableDatetimeProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableDatetimeProp /// [DataMember(Name = "notrequired_notnullable_datetime_prop", EmitDefaultValue = false)] - public DateTime NotrequiredNotnullableDatetimeProp { get; set; } + public Option NotrequiredNotnullableDatetimeProp { get; set; } /// /// Gets or Sets RequiredNullableUuid @@ -770,14 +774,14 @@ protected RequiredClass() /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_nullable_uuid", EmitDefaultValue = true)] - public Guid? NotrequiredNullableUuid { get; set; } + public Option NotrequiredNullableUuid { get; set; } /// /// Gets or Sets NotrequiredNotnullableUuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_notnullable_uuid", EmitDefaultValue = false)] - public Guid NotrequiredNotnullableUuid { get; set; } + public Option NotrequiredNotnullableUuid { get; set; } /// /// Gets or Sets RequiredNullableArrayOfString @@ -795,13 +799,13 @@ protected RequiredClass() /// Gets or Sets NotrequiredNullableArrayOfString /// [DataMember(Name = "notrequired_nullable_array_of_string", EmitDefaultValue = true)] - public List NotrequiredNullableArrayOfString { get; set; } + public Option> NotrequiredNullableArrayOfString { get; set; } /// /// Gets or Sets NotrequiredNotnullableArrayOfString /// [DataMember(Name = "notrequired_notnullable_array_of_string", EmitDefaultValue = false)] - public List NotrequiredNotnullableArrayOfString { get; set; } + public Option> NotrequiredNotnullableArrayOfString { get; set; } /// /// Gets or Sets additional properties @@ -904,16 +908,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RequiredNullableIntegerProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); + if (this.NotRequiredNullableIntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); - if (this.NotRequiredNullableIntegerProp != null) + if (this.NotRequiredNotnullableintegerProp.IsSet) { - hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.GetHashCode(); if (this.RequiredNullableStringProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableStringProp.GetHashCode(); @@ -922,24 +926,24 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableStringProp.GetHashCode(); } - if (this.NotrequiredNullableStringProp != null) + if (this.NotrequiredNullableStringProp.IsSet && this.NotrequiredNullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableStringProp != null) + if (this.NotrequiredNotnullableStringProp.IsSet && this.NotrequiredNotnullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.Value.GetHashCode(); } - if (this.RequiredNullableBooleanProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); + if (this.NotrequiredNullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); - if (this.NotrequiredNullableBooleanProp != null) + if (this.NotrequiredNotnullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.GetHashCode(); if (this.RequiredNullableDateProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableDateProp.GetHashCode(); @@ -948,13 +952,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotNullableDateProp.GetHashCode(); } - if (this.NotRequiredNullableDateProp != null) + if (this.NotRequiredNullableDateProp.IsSet && this.NotRequiredNullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.Value.GetHashCode(); } - if (this.NotRequiredNotnullableDateProp != null) + if (this.NotRequiredNotnullableDateProp.IsSet && this.NotRequiredNotnullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.Value.GetHashCode(); } if (this.RequiredNotnullableDatetimeProp != null) { @@ -964,30 +968,54 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNullableDatetimeProp.GetHashCode(); } - if (this.NotrequiredNullableDatetimeProp != null) + if (this.NotrequiredNullableDatetimeProp.IsSet && this.NotrequiredNullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableDatetimeProp != null) + if (this.NotrequiredNotnullableDatetimeProp.IsSet && this.NotrequiredNotnullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.RequiredNullableEnumInteger.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.GetHashCode(); + if (this.NotrequiredNullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableEnumIntegerOnly.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.GetHashCode(); + if (this.NotrequiredNullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNotnullableEnumString.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.GetHashCode(); + if (this.NotrequiredNullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableOuterEnumDefaultValue.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.GetHashCode(); + if (this.NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.Value.GetHashCode(); + } if (this.RequiredNullableUuid != null) { hashCode = (hashCode * 59) + this.RequiredNullableUuid.GetHashCode(); @@ -996,13 +1024,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableUuid.GetHashCode(); } - if (this.NotrequiredNullableUuid != null) + if (this.NotrequiredNullableUuid.IsSet && this.NotrequiredNullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.Value.GetHashCode(); } - if (this.NotrequiredNotnullableUuid != null) + if (this.NotrequiredNotnullableUuid.IsSet && this.NotrequiredNotnullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.Value.GetHashCode(); } if (this.RequiredNullableArrayOfString != null) { @@ -1012,13 +1040,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableArrayOfString.GetHashCode(); } - if (this.NotrequiredNullableArrayOfString != null) + if (this.NotrequiredNullableArrayOfString.IsSet && this.NotrequiredNullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.Value.GetHashCode(); } - if (this.NotrequiredNotnullableArrayOfString != null) + if (this.NotrequiredNotnullableArrayOfString.IsSet && this.NotrequiredNotnullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs index fec56c44fa82..077005d6cc27 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,7 +37,7 @@ public partial class Return : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// varReturn. - public Return(int varReturn = default(int)) + public Return(Option varReturn = default(Option)) { this.VarReturn = varReturn; this.AdditionalProperties = new Dictionary(); @@ -46,7 +47,7 @@ public partial class Return : IEquatable, IValidatableObject /// Gets or Sets VarReturn /// [DataMember(Name = "return", EmitDefaultValue = false)] - public int VarReturn { get; set; } + public Option VarReturn { get; set; } /// /// Gets or Sets additional properties @@ -106,7 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.VarReturn.GetHashCode(); + if (this.VarReturn.IsSet) + { + hashCode = (hashCode * 59) + this.VarReturn.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 4523238ad385..53d7053be15e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,18 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// /// roleUuid. /// role. - public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole)) + public RolesReportsHash(Option roleUuid = default(Option), Option role = default(Option)) { + // to ensure "roleUuid" (not nullable) is not null + if (roleUuid.IsSet && roleUuid.Value == null) + { + throw new ArgumentNullException("roleUuid isn't a nullable property for RolesReportsHash and cannot be null"); + } + // to ensure "role" (not nullable) is not null + if (role.IsSet && role.Value == null) + { + throw new ArgumentNullException("role isn't a nullable property for RolesReportsHash and cannot be null"); + } this.RoleUuid = roleUuid; this.Role = role; this.AdditionalProperties = new Dictionary(); @@ -48,13 +59,13 @@ public partial class RolesReportsHash : IEquatable, IValidatab /// Gets or Sets RoleUuid /// [DataMember(Name = "role_uuid", EmitDefaultValue = false)] - public Guid RoleUuid { get; set; } + public Option RoleUuid { get; set; } /// /// Gets or Sets Role /// [DataMember(Name = "role", EmitDefaultValue = false)] - public RolesReportsHashRole Role { get; set; } + public Option Role { get; set; } /// /// Gets or Sets additional properties @@ -115,13 +126,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RoleUuid != null) + if (this.RoleUuid.IsSet && this.RoleUuid.Value != null) { - hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.RoleUuid.Value.GetHashCode(); } - if (this.Role != null) + if (this.Role.IsSet && this.Role.Value != null) { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); + hashCode = (hashCode * 59) + this.Role.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index ef21c6091f38..177eddaba12d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Initializes a new instance of the class. /// /// name. - public RolesReportsHashRole(string name = default(string)) + public RolesReportsHashRole(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for RolesReportsHashRole and cannot be null"); + } this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class RolesReportsHashRole : IEquatable, IV /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 1510bd5c512d..a3ba20fa6c48 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected ScaleneTriangle() /// triangleType (required). public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ScaleneTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for ScaleneTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 12e4af151482..f7f7c7dcc627 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 9f8b4dd35b35..52027034071a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected ShapeInterface() /// shapeType (required). public ShapeInterface(string shapeType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 6d8279a8beda..b5fc4a013b0a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 266dcfee794c..1d5698e4b2ba 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,17 +48,17 @@ protected SimpleQuadrilateral() /// quadrilateralType (required). public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 33320b76cf1f..8778d6b6381c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// /// specialPropertyName. /// varSpecialModelName. - public SpecialModelName(long specialPropertyName = default(long), string varSpecialModelName = default(string)) + public SpecialModelName(Option specialPropertyName = default(Option), Option varSpecialModelName = default(Option)) { + // to ensure "varSpecialModelName" (not nullable) is not null + if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) + { + throw new ArgumentNullException("varSpecialModelName isn't a nullable property for SpecialModelName and cannot be null"); + } this.SpecialPropertyName = specialPropertyName; this.VarSpecialModelName = varSpecialModelName; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class SpecialModelName : IEquatable, IValidatab /// Gets or Sets SpecialPropertyName /// [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] - public long SpecialPropertyName { get; set; } + public Option SpecialPropertyName { get; set; } /// /// Gets or Sets VarSpecialModelName /// [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string VarSpecialModelName { get; set; } + public Option VarSpecialModelName { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.VarSpecialModelName != null) + if (this.SpecialPropertyName.IsSet) + { + hashCode = (hashCode * 59) + this.SpecialPropertyName.Value.GetHashCode(); + } + if (this.VarSpecialModelName.IsSet && this.VarSpecialModelName.Value != null) { - hashCode = (hashCode * 59) + this.VarSpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.VarSpecialModelName.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 58eb2c605d15..74c5d5104142 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -37,8 +38,13 @@ public partial class Tag : IEquatable, IValidatableObject /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this.Id = id; this.Name = name; this.AdditionalProperties = new Dictionary(); @@ -48,13 +54,13 @@ public partial class Tag : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets additional properties @@ -115,10 +121,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index f7782b6fd5a7..72bd1b369aeb 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordList : IEquatable class. /// /// value. - public TestCollectionEndingWithWordList(string value = default(string)) + public TestCollectionEndingWithWordList(Option value = default(Option)) { + // to ensure "value" (not nullable) is not null + if (value.IsSet && value.Value == null) + { + throw new ArgumentNullException("value isn't a nullable property for TestCollectionEndingWithWordList and cannot be null"); + } this.Value = value; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestCollectionEndingWithWordList : IEquatable [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } + public Option Value { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Value != null) + if (this.Value.IsSet && this.Value.Value != null) { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 8498a5eca78f..6e00826d7870 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable class. /// /// testCollectionEndingWithWordList. - public TestCollectionEndingWithWordListObject(List testCollectionEndingWithWordList = default(List)) + public TestCollectionEndingWithWordListObject(Option> testCollectionEndingWithWordList = default(Option>)) { + // to ensure "testCollectionEndingWithWordList" (not nullable) is not null + if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) + { + throw new ArgumentNullException("testCollectionEndingWithWordList isn't a nullable property for TestCollectionEndingWithWordListObject and cannot be null"); + } this.TestCollectionEndingWithWordList = testCollectionEndingWithWordList; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable [DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)] - public List TestCollectionEndingWithWordList { get; set; } + public Option> TestCollectionEndingWithWordList { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.TestCollectionEndingWithWordList != null) + if (this.TestCollectionEndingWithWordList.IsSet && this.TestCollectionEndingWithWordList.Value != null) { - hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.GetHashCode(); + hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 457b88ac9c74..aca5c0652ab6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -36,8 +37,13 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Initializes a new instance of the class. /// /// someProperty. - public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) + public TestInlineFreeformAdditionalPropertiesRequest(Option someProperty = default(Option)) { + // to ensure "someProperty" (not nullable) is not null + if (someProperty.IsSet && someProperty.Value == null) + { + throw new ArgumentNullException("someProperty isn't a nullable property for TestInlineFreeformAdditionalPropertiesRequest and cannot be null"); + } this.SomeProperty = someProperty; this.AdditionalProperties = new Dictionary(); } @@ -46,7 +52,7 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Gets or Sets SomeProperty /// [DataMember(Name = "someProperty", EmitDefaultValue = false)] - public string SomeProperty { get; set; } + public Option SomeProperty { get; set; } /// /// Gets or Sets additional properties @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SomeProperty != null) + if (this.SomeProperty.IsSet && this.SomeProperty.Value != null) { - hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.SomeProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 37729a438160..4874223e8554 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; using System.Reflection; namespace Org.OpenAPITools.Model diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index 34fa15105dca..fc45b2b8d370 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,10 +47,10 @@ protected TriangleInterface() /// triangleType (required). public TriangleInterface(string triangleType = default(string)) { - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; this.AdditionalProperties = new Dictionary(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs index b7911507a704..4c20f415c024 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -47,8 +48,43 @@ public partial class User : IEquatable, IValidatableObject /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) + public User(Option id = default(Option), Option username = default(Option), Option firstName = default(Option), Option lastName = default(Option), Option email = default(Option), Option password = default(Option), Option phone = default(Option), Option userStatus = default(Option), Option objectWithNoDeclaredProps = default(Option), Option objectWithNoDeclaredPropsNullable = default(Option), Option anyTypeProp = default(Option), Option anyTypePropNullable = default(Option)) { + // to ensure "username" (not nullable) is not null + if (username.IsSet && username.Value == null) + { + throw new ArgumentNullException("username isn't a nullable property for User and cannot be null"); + } + // to ensure "firstName" (not nullable) is not null + if (firstName.IsSet && firstName.Value == null) + { + throw new ArgumentNullException("firstName isn't a nullable property for User and cannot be null"); + } + // to ensure "lastName" (not nullable) is not null + if (lastName.IsSet && lastName.Value == null) + { + throw new ArgumentNullException("lastName isn't a nullable property for User and cannot be null"); + } + // to ensure "email" (not nullable) is not null + if (email.IsSet && email.Value == null) + { + throw new ArgumentNullException("email isn't a nullable property for User and cannot be null"); + } + // to ensure "password" (not nullable) is not null + if (password.IsSet && password.Value == null) + { + throw new ArgumentNullException("password isn't a nullable property for User and cannot be null"); + } + // to ensure "phone" (not nullable) is not null + if (phone.IsSet && phone.Value == null) + { + throw new ArgumentNullException("phone isn't a nullable property for User and cannot be null"); + } + // to ensure "objectWithNoDeclaredProps" (not nullable) is not null + if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) + { + throw new ArgumentNullException("objectWithNoDeclaredProps isn't a nullable property for User and cannot be null"); + } this.Id = id; this.Username = username; this.FirstName = firstName; @@ -68,78 +104,78 @@ public partial class User : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Username /// [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } + public Option Username { get; set; } /// /// Gets or Sets FirstName /// [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } + public Option FirstName { get; set; } /// /// Gets or Sets LastName /// [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } + public Option LastName { get; set; } /// /// Gets or Sets Email /// [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } + public Option Email { get; set; } /// /// Gets or Sets Password /// [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } + public Option Password { get; set; } /// /// Gets or Sets Phone /// [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } + public Option Phone { get; set; } /// /// User Status /// /// User Status [DataMember(Name = "userStatus", EmitDefaultValue = false)] - public int UserStatus { get; set; } + public Option UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] - public Object ObjectWithNoDeclaredProps { get; set; } + public Option ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] - public Object ObjectWithNoDeclaredPropsNullable { get; set; } + public Option ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] - public Object AnyTypeProp { get; set; } + public Option AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] - public Object AnyTypePropNullable { get; set; } + public Option AnyTypePropNullable { get; set; } /// /// Gets or Sets additional properties @@ -210,47 +246,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Username.IsSet && this.Username.Value != null) + { + hashCode = (hashCode * 59) + this.Username.Value.GetHashCode(); + } + if (this.FirstName.IsSet && this.FirstName.Value != null) { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); + hashCode = (hashCode * 59) + this.FirstName.Value.GetHashCode(); } - if (this.FirstName != null) + if (this.LastName.IsSet && this.LastName.Value != null) { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.LastName.Value.GetHashCode(); } - if (this.LastName != null) + if (this.Email.IsSet && this.Email.Value != null) { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + hashCode = (hashCode * 59) + this.Email.Value.GetHashCode(); } - if (this.Email != null) + if (this.Password.IsSet && this.Password.Value != null) { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); + hashCode = (hashCode * 59) + this.Password.Value.GetHashCode(); } - if (this.Password != null) + if (this.Phone.IsSet && this.Phone.Value != null) { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); + hashCode = (hashCode * 59) + this.Phone.Value.GetHashCode(); } - if (this.Phone != null) + if (this.UserStatus.IsSet) { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); + hashCode = (hashCode * 59) + this.UserStatus.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) + if (this.ObjectWithNoDeclaredProps.IsSet && this.ObjectWithNoDeclaredProps.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.Value.GetHashCode(); } - if (this.ObjectWithNoDeclaredPropsNullable != null) + if (this.ObjectWithNoDeclaredPropsNullable.IsSet && this.ObjectWithNoDeclaredPropsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.Value.GetHashCode(); } - if (this.AnyTypeProp != null) + if (this.AnyTypeProp.IsSet && this.AnyTypeProp.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypeProp.Value.GetHashCode(); } - if (this.AnyTypePropNullable != null) + if (this.AnyTypePropNullable.IsSet && this.AnyTypePropNullable.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypePropNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 50119ed39e76..2038fc78e8db 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -46,16 +47,16 @@ protected Whale() /// hasBaleen. /// hasTeeth. /// className (required). - public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) + public Whale(Option hasBaleen = default(Option), Option hasTeeth = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Whale and cannot be null"); } - this.ClassName = className; this.HasBaleen = hasBaleen; this.HasTeeth = hasTeeth; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -63,13 +64,13 @@ protected Whale() /// Gets or Sets HasBaleen /// [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] - public bool HasBaleen { get; set; } + public Option HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] - public bool HasTeeth { get; set; } + public Option HasTeeth { get; set; } /// /// Gets or Sets ClassName @@ -137,8 +138,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); + if (this.HasBaleen.IsSet) + { + hashCode = (hashCode * 59) + this.HasBaleen.Value.GetHashCode(); + } + if (this.HasTeeth.IsSet) + { + hashCode = (hashCode * 59) + this.HasTeeth.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 314fae589fc5..3bb224da1e43 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -62,7 +63,7 @@ public enum TypeEnum /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } + public Option Type { get; set; } /// /// Initializes a new instance of the class. /// @@ -76,15 +77,15 @@ protected Zebra() /// /// type. /// className (required). - public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) + public Zebra(Option type = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Zebra and cannot be null"); } - this.ClassName = className; this.Type = type; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -153,7 +154,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Type.IsSet) + { + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs index b4ff8d51adb7..15c623dc8d8f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 617dcd5f7a09..daccbc984737 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -23,6 +23,7 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Model { @@ -56,12 +57,12 @@ public enum ZeroBasedEnumEnum /// Gets or Sets ZeroBasedEnum /// [DataMember(Name = "ZeroBasedEnum", EmitDefaultValue = false)] - public ZeroBasedEnumEnum? ZeroBasedEnum { get; set; } + public Option ZeroBasedEnum { get; set; } /// /// Initializes a new instance of the class. /// /// zeroBasedEnum. - public ZeroBasedEnumClass(ZeroBasedEnumEnum? zeroBasedEnum = default(ZeroBasedEnumEnum?)) + public ZeroBasedEnumClass(Option zeroBasedEnum = default(Option)) { this.ZeroBasedEnum = zeroBasedEnum; this.AdditionalProperties = new Dictionary(); @@ -125,7 +126,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.ZeroBasedEnum.GetHashCode(); + if (this.ZeroBasedEnum.IsSet) + { + hashCode = (hashCode * 59) + this.ZeroBasedEnum.Value.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/.openapi-generator/FILES index a465aeaf1e0d..d9d908029b9f 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/.openapi-generator/FILES @@ -128,6 +128,7 @@ src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/ISynchronousClient.cs src/Org.OpenAPITools/Client/Multimap.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/Option.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/UnexpectedResponseException.cs src/Org.OpenAPITools/Client/WebRequestPathBuilder.cs diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FakeApi.md index 06309f31e8a5..b926dc908fd9 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool? body = null) +> bool FakeOuterBooleanSerialize (bool body = null) @@ -134,7 +134,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = true; // bool? | Input boolean as post body (optional) + var body = true; // bool | Input boolean as post body (optional) try { @@ -175,7 +175,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **bool?** | Input boolean as post body | [optional] | +| **body** | **bool** | Input boolean as post body | [optional] | ### Return type @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal? body = null) +> decimal FakeOuterNumberSerialize (decimal body = null) @@ -312,7 +312,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14D; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal | Input number as post body (optional) try { @@ -353,7 +353,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **decimal?** | Input number as post body | [optional] | +| **body** | **decimal** | Input number as post body | [optional] | ### Return type @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1098,14 +1098,14 @@ namespace Example var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789L; // long? | None (optional) - var varFloat = 3.4F; // float? | None (optional) + var integer = 56; // int | None (optional) + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var varFloat = 3.4F; // float | None (optional) var varString = "varString_example"; // string | None (optional) var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) @@ -1150,14 +1150,14 @@ catch (ApiException e) | **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int?** | None | [optional] | -| **int32** | **int?** | None | [optional] | -| **int64** | **long?** | None | [optional] | -| **varFloat** | **float?** | None | [optional] | +| **integer** | **int** | None | [optional] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **varFloat** | **float** | None | [optional] | | **varString** | **string** | None | [optional] | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | -| **date** | **DateTime?** | None | [optional] | -| **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **date** | **DateTime** | None | [optional] | +| **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | | **password** | **string** | None | [optional] | | **callback** | **string** | None | [optional] | @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -1212,8 +1212,8 @@ namespace Example var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -1258,8 +1258,8 @@ catch (ApiException e) | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | -| **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | | **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) Fake endpoint to test group parameters (optional) @@ -1316,9 +1316,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789L; // long? | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) + var booleanGroup = true; // bool | Boolean in group parameters (optional) + var int64Group = 789L; // long | Integer in group parameters (optional) try { @@ -1360,9 +1360,9 @@ catch (ApiException e) | **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | -| **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | -| **int64Group** | **long?** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | +| **booleanGroup** | **bool** | Boolean in group parameters | [optional] | +| **int64Group** | **long** | Integer in group parameters | [optional] | ### Return type diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/RequiredClass.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/RequiredClass.md index 07b6f018f6c1..3400459756d2 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/RequiredClass.md +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/RequiredClass.md @@ -33,8 +33,8 @@ Name | Type | Description | Notes **NotrequiredNullableEnumIntegerOnly** | **int?** | | [optional] **NotrequiredNotnullableEnumIntegerOnly** | **int** | | [optional] **RequiredNotnullableEnumString** | **string** | | -**RequiredNullableEnumString** | **string** | | -**NotrequiredNullableEnumString** | **string** | | [optional] +**RequiredNullableEnumString** | **string?** | | +**NotrequiredNullableEnumString** | **string?** | | [optional] **NotrequiredNotnullableEnumString** | **string** | | [optional] **RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | **RequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 285d93133600..1c973aecf3fb 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -245,7 +245,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -308,7 +308,7 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs index 105e25933a08..1faaeffad0f8 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -504,7 +504,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -565,7 +565,7 @@ public Org.OpenAPITools.Client.ApiResponse GetCountryWithHttpInfo(string { // verify the required parameter 'country' is set if (country == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'country' when calling DefaultApi->GetCountry"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'country' when calling DefaultApi->GetCountry"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index 59ce0a9e7b12..c7a37021ba2b 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -51,7 +51,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?)); + bool FakeOuterBooleanSerialize(Option body = default(Option)); /// /// @@ -62,7 +62,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option)); /// /// /// @@ -72,7 +72,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)); + OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option)); /// /// @@ -83,7 +83,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option)); /// /// /// @@ -93,7 +93,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)); + decimal FakeOuterNumberSerialize(Option body = default(Option)); /// /// @@ -104,7 +104,7 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option)); /// /// /// @@ -115,7 +115,7 @@ public interface IFakeApiSync : IApiAccessor /// Required UUID String /// Input string as post body (optional) /// string - string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string)); + string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option)); /// /// @@ -127,7 +127,7 @@ public interface IFakeApiSync : IApiAccessor /// Required UUID String /// Input string as post body (optional) /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string)); + ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option)); /// /// Array of Enums /// @@ -278,7 +278,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// None (optional) /// - void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -302,7 +302,7 @@ public interface IFakeApiSync : IApiAccessor /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)); /// /// To test enum parameters /// @@ -319,7 +319,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)); /// /// To test enum parameters @@ -337,7 +337,7 @@ public interface IFakeApiSync : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)); /// /// Fake endpoint to test group parameters (optional) /// @@ -352,7 +352,7 @@ public interface IFakeApiSync : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)); /// /// Fake endpoint to test group parameters (optional) @@ -368,7 +368,7 @@ public interface IFakeApiSync : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)); /// /// test inline additionalProperties /// @@ -442,7 +442,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// (optional) /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string)); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)); /// /// @@ -461,7 +461,7 @@ public interface IFakeApiSync : IApiAccessor /// (optional) /// (optional) /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string)); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)); /// /// test referenced string map /// @@ -520,7 +520,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -532,7 +532,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -543,7 +543,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -555,7 +555,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -566,7 +566,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -578,7 +578,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -590,7 +590,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -603,7 +603,7 @@ public interface IFakeApiAsync : IApiAccessor /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -784,7 +784,7 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -809,7 +809,7 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -827,7 +827,7 @@ public interface IFakeApiAsync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -846,7 +846,7 @@ public interface IFakeApiAsync : IApiAccessor /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -862,7 +862,7 @@ public interface IFakeApiAsync : IApiAccessor /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -879,7 +879,7 @@ public interface IFakeApiAsync : IApiAccessor /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -969,7 +969,7 @@ public interface IFakeApiAsync : IApiAccessor /// (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -989,7 +989,7 @@ public interface IFakeApiAsync : IApiAccessor /// (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test referenced string map /// @@ -1275,7 +1275,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?)) + public bool FakeOuterBooleanSerialize(Option body = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1287,7 +1287,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(Option body = default(Option)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1328,7 +1328,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -1346,7 +1346,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1395,7 +1395,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)) + public OuterComposite FakeOuterCompositeSerialize(Option outerComposite = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1407,8 +1407,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(Option outerComposite = default(Option)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1448,7 +1452,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(Option outerComposite = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -1466,8 +1470,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(Option outerComposite = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'outerComposite' is set + if (outerComposite.IsSet && outerComposite.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'outerComposite' when calling FakeApi->FakeOuterCompositeSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1515,7 +1523,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)) + public decimal FakeOuterNumberSerialize(Option body = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1527,7 +1535,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(Option body = default(Option)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1568,7 +1576,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -1586,7 +1594,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1636,7 +1644,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Required UUID String /// Input string as post body (optional) /// string - public string FakeOuterStringSerialize(Guid requiredStringUuid, string body = default(string)) + public string FakeOuterStringSerialize(Guid requiredStringUuid, Option body = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, body); return localVarResponse.Data; @@ -1649,8 +1657,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Required UUID String /// Input string as post body (optional) /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, string body = default(string)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(Guid requiredStringUuid, Option body = default(Option)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1692,7 +1708,7 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(Guid requiredStringUuid, Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = FakeOuterStringSerializeWithHttpInfoAsync(requiredStringUuid, body, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -1711,8 +1727,16 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(Guid requiredStringUuid, Option body = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'requiredStringUuid' is set + if (requiredStringUuid == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredStringUuid' when calling FakeApi->FakeOuterStringSerialize"); + + // verify the required parameter 'body' is set + if (body.IsSet && body.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'body' when calling FakeApi->FakeOuterStringSerialize"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2112,7 +2136,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2173,7 +2197,7 @@ public Org.OpenAPITools.Client.ApiResponse TestAdditionalPropertiesRefer { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2236,7 +2260,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2297,7 +2321,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2362,11 +2386,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2430,11 +2454,11 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt { // verify the required parameter 'query' is set if (query == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2499,7 +2523,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2562,7 +2586,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeApi->TestClientModel"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2624,7 +2648,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// None (optional) /// - public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public void TestEndpointParameters(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) { TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); } @@ -2648,15 +2672,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2674,48 +2722,48 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } // authentication (http_basic_test) required @@ -2757,7 +2805,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = TestEndpointParametersWithHttpInfoAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -2787,15 +2835,39 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); // verify the required parameter 'varByte' is set if (varByte == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varByte' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'varString' is set + if (varString.IsSet && varString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'varString' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'binary' is set + if (binary.IsSet && binary.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'binary' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'date' is set + if (date.IsSet && date.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'date' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'dateTime' is set + if (dateTime.IsSet && dateTime.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'dateTime' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'password' is set + if (password.IsSet && password.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter 'callback' is set + if (callback.IsSet && callback.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'callback' when calling FakeApi->TestEndpointParameters"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2815,48 +2887,48 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (integer != null) + if (integer.IsSet) { - localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer.Value)); // form parameter } - if (int32 != null) + if (int32.IsSet) { - localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32.Value)); // form parameter } - if (int64 != null) + if (int64.IsSet) { - localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - if (varFloat != null) + if (varFloat.IsSet) { - localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varFloat.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varDouble)); // form parameter - if (varString != null) + if (varString.IsSet) { - localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varString.Value)); // form parameter } localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(varByte)); // form parameter - if (binary != null) + if (binary.IsSet) { } - if (date != null) + if (date.IsSet) { - localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date.Value)); // form parameter } - if (dateTime != null) + if (dateTime.IsSet) { - localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime.Value)); // form parameter } - if (password != null) + if (password.IsSet) { - localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password.Value)); // form parameter } - if (callback != null) + if (callback.IsSet) { - localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback.Value)); // form parameter } // authentication (http_basic_test) required @@ -2898,7 +2970,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2916,8 +2988,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2934,37 +3030,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } @@ -2994,7 +3090,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -3018,8 +3114,32 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'enumHeaderStringArray' is set + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumHeaderString' is set + if (enumHeaderString.IsSet && enumHeaderString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumHeaderString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryStringArray' is set + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumQueryString' is set + if (enumQueryString.IsSet && enumQueryString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumQueryString' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormStringArray' is set + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormStringArray' when calling FakeApi->TestEnumParameters"); + + // verify the required parameter 'enumFormString' is set + if (enumFormString.IsSet && enumFormString.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'enumFormString' when calling FakeApi->TestEnumParameters"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3038,37 +3158,37 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (enumQueryStringArray != null) + if (enumQueryStringArray.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray.Value)); } - if (enumQueryString != null) + if (enumQueryString.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString.Value)); } - if (enumQueryInteger != null) + if (enumQueryInteger.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger.Value)); } - if (enumQueryDouble != null) + if (enumQueryDouble.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble.Value)); } - if (enumHeaderStringArray != null) + if (enumHeaderStringArray.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray.Value)); // header parameter } - if (enumHeaderString != null) + if (enumHeaderString.IsSet) { - localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString.Value)); // header parameter } - if (enumFormStringArray != null) + if (enumFormStringArray.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray.Value)); // form parameter } - if (enumFormString != null) + if (enumFormString.IsSet) { - localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString.Value)); // form parameter } @@ -3102,7 +3222,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -3118,7 +3238,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3137,18 +3257,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } // authentication (bearer_test) required @@ -3182,7 +3302,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -3204,7 +3324,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3225,18 +3345,18 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); - if (stringGroup != null) + if (stringGroup.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup.Value)); } - if (int64Group != null) + if (int64Group.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group.Value)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) + if (booleanGroup.IsSet) { - localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup.Value)); // header parameter } // authentication (bearer_test) required @@ -3286,7 +3406,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3347,7 +3467,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3410,7 +3530,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3471,7 +3591,7 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineFreeformAdditionalP { // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set if (testInlineFreeformAdditionalPropertiesRequest == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3536,11 +3656,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3604,11 +3724,11 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( { // verify the required parameter 'param' is set if (param == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param' when calling FakeApi->TestJsonFormData"); // verify the required parameter 'param2' is set if (param2 == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'param2' when calling FakeApi->TestJsonFormData"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3665,7 +3785,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// (optional) /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string)) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } @@ -3684,35 +3804,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) { // verify the required parameter 'pipe' is set if (pipe == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3736,13 +3864,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } @@ -3773,7 +3901,7 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -3798,35 +3926,43 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'ioutil' is set if (ioutil == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'http' is set if (http == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'url' is set if (url == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'context' is set if (context == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNotNullable' is set if (requiredNotNullable == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); // verify the required parameter 'requiredNullable' is set if (requiredNullable == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNotNullable' is set + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNotNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'notRequiredNullable' is set + if (notRequiredNullable.IsSet && notRequiredNullable.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'notRequiredNullable' when calling FakeApi->TestQueryParameterCollectionFormat"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3852,13 +3988,13 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNotNullable", requiredNotNullable)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "requiredNullable", requiredNullable)); - if (notRequiredNotNullable != null) + if (notRequiredNotNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNotNullable", notRequiredNotNullable.Value)); } - if (notRequiredNullable != null) + if (notRequiredNullable.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "notRequiredNullable", notRequiredNullable.Value)); } @@ -3902,7 +4038,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -3963,7 +4099,7 @@ public Org.OpenAPITools.Client.ApiResponse TestStringMapReferenceWithHtt { // verify the required parameter 'requestBody' is set if (requestBody == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requestBody' when calling FakeApi->TestStringMapReference"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index b575ceab22a8..6b0b90f33555 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -245,7 +245,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -313,7 +313,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf { // verify the required parameter 'modelClient' is set if (modelClient == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs index e775e38390a6..ad764c529f4a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs @@ -51,7 +51,7 @@ public interface IPetApiSync : IApiAccessor /// Pet id to delete /// (optional) /// - void DeletePet(long petId, string apiKey = default(string)); + void DeletePet(long petId, Option apiKey = default(Option)); /// /// Deletes a pet @@ -63,7 +63,7 @@ public interface IPetApiSync : IApiAccessor /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)); + ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option)); /// /// Finds Pets by status /// @@ -155,7 +155,7 @@ public interface IPetApiSync : IApiAccessor /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)); + void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option)); /// /// Updates a pet in the store with form data @@ -168,7 +168,7 @@ public interface IPetApiSync : IApiAccessor /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option)); /// /// uploads an image /// @@ -177,7 +177,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option)); /// /// uploads an image @@ -190,7 +190,7 @@ public interface IPetApiSync : IApiAccessor /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option)); /// /// uploads an image (required) /// @@ -199,7 +199,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)); /// /// uploads an image (required) @@ -212,7 +212,7 @@ public interface IPetApiSync : IApiAccessor /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)); #endregion Synchronous Operations } @@ -256,7 +256,7 @@ public interface IPetApiAsync : IApiAccessor /// (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -269,7 +269,7 @@ public interface IPetApiAsync : IApiAccessor /// (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -376,7 +376,7 @@ public interface IPetApiAsync : IApiAccessor /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -390,7 +390,7 @@ public interface IPetApiAsync : IApiAccessor /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -403,7 +403,7 @@ public interface IPetApiAsync : IApiAccessor /// file to upload (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -417,7 +417,7 @@ public interface IPetApiAsync : IApiAccessor /// file to upload (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -430,7 +430,7 @@ public interface IPetApiAsync : IApiAccessor /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -444,7 +444,7 @@ public interface IPetApiAsync : IApiAccessor /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -610,7 +610,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) { // verify the required parameter 'pet' is set if (pet == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -694,7 +694,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) { // verify the required parameter 'pet' is set if (pet == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->AddPet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -766,7 +766,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Pet id to delete /// (optional) /// - public void DeletePet(long petId, string apiKey = default(string)) + public void DeletePet(long petId, Option apiKey = default(Option)) { DeletePetWithHttpInfo(petId, apiKey); } @@ -778,8 +778,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, Option apiKey = default(Option)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -796,9 +800,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } // authentication (petstore_auth) required @@ -828,7 +832,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, Option apiKey = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -846,8 +850,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, Option apiKey = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'apiKey' is set + if (apiKey.IsSet && apiKey.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'apiKey' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -866,9 +874,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (apiKey != null) + if (apiKey.IsSet) { - localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey.Value)); // header parameter } // authentication (petstore_auth) required @@ -919,7 +927,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1004,7 +1012,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn { // verify the required parameter 'status' is set if (status == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->FindPetsByStatus"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1093,7 +1101,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1180,7 +1188,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo { // verify the required parameter 'tags' is set if (tags == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'tags' when calling PetApi->FindPetsByTags"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1406,7 +1414,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1490,7 +1498,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet { // verify the required parameter 'pet' is set if (pet == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'pet' when calling PetApi->UpdatePet"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1563,7 +1571,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)) + public void UpdatePetWithForm(long petId, Option name = default(Option), Option status = default(Option)) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1576,8 +1584,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, Option name = default(Option), Option status = default(Option)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1595,13 +1611,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } // authentication (petstore_auth) required @@ -1632,7 +1648,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, Option name = default(Option), Option status = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -1651,8 +1667,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, Option name = default(Option), Option status = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'name' is set + if (name.IsSet && name.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'name' when calling PetApi->UpdatePetWithForm"); + + // verify the required parameter 'status' is set + if (status.IsSet && status.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'status' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1672,13 +1696,13 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (name != null) + if (name.IsSet) { - localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name.Value)); // form parameter } - if (status != null) + if (status.IsSet) { - localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status.Value)); // form parameter } // authentication (petstore_auth) required @@ -1715,7 +1739,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public ApiResponse UploadFile(long petId, Option additionalMetadata = default(Option), Option file = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1729,8 +1753,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, Option additionalMetadata = default(Option), Option file = default(Option)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1749,11 +1781,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { } @@ -1785,7 +1817,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -1805,8 +1837,16 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, Option additionalMetadata = default(Option), Option file = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFile"); + + // verify the required parameter 'file' is set + if (file.IsSet && file.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'file' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1827,11 +1867,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } - if (file != null) + if (file.IsSet) { } @@ -1869,7 +1909,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1883,11 +1923,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1908,9 +1952,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } // authentication (petstore_auth) required @@ -1941,7 +1985,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL @@ -1961,11 +2005,15 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + // verify the required parameter 'additionalMetadata' is set + if (additionalMetadata.IsSet && additionalMetadata.Value == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'additionalMetadata' when calling PetApi->UploadFileWithRequiredFile"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1988,9 +2036,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) + if (additionalMetadata.IsSet) { - localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata.Value)); // form parameter } // authentication (petstore_auth) required diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs index 812ad3827e79..0ac6a81b6790 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -369,7 +369,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -429,7 +429,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin { // verify the required parameter 'orderId' is set if (orderId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'orderId' when calling StoreApi->DeleteOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -734,7 +734,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -798,7 +798,7 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o { // verify the required parameter 'order' is set if (order == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'order' when calling StoreApi->PlaceOrder"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index c425058e2eed..d7799c0cafb4 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -541,7 +541,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -602,7 +602,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -665,7 +665,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -726,7 +726,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -789,7 +789,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -850,7 +850,7 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH { // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->CreateUsersWithListInput"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -913,7 +913,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -973,7 +973,7 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->DeleteUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1036,7 +1036,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1099,7 +1099,7 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->GetUserByName"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1166,11 +1166,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1236,11 +1236,11 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->LoginUser"); // verify the required parameter 'password' is set if (password == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'password' when calling UserApi->LoginUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1415,11 +1415,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1483,11 +1483,11 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string { // verify the required parameter 'username' is set if (username == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'username' when calling UserApi->UpdateUser"); // verify the required parameter 'user' is set if (user == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); + throw new Org.OpenAPITools.Client.ApiException(400, "Null non nullable parameter 'user' when calling UserApi->UpdateUser"); Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 7502e7fb9ace..dcb79f3ab2bd 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -29,6 +29,7 @@ using System.Net.Http.Headers; using UnityEngine.Networking; using UnityEngine; +using Org.OpenAPITools.Client; namespace Org.OpenAPITools.Client { @@ -49,7 +50,8 @@ internal class CustomJsonCodec { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -192,7 +194,8 @@ public partial class ApiClient : IDisposable, ISynchronousClient, IAsynchronousC { OverrideSpecifiedNames = false } - } + }, + Converters = new List { new OptionConverterFactory() } }; /// diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs new file mode 100644 index 000000000000..722d06c6b323 --- /dev/null +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Client/Option.cs @@ -0,0 +1,124 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; + + +namespace Org.OpenAPITools.Client +{ + public class OptionConverter : JsonConverter> + { + public override void WriteJson(JsonWriter writer, Option value, JsonSerializer serializer) + { + if (!value.IsSet) + { + writer.WriteNull(); + } + else + { + serializer.Serialize(writer, value.Value); + } + } + + public override Option ReadJson(JsonReader reader, Type objectType, Option existingValue, bool hasExistingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return new Option(); + } + + T val = serializer.Deserialize(reader); + return val != null ? new Option(val) : new Option(); + } + } + + public class OptionConverterFactory : JsonConverter + { + public override bool CanConvert(Type objectType) + => objectType.IsGenericType && objectType.GetGenericTypeDefinition() == typeof(Option<>); + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + Type innerType = value.GetType().GetGenericArguments()[0] ?? typeof(object); + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + converter.WriteJson(writer, value, serializer); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + Type innerType = objectType.GetGenericArguments()[0]; + var converterType = typeof(OptionConverter<>).MakeGenericType(innerType); + var converter = (JsonConverter)Activator.CreateInstance(converterType); + return converter.ReadJson(reader, objectType, existingValue, serializer); + } + } + + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + public bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + public bool Equals(Option other) + { + if (IsSet != other.IsSet) { + return false; + } + if (!IsSet) { + return true; + } + return object.Equals(Value, other.Value); + } + + public static bool operator ==(Option left, Option right) + { + return left.Equals(right); + } + + public static bool operator !=(Option left, Option right) + { + return !left.Equals(right); + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs index d232b084ecaf..eaa2d1162adc 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class Activity : IEquatable /// Initializes a new instance of the class. /// /// activityOutputs. - public Activity(Dictionary> activityOutputs = default(Dictionary>)) + public Activity(Option>> activityOutputs = default(Option>>)) { + // to ensure "activityOutputs" (not nullable) is not null + if (activityOutputs.IsSet && activityOutputs.Value == null) + { + throw new ArgumentNullException("activityOutputs isn't a nullable property for Activity and cannot be null"); + } this.ActivityOutputs = activityOutputs; } @@ -43,7 +49,7 @@ public partial class Activity : IEquatable /// Gets or Sets ActivityOutputs /// [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] - public Dictionary> ActivityOutputs { get; set; } + public Option>> ActivityOutputs { get; set; } /// /// Returns the string presentation of the object @@ -90,10 +96,10 @@ public bool Equals(Activity input) } return ( - this.ActivityOutputs == input.ActivityOutputs || - this.ActivityOutputs != null && - input.ActivityOutputs != null && - this.ActivityOutputs.SequenceEqual(input.ActivityOutputs) + + this.ActivityOutputs.IsSet && this.ActivityOutputs.Value != null && + input.ActivityOutputs.IsSet && input.ActivityOutputs.Value != null && + this.ActivityOutputs.Value.SequenceEqual(input.ActivityOutputs.Value) ); } @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActivityOutputs != null) + if (this.ActivityOutputs.IsSet && this.ActivityOutputs.Value != null) { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); + hashCode = (hashCode * 59) + this.ActivityOutputs.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 25d907b05308..bd79468e0100 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -35,8 +36,18 @@ public partial class ActivityOutputElementRepresentation : IEquatable /// prop1. /// prop2. - public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + public ActivityOutputElementRepresentation(Option prop1 = default(Option), Option prop2 = default(Option)) { + // to ensure "prop1" (not nullable) is not null + if (prop1.IsSet && prop1.Value == null) + { + throw new ArgumentNullException("prop1 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } + // to ensure "prop2" (not nullable) is not null + if (prop2.IsSet && prop2.Value == null) + { + throw new ArgumentNullException("prop2 isn't a nullable property for ActivityOutputElementRepresentation and cannot be null"); + } this.Prop1 = prop1; this.Prop2 = prop2; } @@ -45,13 +56,13 @@ public partial class ActivityOutputElementRepresentation : IEquatable [DataMember(Name = "prop1", EmitDefaultValue = false)] - public string Prop1 { get; set; } + public Option Prop1 { get; set; } /// /// Gets or Sets Prop2 /// [DataMember(Name = "prop2", EmitDefaultValue = false)] - public Object Prop2 { get; set; } + public Option Prop2 { get; set; } /// /// Returns the string presentation of the object @@ -99,14 +110,12 @@ public bool Equals(ActivityOutputElementRepresentation input) } return ( - this.Prop1 == input.Prop1 || - (this.Prop1 != null && - this.Prop1.Equals(input.Prop1)) + + this.Prop1.Equals(input.Prop1) ) && ( - this.Prop2 == input.Prop2 || - (this.Prop2 != null && - this.Prop2.Equals(input.Prop2)) + + this.Prop2.Equals(input.Prop2) ); } @@ -119,13 +128,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Prop1 != null) + if (this.Prop1.IsSet && this.Prop1.Value != null) { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop1.Value.GetHashCode(); } - if (this.Prop2 != null) + if (this.Prop2.IsSet && this.Prop2.Value != null) { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); + hashCode = (hashCode * 59) + this.Prop2.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 1e8c482df263..cec2df8b4372 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,8 +42,43 @@ public partial class AdditionalPropertiesClass : IEquatablemapWithUndeclaredPropertiesAnytype3. /// an object with no declared properties and no undeclared properties, hence it's an empty map.. /// mapWithUndeclaredPropertiesString. - public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) + public AdditionalPropertiesClass(Option> mapProperty = default(Option>), Option>> mapOfMapProperty = default(Option>>), Option anytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype1 = default(Option), Option mapWithUndeclaredPropertiesAnytype2 = default(Option), Option> mapWithUndeclaredPropertiesAnytype3 = default(Option>), Option emptyMap = default(Option), Option> mapWithUndeclaredPropertiesString = default(Option>)) { + // to ensure "mapProperty" (not nullable) is not null + if (mapProperty.IsSet && mapProperty.Value == null) + { + throw new ArgumentNullException("mapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapOfMapProperty" (not nullable) is not null + if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) + { + throw new ArgumentNullException("mapOfMapProperty isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype1" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype2" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesAnytype3" (not nullable) is not null + if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "emptyMap" (not nullable) is not null + if (emptyMap.IsSet && emptyMap.Value == null) + { + throw new ArgumentNullException("emptyMap isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } + // to ensure "mapWithUndeclaredPropertiesString" (not nullable) is not null + if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) + { + throw new ArgumentNullException("mapWithUndeclaredPropertiesString isn't a nullable property for AdditionalPropertiesClass and cannot be null"); + } this.MapProperty = mapProperty; this.MapOfMapProperty = mapOfMapProperty; this.Anytype1 = anytype1; @@ -57,50 +93,50 @@ public partial class AdditionalPropertiesClass : IEquatable [DataMember(Name = "map_property", EmitDefaultValue = false)] - public Dictionary MapProperty { get; set; } + public Option> MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] - public Dictionary> MapOfMapProperty { get; set; } + public Option>> MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// [DataMember(Name = "anytype_1", EmitDefaultValue = true)] - public Object Anytype1 { get; set; } + public Option Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] - public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } + public Option MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } + public Option> MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. [DataMember(Name = "empty_map", EmitDefaultValue = false)] - public Object EmptyMap { get; set; } + public Option EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] - public Dictionary MapWithUndeclaredPropertiesString { get; set; } + public Option> MapWithUndeclaredPropertiesString { get; set; } /// /// Returns the string presentation of the object @@ -154,48 +190,44 @@ public bool Equals(AdditionalPropertiesClass input) } return ( - this.MapProperty == input.MapProperty || - this.MapProperty != null && - input.MapProperty != null && - this.MapProperty.SequenceEqual(input.MapProperty) + + this.MapProperty.IsSet && this.MapProperty.Value != null && + input.MapProperty.IsSet && input.MapProperty.Value != null && + this.MapProperty.Value.SequenceEqual(input.MapProperty.Value) ) && ( - this.MapOfMapProperty == input.MapOfMapProperty || - this.MapOfMapProperty != null && - input.MapOfMapProperty != null && - this.MapOfMapProperty.SequenceEqual(input.MapOfMapProperty) + + this.MapOfMapProperty.IsSet && this.MapOfMapProperty.Value != null && + input.MapOfMapProperty.IsSet && input.MapOfMapProperty.Value != null && + this.MapOfMapProperty.Value.SequenceEqual(input.MapOfMapProperty.Value) ) && ( - this.Anytype1 == input.Anytype1 || - (this.Anytype1 != null && - this.Anytype1.Equals(input.Anytype1)) + + this.Anytype1.Equals(input.Anytype1) ) && ( - this.MapWithUndeclaredPropertiesAnytype1 == input.MapWithUndeclaredPropertiesAnytype1 || - (this.MapWithUndeclaredPropertiesAnytype1 != null && - this.MapWithUndeclaredPropertiesAnytype1.Equals(input.MapWithUndeclaredPropertiesAnytype1)) + + this.MapWithUndeclaredPropertiesAnytype1.Equals(input.MapWithUndeclaredPropertiesAnytype1) ) && ( - this.MapWithUndeclaredPropertiesAnytype2 == input.MapWithUndeclaredPropertiesAnytype2 || - (this.MapWithUndeclaredPropertiesAnytype2 != null && - this.MapWithUndeclaredPropertiesAnytype2.Equals(input.MapWithUndeclaredPropertiesAnytype2)) + + this.MapWithUndeclaredPropertiesAnytype2.Equals(input.MapWithUndeclaredPropertiesAnytype2) ) && ( - this.MapWithUndeclaredPropertiesAnytype3 == input.MapWithUndeclaredPropertiesAnytype3 || - this.MapWithUndeclaredPropertiesAnytype3 != null && - input.MapWithUndeclaredPropertiesAnytype3 != null && - this.MapWithUndeclaredPropertiesAnytype3.SequenceEqual(input.MapWithUndeclaredPropertiesAnytype3) + + this.MapWithUndeclaredPropertiesAnytype3.IsSet && this.MapWithUndeclaredPropertiesAnytype3.Value != null && + input.MapWithUndeclaredPropertiesAnytype3.IsSet && input.MapWithUndeclaredPropertiesAnytype3.Value != null && + this.MapWithUndeclaredPropertiesAnytype3.Value.SequenceEqual(input.MapWithUndeclaredPropertiesAnytype3.Value) ) && ( - this.EmptyMap == input.EmptyMap || - (this.EmptyMap != null && - this.EmptyMap.Equals(input.EmptyMap)) + + this.EmptyMap.Equals(input.EmptyMap) ) && ( - this.MapWithUndeclaredPropertiesString == input.MapWithUndeclaredPropertiesString || - this.MapWithUndeclaredPropertiesString != null && - input.MapWithUndeclaredPropertiesString != null && - this.MapWithUndeclaredPropertiesString.SequenceEqual(input.MapWithUndeclaredPropertiesString) + + this.MapWithUndeclaredPropertiesString.IsSet && this.MapWithUndeclaredPropertiesString.Value != null && + input.MapWithUndeclaredPropertiesString.IsSet && input.MapWithUndeclaredPropertiesString.Value != null && + this.MapWithUndeclaredPropertiesString.Value.SequenceEqual(input.MapWithUndeclaredPropertiesString.Value) ); } @@ -208,37 +240,37 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapProperty != null) + if (this.MapProperty.IsSet && this.MapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapProperty.Value.GetHashCode(); } - if (this.MapOfMapProperty != null) + if (this.MapOfMapProperty.IsSet && this.MapOfMapProperty.Value != null) { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfMapProperty.Value.GetHashCode(); } - if (this.Anytype1 != null) + if (this.Anytype1.IsSet && this.Anytype1.Value != null) { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.Anytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) + if (this.MapWithUndeclaredPropertiesAnytype1.IsSet && this.MapWithUndeclaredPropertiesAnytype1.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) + if (this.MapWithUndeclaredPropertiesAnytype2.IsSet && this.MapWithUndeclaredPropertiesAnytype2.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) + if (this.MapWithUndeclaredPropertiesAnytype3.IsSet && this.MapWithUndeclaredPropertiesAnytype3.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.Value.GetHashCode(); } - if (this.EmptyMap != null) + if (this.EmptyMap.IsSet && this.EmptyMap.Value != null) { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); + hashCode = (hashCode * 59) + this.EmptyMap.Value.GetHashCode(); } - if (this.MapWithUndeclaredPropertiesString != null) + if (this.MapWithUndeclaredPropertiesString.IsSet && this.MapWithUndeclaredPropertiesString.Value != null) { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 0073454f667c..53001fc373be 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -40,16 +41,20 @@ protected Animal() { } /// /// className (required). /// color (default to "red"). - public Animal(string className = default(string), string color = @"red") + public Animal(string className = default(string), Option color = default(Option)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Animal and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for Animal and cannot be null"); } this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? @"red"; + this.Color = color.IsSet ? color : new Option(@"red"); } /// @@ -62,7 +67,7 @@ protected Animal() { } /// Gets or Sets Color /// [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Returns the string presentation of the object @@ -115,9 +120,8 @@ public bool Equals(Animal input) this.ClassName.Equals(input.ClassName)) ) && ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) + + this.Color.Equals(input.Color) ); } @@ -134,9 +138,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); } - if (this.Color != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 4d83d2d347b5..0a676d40603b 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -36,8 +37,18 @@ public partial class ApiResponse : IEquatable /// code. /// type. /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) + public ApiResponse(Option code = default(Option), Option type = default(Option), Option message = default(Option)) { + // to ensure "type" (not nullable) is not null + if (type.IsSet && type.Value == null) + { + throw new ArgumentNullException("type isn't a nullable property for ApiResponse and cannot be null"); + } + // to ensure "message" (not nullable) is not null + if (message.IsSet && message.Value == null) + { + throw new ArgumentNullException("message isn't a nullable property for ApiResponse and cannot be null"); + } this.Code = code; this.Type = type; this.Message = message; @@ -47,19 +58,19 @@ public partial class ApiResponse : IEquatable /// Gets or Sets Code /// [DataMember(Name = "code", EmitDefaultValue = false)] - public int Code { get; set; } + public Option Code { get; set; } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + public Option Type { get; set; } /// /// Gets or Sets Message /// [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } + public Option Message { get; set; } /// /// Returns the string presentation of the object @@ -108,18 +119,15 @@ public bool Equals(ApiResponse input) } return ( - this.Code == input.Code || this.Code.Equals(input.Code) ) && ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) + + this.Type.Equals(input.Type) ) && ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) + + this.Message.Equals(input.Message) ); } @@ -132,14 +140,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) + if (this.Code.IsSet) + { + hashCode = (hashCode * 59) + this.Code.Value.GetHashCode(); + } + if (this.Type.IsSet && this.Type.Value != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); } - if (this.Message != null) + if (this.Message.IsSet && this.Message.Value != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this.Message.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 020226d9aa7f..78e7e40f5f81 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -36,8 +37,23 @@ public partial class Apple : IEquatable /// cultivar. /// origin. /// colorCode. - public Apple(string cultivar = default(string), string origin = default(string), string colorCode = default(string)) + public Apple(Option cultivar = default(Option), Option origin = default(Option), Option colorCode = default(Option)) { + // to ensure "cultivar" (not nullable) is not null + if (cultivar.IsSet && cultivar.Value == null) + { + throw new ArgumentNullException("cultivar isn't a nullable property for Apple and cannot be null"); + } + // to ensure "origin" (not nullable) is not null + if (origin.IsSet && origin.Value == null) + { + throw new ArgumentNullException("origin isn't a nullable property for Apple and cannot be null"); + } + // to ensure "colorCode" (not nullable) is not null + if (colorCode.IsSet && colorCode.Value == null) + { + throw new ArgumentNullException("colorCode isn't a nullable property for Apple and cannot be null"); + } this.Cultivar = cultivar; this.Origin = origin; this.ColorCode = colorCode; @@ -47,19 +63,19 @@ public partial class Apple : IEquatable /// Gets or Sets Cultivar /// [DataMember(Name = "cultivar", EmitDefaultValue = false)] - public string Cultivar { get; set; } + public Option Cultivar { get; set; } /// /// Gets or Sets Origin /// [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin { get; set; } + public Option Origin { get; set; } /// /// Gets or Sets ColorCode /// [DataMember(Name = "color_code", EmitDefaultValue = false)] - public string ColorCode { get; set; } + public Option ColorCode { get; set; } /// /// Returns the string presentation of the object @@ -108,19 +124,16 @@ public bool Equals(Apple input) } return ( - this.Cultivar == input.Cultivar || - (this.Cultivar != null && - this.Cultivar.Equals(input.Cultivar)) + + this.Cultivar.Equals(input.Cultivar) ) && ( - this.Origin == input.Origin || - (this.Origin != null && - this.Origin.Equals(input.Origin)) + + this.Origin.Equals(input.Origin) ) && ( - this.ColorCode == input.ColorCode || - (this.ColorCode != null && - this.ColorCode.Equals(input.ColorCode)) + + this.ColorCode.Equals(input.ColorCode) ); } @@ -133,17 +146,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Cultivar != null) + if (this.Cultivar.IsSet && this.Cultivar.Value != null) { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); + hashCode = (hashCode * 59) + this.Cultivar.Value.GetHashCode(); } - if (this.Origin != null) + if (this.Origin.IsSet && this.Origin.Value != null) { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); + hashCode = (hashCode * 59) + this.Origin.Value.GetHashCode(); } - if (this.ColorCode != null) + if (this.ColorCode.IsSet && this.ColorCode.Value != null) { - hashCode = (hashCode * 59) + this.ColorCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorCode.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index 4b7a3084bd0e..7cb63b990ae6 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -40,12 +41,12 @@ protected AppleReq() { } /// /// cultivar (required). /// mealy. - public AppleReq(string cultivar = default(string), bool mealy = default(bool)) + public AppleReq(string cultivar = default(string), Option mealy = default(Option)) { - // to ensure "cultivar" is required (not null) + // to ensure "cultivar" (not nullable) is not null if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); + throw new ArgumentNullException("cultivar isn't a nullable property for AppleReq and cannot be null"); } this.Cultivar = cultivar; this.Mealy = mealy; @@ -61,7 +62,7 @@ protected AppleReq() { } /// Gets or Sets Mealy /// [DataMember(Name = "mealy", EmitDefaultValue = true)] - public bool Mealy { get; set; } + public Option Mealy { get; set; } /// /// Returns the string presentation of the object @@ -114,7 +115,6 @@ public bool Equals(AppleReq input) this.Cultivar.Equals(input.Cultivar)) ) && ( - this.Mealy == input.Mealy || this.Mealy.Equals(input.Mealy) ); } @@ -132,7 +132,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); + if (this.Mealy.IsSet) + { + hashCode = (hashCode * 59) + this.Mealy.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index b6f5ac66d2fc..55e27c772a6a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable class. /// /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + public ArrayOfArrayOfNumberOnly(Option>> arrayArrayNumber = default(Option>>)) { + // to ensure "arrayArrayNumber" (not nullable) is not null + if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) + { + throw new ArgumentNullException("arrayArrayNumber isn't a nullable property for ArrayOfArrayOfNumberOnly and cannot be null"); + } this.ArrayArrayNumber = arrayArrayNumber; } @@ -43,7 +49,7 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] - public List> ArrayArrayNumber { get; set; } + public Option>> ArrayArrayNumber { get; set; } /// /// Returns the string presentation of the object @@ -90,10 +96,10 @@ public bool Equals(ArrayOfArrayOfNumberOnly input) } return ( - this.ArrayArrayNumber == input.ArrayArrayNumber || - this.ArrayArrayNumber != null && - input.ArrayArrayNumber != null && - this.ArrayArrayNumber.SequenceEqual(input.ArrayArrayNumber) + + this.ArrayArrayNumber.IsSet && this.ArrayArrayNumber.Value != null && + input.ArrayArrayNumber.IsSet && input.ArrayArrayNumber.Value != null && + this.ArrayArrayNumber.Value.SequenceEqual(input.ArrayArrayNumber.Value) ); } @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayArrayNumber != null) + if (this.ArrayArrayNumber.IsSet && this.ArrayArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayNumber.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 78d77d41a431..e39a83a3291a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class ArrayOfNumberOnly : IEquatable /// Initializes a new instance of the class. /// /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) + public ArrayOfNumberOnly(Option> arrayNumber = default(Option>)) { + // to ensure "arrayNumber" (not nullable) is not null + if (arrayNumber.IsSet && arrayNumber.Value == null) + { + throw new ArgumentNullException("arrayNumber isn't a nullable property for ArrayOfNumberOnly and cannot be null"); + } this.ArrayNumber = arrayNumber; } @@ -43,7 +49,7 @@ public partial class ArrayOfNumberOnly : IEquatable /// Gets or Sets ArrayNumber /// [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] - public List ArrayNumber { get; set; } + public Option> ArrayNumber { get; set; } /// /// Returns the string presentation of the object @@ -90,10 +96,10 @@ public bool Equals(ArrayOfNumberOnly input) } return ( - this.ArrayNumber == input.ArrayNumber || - this.ArrayNumber != null && - input.ArrayNumber != null && - this.ArrayNumber.SequenceEqual(input.ArrayNumber) + + this.ArrayNumber.IsSet && this.ArrayNumber.Value != null && + input.ArrayNumber.IsSet && input.ArrayNumber.Value != null && + this.ArrayNumber.Value.SequenceEqual(input.ArrayNumber.Value) ); } @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayNumber != null) + if (this.ArrayNumber.IsSet && this.ArrayNumber.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNumber.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 652ab86bd192..a4725bad0e07 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -36,8 +37,23 @@ public partial class ArrayTest : IEquatable /// arrayOfString. /// arrayArrayOfInteger. /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + public ArrayTest(Option> arrayOfString = default(Option>), Option>> arrayArrayOfInteger = default(Option>>), Option>> arrayArrayOfModel = default(Option>>)) { + // to ensure "arrayOfString" (not nullable) is not null + if (arrayOfString.IsSet && arrayOfString.Value == null) + { + throw new ArgumentNullException("arrayOfString isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfInteger" (not nullable) is not null + if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) + { + throw new ArgumentNullException("arrayArrayOfInteger isn't a nullable property for ArrayTest and cannot be null"); + } + // to ensure "arrayArrayOfModel" (not nullable) is not null + if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) + { + throw new ArgumentNullException("arrayArrayOfModel isn't a nullable property for ArrayTest and cannot be null"); + } this.ArrayOfString = arrayOfString; this.ArrayArrayOfInteger = arrayArrayOfInteger; this.ArrayArrayOfModel = arrayArrayOfModel; @@ -47,19 +63,19 @@ public partial class ArrayTest : IEquatable /// Gets or Sets ArrayOfString /// [DataMember(Name = "array_of_string", EmitDefaultValue = false)] - public List ArrayOfString { get; set; } + public Option> ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] - public List> ArrayArrayOfInteger { get; set; } + public Option>> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] - public List> ArrayArrayOfModel { get; set; } + public Option>> ArrayArrayOfModel { get; set; } /// /// Returns the string presentation of the object @@ -108,22 +124,22 @@ public bool Equals(ArrayTest input) } return ( - this.ArrayOfString == input.ArrayOfString || - this.ArrayOfString != null && - input.ArrayOfString != null && - this.ArrayOfString.SequenceEqual(input.ArrayOfString) + + this.ArrayOfString.IsSet && this.ArrayOfString.Value != null && + input.ArrayOfString.IsSet && input.ArrayOfString.Value != null && + this.ArrayOfString.Value.SequenceEqual(input.ArrayOfString.Value) ) && ( - this.ArrayArrayOfInteger == input.ArrayArrayOfInteger || - this.ArrayArrayOfInteger != null && - input.ArrayArrayOfInteger != null && - this.ArrayArrayOfInteger.SequenceEqual(input.ArrayArrayOfInteger) + + this.ArrayArrayOfInteger.IsSet && this.ArrayArrayOfInteger.Value != null && + input.ArrayArrayOfInteger.IsSet && input.ArrayArrayOfInteger.Value != null && + this.ArrayArrayOfInteger.Value.SequenceEqual(input.ArrayArrayOfInteger.Value) ) && ( - this.ArrayArrayOfModel == input.ArrayArrayOfModel || - this.ArrayArrayOfModel != null && - input.ArrayArrayOfModel != null && - this.ArrayArrayOfModel.SequenceEqual(input.ArrayArrayOfModel) + + this.ArrayArrayOfModel.IsSet && this.ArrayArrayOfModel.Value != null && + input.ArrayArrayOfModel.IsSet && input.ArrayArrayOfModel.Value != null && + this.ArrayArrayOfModel.Value.SequenceEqual(input.ArrayArrayOfModel.Value) ); } @@ -136,17 +152,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ArrayOfString != null) + if (this.ArrayOfString.IsSet && this.ArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayOfString.Value.GetHashCode(); } - if (this.ArrayArrayOfInteger != null) + if (this.ArrayArrayOfInteger.IsSet && this.ArrayArrayOfInteger.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.Value.GetHashCode(); } - if (this.ArrayArrayOfModel != null) + if (this.ArrayArrayOfModel.IsSet && this.ArrayArrayOfModel.Value != null) { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayArrayOfModel.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs index b31a453f9e87..edd5b2de6928 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,7 +35,7 @@ public partial class Banana : IEquatable /// Initializes a new instance of the class. /// /// lengthCm. - public Banana(decimal lengthCm = default(decimal)) + public Banana(Option lengthCm = default(Option)) { this.LengthCm = lengthCm; } @@ -43,7 +44,7 @@ public partial class Banana : IEquatable /// Gets or Sets LengthCm /// [DataMember(Name = "lengthCm", EmitDefaultValue = false)] - public decimal LengthCm { get; set; } + public Option LengthCm { get; set; } /// /// Returns the string presentation of the object @@ -90,7 +91,6 @@ public bool Equals(Banana input) } return ( - this.LengthCm == input.LengthCm || this.LengthCm.Equals(input.LengthCm) ); } @@ -104,7 +104,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); + if (this.LengthCm.IsSet) + { + hashCode = (hashCode * 59) + this.LengthCm.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 2f73ada806c8..cc12527ec7f6 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -40,7 +41,7 @@ protected BananaReq() { } /// /// lengthCm (required). /// sweet. - public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool)) + public BananaReq(decimal lengthCm = default(decimal), Option sweet = default(Option)) { this.LengthCm = lengthCm; this.Sweet = sweet; @@ -56,7 +57,7 @@ protected BananaReq() { } /// Gets or Sets Sweet /// [DataMember(Name = "sweet", EmitDefaultValue = true)] - public bool Sweet { get; set; } + public Option Sweet { get; set; } /// /// Returns the string presentation of the object @@ -108,7 +109,6 @@ public bool Equals(BananaReq input) this.LengthCm.Equals(input.LengthCm) ) && ( - this.Sweet == input.Sweet || this.Sweet.Equals(input.Sweet) ); } @@ -123,7 +123,10 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); + if (this.Sweet.IsSet) + { + hashCode = (hashCode * 59) + this.Sweet.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index 2a9aa95af51b..3ca4edbc062f 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,10 +42,10 @@ protected BasquePig() { } /// className (required). public BasquePig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for BasquePig and cannot be null"); } this.ClassName = className; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 20dd579a9146..254cc3779e91 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -39,8 +40,38 @@ public partial class Capitalization : IEquatable /// capitalSnake. /// sCAETHFlowPoints. /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) + public Capitalization(Option smallCamel = default(Option), Option capitalCamel = default(Option), Option smallSnake = default(Option), Option capitalSnake = default(Option), Option sCAETHFlowPoints = default(Option), Option aTTNAME = default(Option)) { + // to ensure "smallCamel" (not nullable) is not null + if (smallCamel.IsSet && smallCamel.Value == null) + { + throw new ArgumentNullException("smallCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalCamel" (not nullable) is not null + if (capitalCamel.IsSet && capitalCamel.Value == null) + { + throw new ArgumentNullException("capitalCamel isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "smallSnake" (not nullable) is not null + if (smallSnake.IsSet && smallSnake.Value == null) + { + throw new ArgumentNullException("smallSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "capitalSnake" (not nullable) is not null + if (capitalSnake.IsSet && capitalSnake.Value == null) + { + throw new ArgumentNullException("capitalSnake isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "sCAETHFlowPoints" (not nullable) is not null + if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) + { + throw new ArgumentNullException("sCAETHFlowPoints isn't a nullable property for Capitalization and cannot be null"); + } + // to ensure "aTTNAME" (not nullable) is not null + if (aTTNAME.IsSet && aTTNAME.Value == null) + { + throw new ArgumentNullException("aTTNAME isn't a nullable property for Capitalization and cannot be null"); + } this.SmallCamel = smallCamel; this.CapitalCamel = capitalCamel; this.SmallSnake = smallSnake; @@ -53,38 +84,38 @@ public partial class Capitalization : IEquatable /// Gets or Sets SmallCamel /// [DataMember(Name = "smallCamel", EmitDefaultValue = false)] - public string SmallCamel { get; set; } + public Option SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] - public string CapitalCamel { get; set; } + public Option CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// [DataMember(Name = "small_Snake", EmitDefaultValue = false)] - public string SmallSnake { get; set; } + public Option SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] - public string CapitalSnake { get; set; } + public Option CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] - public string SCAETHFlowPoints { get; set; } + public Option SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] - public string ATT_NAME { get; set; } + public Option ATT_NAME { get; set; } /// /// Returns the string presentation of the object @@ -136,34 +167,28 @@ public bool Equals(Capitalization input) } return ( - this.SmallCamel == input.SmallCamel || - (this.SmallCamel != null && - this.SmallCamel.Equals(input.SmallCamel)) + + this.SmallCamel.Equals(input.SmallCamel) ) && ( - this.CapitalCamel == input.CapitalCamel || - (this.CapitalCamel != null && - this.CapitalCamel.Equals(input.CapitalCamel)) + + this.CapitalCamel.Equals(input.CapitalCamel) ) && ( - this.SmallSnake == input.SmallSnake || - (this.SmallSnake != null && - this.SmallSnake.Equals(input.SmallSnake)) + + this.SmallSnake.Equals(input.SmallSnake) ) && ( - this.CapitalSnake == input.CapitalSnake || - (this.CapitalSnake != null && - this.CapitalSnake.Equals(input.CapitalSnake)) + + this.CapitalSnake.Equals(input.CapitalSnake) ) && ( - this.SCAETHFlowPoints == input.SCAETHFlowPoints || - (this.SCAETHFlowPoints != null && - this.SCAETHFlowPoints.Equals(input.SCAETHFlowPoints)) + + this.SCAETHFlowPoints.Equals(input.SCAETHFlowPoints) ) && ( - this.ATT_NAME == input.ATT_NAME || - (this.ATT_NAME != null && - this.ATT_NAME.Equals(input.ATT_NAME)) + + this.ATT_NAME.Equals(input.ATT_NAME) ); } @@ -176,29 +201,29 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SmallCamel != null) + if (this.SmallCamel.IsSet && this.SmallCamel.Value != null) { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallCamel.Value.GetHashCode(); } - if (this.CapitalCamel != null) + if (this.CapitalCamel.IsSet && this.CapitalCamel.Value != null) { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalCamel.Value.GetHashCode(); } - if (this.SmallSnake != null) + if (this.SmallSnake.IsSet && this.SmallSnake.Value != null) { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.SmallSnake.Value.GetHashCode(); } - if (this.CapitalSnake != null) + if (this.CapitalSnake.IsSet && this.CapitalSnake.Value != null) { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); + hashCode = (hashCode * 59) + this.CapitalSnake.Value.GetHashCode(); } - if (this.SCAETHFlowPoints != null) + if (this.SCAETHFlowPoints.IsSet && this.SCAETHFlowPoints.Value != null) { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); + hashCode = (hashCode * 59) + this.SCAETHFlowPoints.Value.GetHashCode(); } - if (this.ATT_NAME != null) + if (this.ATT_NAME.IsSet && this.ATT_NAME.Value != null) { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); + hashCode = (hashCode * 59) + this.ATT_NAME.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs index 2d02542a5170..7ecee6001f90 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,7 +42,7 @@ protected Cat() { } /// declawed. /// className (required) (default to "Cat"). /// color (default to "red"). - public Cat(bool declawed = default(bool), string className = @"Cat", string color = @"red") : base(className, color) + public Cat(Option declawed = default(Option), string className = @"Cat", Option color = default(Option)) : base(className, color) { this.Declawed = declawed; } @@ -50,7 +51,7 @@ protected Cat() { } /// Gets or Sets Declawed /// [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed { get; set; } + public Option Declawed { get; set; } /// /// Returns the string presentation of the object @@ -98,7 +99,6 @@ public bool Equals(Cat input) } return base.Equals(input) && ( - this.Declawed == input.Declawed || this.Declawed.Equals(input.Declawed) ); } @@ -112,7 +112,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); + if (this.Declawed.IsSet) + { + hashCode = (hashCode * 59) + this.Declawed.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs index 52680d66e365..17972b137462 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -40,22 +41,22 @@ protected Category() { } /// /// id. /// name (required) (default to "default-name"). - public Category(long id = default(long), string name = @"default-name") + public Category(Option id = default(Option), string name = @"default-name") { - // to ensure "name" is required (not null) + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Category and cannot be null"); } - this.Name = name; this.Id = id; + this.Name = name; } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name @@ -109,7 +110,6 @@ public bool Equals(Category input) } return ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( @@ -128,7 +128,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index 939b710f34bb..211c7b41ae67 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -59,17 +60,22 @@ protected ChildCat() { } /// /// name. /// petType (required) (default to PetTypeEnum.ChildCat). - public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() + public ChildCat(Option name = default(Option), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.PetType = petType; + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for ChildCat and cannot be null"); + } this.Name = name; + this.PetType = petType; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -118,9 +124,8 @@ public bool Equals(ChildCat input) } return base.Equals(input) && ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) + + this.Name.Equals(input.Name) ) && base.Equals(input) && ( this.PetType == input.PetType || @@ -137,9 +142,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.PetType.GetHashCode(); return hashCode; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index d0b3dd330925..56c0e3ea8178 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class ClassModel : IEquatable /// Initializes a new instance of the class. /// /// varClass. - public ClassModel(string varClass = default(string)) + public ClassModel(Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for ClassModel and cannot be null"); + } this.Class = varClass; } @@ -43,7 +49,7 @@ public partial class ClassModel : IEquatable /// Gets or Sets Class /// [DataMember(Name = "_class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(ClassModel input) } return ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) + + this.Class.Equals(input.Class) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Class != null) + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 3dad8a4a0ba4..bc4700459635 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -42,17 +43,17 @@ protected ComplexQuadrilateral() { } /// quadrilateralType (required). public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for ComplexQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 23e9e1f7ffb6..d33d53c6679f 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,10 +42,10 @@ protected DanishPig() { } /// className (required). public DanishPig(string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for DanishPig and cannot be null"); } this.ClassName = className; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 2da6ff2c54e5..d5c6000b4e2a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class DateOnlyClass : IEquatable /// Initializes a new instance of the class. /// /// dateOnlyProperty. - public DateOnlyClass(DateTime dateOnlyProperty = default(DateTime)) + public DateOnlyClass(Option dateOnlyProperty = default(Option)) { + // to ensure "dateOnlyProperty" (not nullable) is not null + if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) + { + throw new ArgumentNullException("dateOnlyProperty isn't a nullable property for DateOnlyClass and cannot be null"); + } this.DateOnlyProperty = dateOnlyProperty; } @@ -45,7 +51,7 @@ public partial class DateOnlyClass : IEquatable /// Fri Jul 21 00:00:00 UTC 2017 [DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOnlyProperty { get; set; } + public Option DateOnlyProperty { get; set; } /// /// Returns the string presentation of the object @@ -92,9 +98,8 @@ public bool Equals(DateOnlyClass input) } return ( - this.DateOnlyProperty == input.DateOnlyProperty || - (this.DateOnlyProperty != null && - this.DateOnlyProperty.Equals(input.DateOnlyProperty)) + + this.DateOnlyProperty.Equals(input.DateOnlyProperty) ); } @@ -107,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.DateOnlyProperty != null) + if (this.DateOnlyProperty.IsSet && this.DateOnlyProperty.Value != null) { - hashCode = (hashCode * 59) + this.DateOnlyProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.DateOnlyProperty.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 3d7c5fdbb499..b71e07183a34 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class DeprecatedObject : IEquatable /// Initializes a new instance of the class. /// /// name. - public DeprecatedObject(string name = default(string)) + public DeprecatedObject(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for DeprecatedObject and cannot be null"); + } this.Name = name; } @@ -43,7 +49,7 @@ public partial class DeprecatedObject : IEquatable /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(DeprecatedObject input) } return ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) + + this.Name.Equals(input.Name) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs index cda8e3ca41c9..2e060449a6c3 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,8 +42,13 @@ protected Dog() { } /// breed. /// className (required) (default to "Dog"). /// color (default to "red"). - public Dog(string breed = default(string), string className = @"Dog", string color = @"red") : base(className, color) + public Dog(Option breed = default(Option), string className = @"Dog", Option color = default(Option)) : base(className, color) { + // to ensure "breed" (not nullable) is not null + if (breed.IsSet && breed.Value == null) + { + throw new ArgumentNullException("breed isn't a nullable property for Dog and cannot be null"); + } this.Breed = breed; } @@ -50,7 +56,7 @@ protected Dog() { } /// Gets or Sets Breed /// [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed { get; set; } + public Option Breed { get; set; } /// /// Returns the string presentation of the object @@ -98,9 +104,8 @@ public bool Equals(Dog input) } return base.Equals(input) && ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) + + this.Breed.Equals(input.Breed) ); } @@ -113,9 +118,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) + if (this.Breed.IsSet && this.Breed.Value != null) { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); + hashCode = (hashCode * 59) + this.Breed.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index f9e91a2fb86b..b9a3ee772396 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,18 @@ public partial class Drawing : IEquatable /// shapeOrNull. /// nullableShape. /// shapes. - public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) + public Drawing(Option mainShape = default(Option), Option shapeOrNull = default(Option), Option nullableShape = default(Option), Option> shapes = default(Option>)) { + // to ensure "mainShape" (not nullable) is not null + if (mainShape.IsSet && mainShape.Value == null) + { + throw new ArgumentNullException("mainShape isn't a nullable property for Drawing and cannot be null"); + } + // to ensure "shapes" (not nullable) is not null + if (shapes.IsSet && shapes.Value == null) + { + throw new ArgumentNullException("shapes isn't a nullable property for Drawing and cannot be null"); + } this.MainShape = mainShape; this.ShapeOrNull = shapeOrNull; this.NullableShape = nullableShape; @@ -50,25 +61,25 @@ public partial class Drawing : IEquatable /// Gets or Sets MainShape /// [DataMember(Name = "mainShape", EmitDefaultValue = false)] - public Shape MainShape { get; set; } + public Option MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// [DataMember(Name = "shapeOrNull", EmitDefaultValue = true)] - public ShapeOrNull ShapeOrNull { get; set; } + public Option ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// [DataMember(Name = "nullableShape", EmitDefaultValue = true)] - public NullableShape NullableShape { get; set; } + public Option NullableShape { get; set; } /// /// Gets or Sets Shapes /// [DataMember(Name = "shapes", EmitDefaultValue = false)] - public List Shapes { get; set; } + public Option> Shapes { get; set; } /// /// Gets or Sets additional properties @@ -125,25 +136,22 @@ public bool Equals(Drawing input) } return ( - this.MainShape == input.MainShape || - (this.MainShape != null && - this.MainShape.Equals(input.MainShape)) + + this.MainShape.Equals(input.MainShape) ) && ( - this.ShapeOrNull == input.ShapeOrNull || - (this.ShapeOrNull != null && - this.ShapeOrNull.Equals(input.ShapeOrNull)) + + this.ShapeOrNull.Equals(input.ShapeOrNull) ) && ( - this.NullableShape == input.NullableShape || - (this.NullableShape != null && - this.NullableShape.Equals(input.NullableShape)) + + this.NullableShape.Equals(input.NullableShape) ) && ( - this.Shapes == input.Shapes || - this.Shapes != null && - input.Shapes != null && - this.Shapes.SequenceEqual(input.Shapes) + + this.Shapes.IsSet && this.Shapes.Value != null && + input.Shapes.IsSet && input.Shapes.Value != null && + this.Shapes.Value.SequenceEqual(input.Shapes.Value) ) && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); } @@ -157,21 +165,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MainShape != null) + if (this.MainShape.IsSet && this.MainShape.Value != null) { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); + hashCode = (hashCode * 59) + this.MainShape.Value.GetHashCode(); } - if (this.ShapeOrNull != null) + if (this.ShapeOrNull.IsSet && this.ShapeOrNull.Value != null) { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); + hashCode = (hashCode * 59) + this.ShapeOrNull.Value.GetHashCode(); } - if (this.NullableShape != null) + if (this.NullableShape.IsSet && this.NullableShape.Value != null) { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableShape.Value.GetHashCode(); } - if (this.Shapes != null) + if (this.Shapes.IsSet && this.Shapes.Value != null) { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); + hashCode = (hashCode * 59) + this.Shapes.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index ef7f75fa434d..d14ae14ea148 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -54,7 +55,7 @@ public enum JustSymbolEnum /// Gets or Sets JustSymbol /// [DataMember(Name = "just_symbol", EmitDefaultValue = false)] - public JustSymbolEnum? JustSymbol { get; set; } + public Option JustSymbol { get; set; } /// /// Defines ArrayEnum /// @@ -79,8 +80,13 @@ public enum ArrayEnumEnum /// /// justSymbol. /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) + public EnumArrays(Option justSymbol = default(Option), Option> arrayEnum = default(Option>)) { + // to ensure "arrayEnum" (not nullable) is not null + if (arrayEnum.IsSet && arrayEnum.Value == null) + { + throw new ArgumentNullException("arrayEnum isn't a nullable property for EnumArrays and cannot be null"); + } this.JustSymbol = justSymbol; this.ArrayEnum = arrayEnum; } @@ -89,7 +95,7 @@ public enum ArrayEnumEnum /// Gets or Sets ArrayEnum /// [DataMember(Name = "array_enum", EmitDefaultValue = false)] - public List ArrayEnum { get; set; } + public Option> ArrayEnum { get; set; } /// /// Returns the string presentation of the object @@ -137,14 +143,13 @@ public bool Equals(EnumArrays input) } return ( - this.JustSymbol == input.JustSymbol || this.JustSymbol.Equals(input.JustSymbol) ) && ( - this.ArrayEnum == input.ArrayEnum || - this.ArrayEnum != null && - input.ArrayEnum != null && - this.ArrayEnum.SequenceEqual(input.ArrayEnum) + + this.ArrayEnum.IsSet && this.ArrayEnum.Value != null && + input.ArrayEnum.IsSet && input.ArrayEnum.Value != null && + this.ArrayEnum.Value.SequenceEqual(input.ArrayEnum.Value) ); } @@ -157,10 +162,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) + if (this.JustSymbol.IsSet) + { + hashCode = (hashCode * 59) + this.JustSymbol.Value.GetHashCode(); + } + if (this.ArrayEnum.IsSet && this.ArrayEnum.Value != null) { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayEnum.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs index b8c2d5f65c1d..4b9209835dec 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 627c8a3acd40..5b2bd9e83187 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -90,7 +91,7 @@ public enum EnumStringEnum /// Gets or Sets EnumString /// [DataMember(Name = "enum_string", EmitDefaultValue = false)] - public EnumStringEnum? EnumString { get; set; } + public Option EnumString { get; set; } /// /// Defines EnumStringRequired /// @@ -173,7 +174,7 @@ public enum EnumIntegerEnum /// Gets or Sets EnumInteger /// [DataMember(Name = "enum_integer", EmitDefaultValue = false)] - public EnumIntegerEnum? EnumInteger { get; set; } + public Option EnumInteger { get; set; } /// /// Defines EnumIntegerOnly /// @@ -195,7 +196,7 @@ public enum EnumIntegerOnlyEnum /// Gets or Sets EnumIntegerOnly /// [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] - public EnumIntegerOnlyEnum? EnumIntegerOnly { get; set; } + public Option EnumIntegerOnly { get; set; } /// /// Defines EnumNumber /// @@ -220,31 +221,31 @@ public enum EnumNumberEnum /// Gets or Sets EnumNumber /// [DataMember(Name = "enum_number", EmitDefaultValue = false)] - public EnumNumberEnum? EnumNumber { get; set; } + public Option EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// [DataMember(Name = "outerEnum", EmitDefaultValue = true)] - public OuterEnum? OuterEnum { get; set; } + public Option OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] - public OuterEnumInteger? OuterEnumInteger { get; set; } + public Option OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } + public Option OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } + public Option OuterEnumIntegerDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -262,10 +263,10 @@ protected EnumTest() { } /// outerEnumInteger. /// outerEnumDefaultValue. /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumIntegerOnlyEnum? enumIntegerOnly = default(EnumIntegerOnlyEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) + public EnumTest(Option enumString = default(Option), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), Option enumInteger = default(Option), Option enumIntegerOnly = default(Option), Option enumNumber = default(Option), Option outerEnum = default(Option), Option outerEnumInteger = default(Option), Option outerEnumDefaultValue = default(Option), Option outerEnumIntegerDefaultValue = default(Option)) { - this.EnumStringRequired = enumStringRequired; this.EnumString = enumString; + this.EnumStringRequired = enumStringRequired; this.EnumInteger = enumInteger; this.EnumIntegerOnly = enumIntegerOnly; this.EnumNumber = enumNumber; @@ -328,7 +329,6 @@ public bool Equals(EnumTest input) } return ( - this.EnumString == input.EnumString || this.EnumString.Equals(input.EnumString) ) && ( @@ -336,31 +336,24 @@ public bool Equals(EnumTest input) this.EnumStringRequired.Equals(input.EnumStringRequired) ) && ( - this.EnumInteger == input.EnumInteger || this.EnumInteger.Equals(input.EnumInteger) ) && ( - this.EnumIntegerOnly == input.EnumIntegerOnly || this.EnumIntegerOnly.Equals(input.EnumIntegerOnly) ) && ( - this.EnumNumber == input.EnumNumber || this.EnumNumber.Equals(input.EnumNumber) ) && ( - this.OuterEnum == input.OuterEnum || this.OuterEnum.Equals(input.OuterEnum) ) && ( - this.OuterEnumInteger == input.OuterEnumInteger || this.OuterEnumInteger.Equals(input.OuterEnumInteger) ) && ( - this.OuterEnumDefaultValue == input.OuterEnumDefaultValue || this.OuterEnumDefaultValue.Equals(input.OuterEnumDefaultValue) ) && ( - this.OuterEnumIntegerDefaultValue == input.OuterEnumIntegerDefaultValue || this.OuterEnumIntegerDefaultValue.Equals(input.OuterEnumIntegerDefaultValue) ); } @@ -374,15 +367,39 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); + if (this.EnumString.IsSet) + { + hashCode = (hashCode * 59) + this.EnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); + if (this.EnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.EnumInteger.Value.GetHashCode(); + } + if (this.EnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.EnumIntegerOnly.Value.GetHashCode(); + } + if (this.EnumNumber.IsSet) + { + hashCode = (hashCode * 59) + this.EnumNumber.Value.GetHashCode(); + } + if (this.OuterEnum.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnum.Value.GetHashCode(); + } + if (this.OuterEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumInteger.Value.GetHashCode(); + } + if (this.OuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.OuterEnumIntegerDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index cf030583c11b..c547674274ea 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -42,17 +43,17 @@ protected EquilateralTriangle() { } /// triangleType (required). public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for EquilateralTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for EquilateralTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs index 0df50ba9b2f4..5eba6f1a9b7d 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class File : IEquatable /// Initializes a new instance of the class. /// /// Test capitalization. - public File(string sourceURI = default(string)) + public File(Option sourceURI = default(Option)) { + // to ensure "sourceURI" (not nullable) is not null + if (sourceURI.IsSet && sourceURI.Value == null) + { + throw new ArgumentNullException("sourceURI isn't a nullable property for File and cannot be null"); + } this.SourceURI = sourceURI; } @@ -44,7 +50,7 @@ public partial class File : IEquatable /// /// Test capitalization [DataMember(Name = "sourceURI", EmitDefaultValue = false)] - public string SourceURI { get; set; } + public Option SourceURI { get; set; } /// /// Returns the string presentation of the object @@ -91,9 +97,8 @@ public bool Equals(File input) } return ( - this.SourceURI == input.SourceURI || - (this.SourceURI != null && - this.SourceURI.Equals(input.SourceURI)) + + this.SourceURI.Equals(input.SourceURI) ); } @@ -106,9 +111,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SourceURI != null) + if (this.SourceURI.IsSet && this.SourceURI.Value != null) { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); + hashCode = (hashCode * 59) + this.SourceURI.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 388add47e631..328918597ea4 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -35,8 +36,18 @@ public partial class FileSchemaTestClass : IEquatable /// /// file. /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) + public FileSchemaTestClass(Option file = default(Option), Option> files = default(Option>)) { + // to ensure "file" (not nullable) is not null + if (file.IsSet && file.Value == null) + { + throw new ArgumentNullException("file isn't a nullable property for FileSchemaTestClass and cannot be null"); + } + // to ensure "files" (not nullable) is not null + if (files.IsSet && files.Value == null) + { + throw new ArgumentNullException("files isn't a nullable property for FileSchemaTestClass and cannot be null"); + } this.File = file; this.Files = files; } @@ -45,13 +56,13 @@ public partial class FileSchemaTestClass : IEquatable /// Gets or Sets File /// [DataMember(Name = "file", EmitDefaultValue = false)] - public File File { get; set; } + public Option File { get; set; } /// /// Gets or Sets Files /// [DataMember(Name = "files", EmitDefaultValue = false)] - public List Files { get; set; } + public Option> Files { get; set; } /// /// Returns the string presentation of the object @@ -99,15 +110,14 @@ public bool Equals(FileSchemaTestClass input) } return ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) + + this.File.Equals(input.File) ) && ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) + + this.Files.IsSet && this.Files.Value != null && + input.Files.IsSet && input.Files.Value != null && + this.Files.Value.SequenceEqual(input.Files.Value) ); } @@ -120,13 +130,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.File != null) + if (this.File.IsSet && this.File.Value != null) { - hashCode = (hashCode * 59) + this.File.GetHashCode(); + hashCode = (hashCode * 59) + this.File.Value.GetHashCode(); } - if (this.Files != null) + if (this.Files.IsSet && this.Files.Value != null) { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); + hashCode = (hashCode * 59) + this.Files.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 704abb101281..6c6616fde411 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,17 +35,21 @@ public partial class Foo : IEquatable /// Initializes a new instance of the class. /// /// bar (default to "bar"). - public Foo(string bar = @"bar") + public Foo(Option bar = default(Option)) { - // use default value if no "bar" provided - this.Bar = bar ?? @"bar"; + // to ensure "bar" (not nullable) is not null + if (bar.IsSet && bar.Value == null) + { + throw new ArgumentNullException("bar isn't a nullable property for Foo and cannot be null"); + } + this.Bar = bar.IsSet ? bar : new Option(@"bar"); } /// /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; set; } + public Option Bar { get; set; } /// /// Returns the string presentation of the object @@ -91,9 +96,8 @@ public bool Equals(Foo input) } return ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) + + this.Bar.Equals(input.Bar) ); } @@ -106,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 7e6349d03c81..9530801bb315 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class FooGetDefaultResponse : IEquatable /// Initializes a new instance of the class. /// /// varString. - public FooGetDefaultResponse(Foo varString = default(Foo)) + public FooGetDefaultResponse(Option varString = default(Option)) { + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FooGetDefaultResponse and cannot be null"); + } this.String = varString; } @@ -43,7 +49,7 @@ public partial class FooGetDefaultResponse : IEquatable /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public Foo String { get; set; } + public Option String { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(FooGetDefaultResponse input) } return ( - this.String == input.String || - (this.String != null && - this.String.Equals(input.String)) + + this.String.Equals(input.String) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.String != null) + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 58e9af3d2490..9c013a5413b9 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -57,34 +58,74 @@ protected FormatTest() { } /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(Option integer = default(Option), Option int32 = default(Option), Option unsignedInteger = default(Option), Option int64 = default(Option), Option unsignedLong = default(Option), decimal number = default(decimal), Option varFloat = default(Option), Option varDouble = default(Option), Option varDecimal = default(Option), Option varString = default(Option), byte[] varByte = default(byte[]), Option binary = default(Option), DateTime date = default(DateTime), Option dateTime = default(Option), Option uuid = default(Option), string password = default(string), Option patternWithDigits = default(Option), Option patternWithDigitsAndDelimiter = default(Option), Option patternWithBackslash = default(Option)) { - this.Number = number; - // to ensure "varByte" is required (not null) + // to ensure "varString" (not nullable) is not null + if (varString.IsSet && varString.Value == null) + { + throw new ArgumentNullException("varString isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "varByte" (not nullable) is not null if (varByte == null) { - throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("varByte isn't a nullable property for FormatTest and cannot be null"); } - this.Byte = varByte; - this.Date = date; - // to ensure "password" is required (not null) + // to ensure "binary" (not nullable) is not null + if (binary.IsSet && binary.Value == null) + { + throw new ArgumentNullException("binary isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "date" (not nullable) is not null + if (date == null) + { + throw new ArgumentNullException("date isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "password" (not nullable) is not null if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); + throw new ArgumentNullException("password isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigits" (not nullable) is not null + if (patternWithDigits.IsSet && patternWithDigits.Value == null) + { + throw new ArgumentNullException("patternWithDigits isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithDigitsAndDelimiter" (not nullable) is not null + if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) + { + throw new ArgumentNullException("patternWithDigitsAndDelimiter isn't a nullable property for FormatTest and cannot be null"); + } + // to ensure "patternWithBackslash" (not nullable) is not null + if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) + { + throw new ArgumentNullException("patternWithBackslash isn't a nullable property for FormatTest and cannot be null"); } - this.Password = password; this.Integer = integer; this.Int32 = int32; this.UnsignedInteger = unsignedInteger; this.Int64 = int64; this.UnsignedLong = unsignedLong; + this.Number = number; this.Float = varFloat; this.Double = varDouble; this.Decimal = varDecimal; this.String = varString; + this.Byte = varByte; this.Binary = binary; + this.Date = date; this.DateTime = dateTime; this.Uuid = uuid; + this.Password = password; this.PatternWithDigits = patternWithDigits; this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; this.PatternWithBackslash = patternWithBackslash; @@ -94,31 +135,31 @@ protected FormatTest() { } /// Gets or Sets Integer /// [DataMember(Name = "integer", EmitDefaultValue = false)] - public int Integer { get; set; } + public Option Integer { get; set; } /// /// Gets or Sets Int32 /// [DataMember(Name = "int32", EmitDefaultValue = false)] - public int Int32 { get; set; } + public Option Int32 { get; set; } /// /// Gets or Sets UnsignedInteger /// [DataMember(Name = "unsigned_integer", EmitDefaultValue = false)] - public uint UnsignedInteger { get; set; } + public Option UnsignedInteger { get; set; } /// /// Gets or Sets Int64 /// [DataMember(Name = "int64", EmitDefaultValue = false)] - public long Int64 { get; set; } + public Option Int64 { get; set; } /// /// Gets or Sets UnsignedLong /// [DataMember(Name = "unsigned_long", EmitDefaultValue = false)] - public ulong UnsignedLong { get; set; } + public Option UnsignedLong { get; set; } /// /// Gets or Sets Number @@ -130,25 +171,25 @@ protected FormatTest() { } /// Gets or Sets Float /// [DataMember(Name = "float", EmitDefaultValue = false)] - public float Float { get; set; } + public Option Float { get; set; } /// /// Gets or Sets Double /// [DataMember(Name = "double", EmitDefaultValue = false)] - public double Double { get; set; } + public Option Double { get; set; } /// /// Gets or Sets Decimal /// [DataMember(Name = "decimal", EmitDefaultValue = false)] - public decimal Decimal { get; set; } + public Option Decimal { get; set; } /// /// Gets or Sets String /// [DataMember(Name = "string", EmitDefaultValue = false)] - public string String { get; set; } + public Option String { get; set; } /// /// Gets or Sets Byte @@ -160,7 +201,7 @@ protected FormatTest() { } /// Gets or Sets Binary /// [DataMember(Name = "binary", EmitDefaultValue = false)] - public System.IO.Stream Binary { get; set; } + public Option Binary { get; set; } /// /// Gets or Sets Date @@ -175,14 +216,14 @@ protected FormatTest() { } /// /// 2007-12-03T10:15:30+01:00 [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Uuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Password @@ -195,21 +236,21 @@ protected FormatTest() { } /// /// A string that is a 10 digit number. Can have leading zeros. [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] - public string PatternWithDigits { get; set; } + public Option PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] - public string PatternWithDigitsAndDelimiter { get; set; } + public Option PatternWithDigitsAndDelimiter { get; set; } /// /// None /// /// None [DataMember(Name = "pattern_with_backslash", EmitDefaultValue = false)] - public string PatternWithBackslash { get; set; } + public Option PatternWithBackslash { get; set; } /// /// Returns the string presentation of the object @@ -274,23 +315,18 @@ public bool Equals(FormatTest input) } return ( - this.Integer == input.Integer || this.Integer.Equals(input.Integer) ) && ( - this.Int32 == input.Int32 || this.Int32.Equals(input.Int32) ) && ( - this.UnsignedInteger == input.UnsignedInteger || this.UnsignedInteger.Equals(input.UnsignedInteger) ) && ( - this.Int64 == input.Int64 || this.Int64.Equals(input.Int64) ) && ( - this.UnsignedLong == input.UnsignedLong || this.UnsignedLong.Equals(input.UnsignedLong) ) && ( @@ -298,21 +334,17 @@ public bool Equals(FormatTest input) this.Number.Equals(input.Number) ) && ( - this.Float == input.Float || this.Float.Equals(input.Float) ) && ( - this.Double == input.Double || this.Double.Equals(input.Double) ) && ( - this.Decimal == input.Decimal || this.Decimal.Equals(input.Decimal) ) && ( - this.String == input.String || - (this.String != null && - this.String.Equals(input.String)) + + this.String.Equals(input.String) ) && ( this.Byte == input.Byte || @@ -320,9 +352,8 @@ public bool Equals(FormatTest input) this.Byte.Equals(input.Byte)) ) && ( - this.Binary == input.Binary || - (this.Binary != null && - this.Binary.Equals(input.Binary)) + + this.Binary.Equals(input.Binary) ) && ( this.Date == input.Date || @@ -330,14 +361,12 @@ public bool Equals(FormatTest input) this.Date.Equals(input.Date)) ) && ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) + + this.DateTime.Equals(input.DateTime) ) && ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) + + this.Uuid.Equals(input.Uuid) ) && ( this.Password == input.Password || @@ -345,19 +374,16 @@ public bool Equals(FormatTest input) this.Password.Equals(input.Password)) ) && ( - this.PatternWithDigits == input.PatternWithDigits || - (this.PatternWithDigits != null && - this.PatternWithDigits.Equals(input.PatternWithDigits)) + + this.PatternWithDigits.Equals(input.PatternWithDigits) ) && ( - this.PatternWithDigitsAndDelimiter == input.PatternWithDigitsAndDelimiter || - (this.PatternWithDigitsAndDelimiter != null && - this.PatternWithDigitsAndDelimiter.Equals(input.PatternWithDigitsAndDelimiter)) + + this.PatternWithDigitsAndDelimiter.Equals(input.PatternWithDigitsAndDelimiter) ) && ( - this.PatternWithBackslash == input.PatternWithBackslash || - (this.PatternWithBackslash != null && - this.PatternWithBackslash.Equals(input.PatternWithBackslash)) + + this.PatternWithBackslash.Equals(input.PatternWithBackslash) ); } @@ -370,54 +396,78 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode(); + if (this.Integer.IsSet) + { + hashCode = (hashCode * 59) + this.Integer.Value.GetHashCode(); + } + if (this.Int32.IsSet) + { + hashCode = (hashCode * 59) + this.Int32.Value.GetHashCode(); + } + if (this.UnsignedInteger.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedInteger.Value.GetHashCode(); + } + if (this.Int64.IsSet) + { + hashCode = (hashCode * 59) + this.Int64.Value.GetHashCode(); + } + if (this.UnsignedLong.IsSet) + { + hashCode = (hashCode * 59) + this.UnsignedLong.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.Number.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) + if (this.Float.IsSet) + { + hashCode = (hashCode * 59) + this.Float.Value.GetHashCode(); + } + if (this.Double.IsSet) + { + hashCode = (hashCode * 59) + this.Double.Value.GetHashCode(); + } + if (this.Decimal.IsSet) + { + hashCode = (hashCode * 59) + this.Decimal.Value.GetHashCode(); + } + if (this.String.IsSet && this.String.Value != null) { - hashCode = (hashCode * 59) + this.String.GetHashCode(); + hashCode = (hashCode * 59) + this.String.Value.GetHashCode(); } if (this.Byte != null) { hashCode = (hashCode * 59) + this.Byte.GetHashCode(); } - if (this.Binary != null) + if (this.Binary.IsSet && this.Binary.Value != null) { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); + hashCode = (hashCode * 59) + this.Binary.Value.GetHashCode(); } if (this.Date != null) { hashCode = (hashCode * 59) + this.Date.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } if (this.Password != null) { hashCode = (hashCode * 59) + this.Password.GetHashCode(); } - if (this.PatternWithDigits != null) + if (this.PatternWithDigits.IsSet && this.PatternWithDigits.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigits.Value.GetHashCode(); } - if (this.PatternWithDigitsAndDelimiter != null) + if (this.PatternWithDigitsAndDelimiter.IsSet && this.PatternWithDigitsAndDelimiter.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.Value.GetHashCode(); } - if (this.PatternWithBackslash != null) + if (this.PatternWithBackslash.IsSet && this.PatternWithBackslash.Value != null) { - hashCode = (hashCode * 59) + this.PatternWithBackslash.GetHashCode(); + hashCode = (hashCode * 59) + this.PatternWithBackslash.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index 57ca71f8a5c8..7b4c3c7f600b 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs index 0b96c2fd9a7f..19cfde322822 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FruitReq.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index fa2a72f11857..2981e5a5104a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 0d7469e833e1..5b02d25b83d3 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,10 +42,10 @@ protected GrandparentAnimal() { } /// petType (required). public GrandparentAnimal(string petType = default(string)) { - // to ensure "petType" is required (not null) + // to ensure "petType" (not nullable) is not null if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); + throw new ArgumentNullException("petType isn't a nullable property for GrandparentAnimal and cannot be null"); } this.PetType = petType; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index a154d4ab7b5c..7eb55b8a1664 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -42,7 +43,7 @@ public HasOnlyReadOnly() /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -56,7 +57,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Foo /// [DataMember(Name = "foo", EmitDefaultValue = false)] - public string Foo { get; private set; } + public Option Foo { get; private set; } /// /// Returns false as Foo should not be serialized given that it's read-only. @@ -112,14 +113,12 @@ public bool Equals(HasOnlyReadOnly input) } return ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) + + this.Bar.Equals(input.Bar) ) && ( - this.Foo == input.Foo || - (this.Foo != null && - this.Foo.Equals(input.Foo)) + + this.Foo.Equals(input.Foo) ); } @@ -132,13 +131,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Foo != null) + if (this.Foo.IsSet && this.Foo.Value != null) { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); + hashCode = (hashCode * 59) + this.Foo.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index ddd6e7c6d5c2..1ed1c2a45c81 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,7 +35,7 @@ public partial class HealthCheckResult : IEquatable /// Initializes a new instance of the class. /// /// nullableMessage. - public HealthCheckResult(string nullableMessage = default(string)) + public HealthCheckResult(Option nullableMessage = default(Option)) { this.NullableMessage = nullableMessage; } @@ -43,7 +44,7 @@ public partial class HealthCheckResult : IEquatable /// Gets or Sets NullableMessage /// [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] - public string NullableMessage { get; set; } + public Option NullableMessage { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +91,8 @@ public bool Equals(HealthCheckResult input) } return ( - this.NullableMessage == input.NullableMessage || - (this.NullableMessage != null && - this.NullableMessage.Equals(input.NullableMessage)) + + this.NullableMessage.Equals(input.NullableMessage) ); } @@ -105,9 +105,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.NullableMessage != null) + if (this.NullableMessage.IsSet && this.NullableMessage.Value != null) { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); + hashCode = (hashCode * 59) + this.NullableMessage.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 0fa5290263fe..7442386e1112 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -42,17 +43,17 @@ protected IsoscelesTriangle() { } /// triangleType (required). public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for IsoscelesTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for IsoscelesTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs index bf43c9273f19..2b23003966a3 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class List : IEquatable /// Initializes a new instance of the class. /// /// var123List. - public List(string var123List = default(string)) + public List(Option var123List = default(Option)) { + // to ensure "var123List" (not nullable) is not null + if (var123List.IsSet && var123List.Value == null) + { + throw new ArgumentNullException("var123List isn't a nullable property for List and cannot be null"); + } this.Var123List = var123List; } @@ -43,7 +49,7 @@ public partial class List : IEquatable /// Gets or Sets Var123List /// [DataMember(Name = "123-list", EmitDefaultValue = false)] - public string Var123List { get; set; } + public Option Var123List { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(List input) } return ( - this.Var123List == input.Var123List || - (this.Var123List != null && - this.Var123List.Equals(input.Var123List)) + + this.Var123List.Equals(input.Var123List) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Var123List != null) + if (this.Var123List.IsSet && this.Var123List.Value != null) { - hashCode = (hashCode * 59) + this.Var123List.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123List.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index fdca36d43a8c..9a15c8a66079 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -35,25 +36,33 @@ public partial class LiteralStringClass : IEquatable /// /// escapedLiteralString (default to "C:\\Users\\username"). /// unescapedLiteralString (default to "C:\Users\username"). - public LiteralStringClass(string escapedLiteralString = @"C:\\Users\\username", string unescapedLiteralString = @"C:\Users\username") + public LiteralStringClass(Option escapedLiteralString = default(Option), Option unescapedLiteralString = default(Option)) { - // use default value if no "escapedLiteralString" provided - this.EscapedLiteralString = escapedLiteralString ?? @"C:\\Users\\username"; - // use default value if no "unescapedLiteralString" provided - this.UnescapedLiteralString = unescapedLiteralString ?? @"C:\Users\username"; + // to ensure "escapedLiteralString" (not nullable) is not null + if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) + { + throw new ArgumentNullException("escapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + // to ensure "unescapedLiteralString" (not nullable) is not null + if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) + { + throw new ArgumentNullException("unescapedLiteralString isn't a nullable property for LiteralStringClass and cannot be null"); + } + this.EscapedLiteralString = escapedLiteralString.IsSet ? escapedLiteralString : new Option(@"C:\\Users\\username"); + this.UnescapedLiteralString = unescapedLiteralString.IsSet ? unescapedLiteralString : new Option(@"C:\Users\username"); } /// /// Gets or Sets EscapedLiteralString /// [DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)] - public string EscapedLiteralString { get; set; } + public Option EscapedLiteralString { get; set; } /// /// Gets or Sets UnescapedLiteralString /// [DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)] - public string UnescapedLiteralString { get; set; } + public Option UnescapedLiteralString { get; set; } /// /// Returns the string presentation of the object @@ -101,14 +110,12 @@ public bool Equals(LiteralStringClass input) } return ( - this.EscapedLiteralString == input.EscapedLiteralString || - (this.EscapedLiteralString != null && - this.EscapedLiteralString.Equals(input.EscapedLiteralString)) + + this.EscapedLiteralString.Equals(input.EscapedLiteralString) ) && ( - this.UnescapedLiteralString == input.UnescapedLiteralString || - (this.UnescapedLiteralString != null && - this.UnescapedLiteralString.Equals(input.UnescapedLiteralString)) + + this.UnescapedLiteralString.Equals(input.UnescapedLiteralString) ); } @@ -121,13 +128,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.EscapedLiteralString != null) + if (this.EscapedLiteralString.IsSet && this.EscapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.EscapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.EscapedLiteralString.Value.GetHashCode(); } - if (this.UnescapedLiteralString != null) + if (this.UnescapedLiteralString.IsSet && this.UnescapedLiteralString.Value != null) { - hashCode = (hashCode * 59) + this.UnescapedLiteralString.GetHashCode(); + hashCode = (hashCode * 59) + this.UnescapedLiteralString.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 7510f4a229b4..83b4db34585f 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index f864601a1a5c..f00bcc5d3a5d 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -56,8 +57,28 @@ public enum InnerEnum /// mapOfEnumString. /// directMap. /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + public MapTest(Option>> mapMapOfString = default(Option>>), Option> mapOfEnumString = default(Option>), Option> directMap = default(Option>), Option> indirectMap = default(Option>)) { + // to ensure "mapMapOfString" (not nullable) is not null + if (mapMapOfString.IsSet && mapMapOfString.Value == null) + { + throw new ArgumentNullException("mapMapOfString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "mapOfEnumString" (not nullable) is not null + if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) + { + throw new ArgumentNullException("mapOfEnumString isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "directMap" (not nullable) is not null + if (directMap.IsSet && directMap.Value == null) + { + throw new ArgumentNullException("directMap isn't a nullable property for MapTest and cannot be null"); + } + // to ensure "indirectMap" (not nullable) is not null + if (indirectMap.IsSet && indirectMap.Value == null) + { + throw new ArgumentNullException("indirectMap isn't a nullable property for MapTest and cannot be null"); + } this.MapMapOfString = mapMapOfString; this.MapOfEnumString = mapOfEnumString; this.DirectMap = directMap; @@ -68,25 +89,25 @@ public enum InnerEnum /// Gets or Sets MapMapOfString /// [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] - public Dictionary> MapMapOfString { get; set; } + public Option>> MapMapOfString { get; set; } /// /// Gets or Sets MapOfEnumString /// [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] - public Dictionary MapOfEnumString { get; set; } + public Option> MapOfEnumString { get; set; } /// /// Gets or Sets DirectMap /// [DataMember(Name = "direct_map", EmitDefaultValue = false)] - public Dictionary DirectMap { get; set; } + public Option> DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// [DataMember(Name = "indirect_map", EmitDefaultValue = false)] - public Dictionary IndirectMap { get; set; } + public Option> IndirectMap { get; set; } /// /// Returns the string presentation of the object @@ -136,28 +157,28 @@ public bool Equals(MapTest input) } return ( - this.MapMapOfString == input.MapMapOfString || - this.MapMapOfString != null && - input.MapMapOfString != null && - this.MapMapOfString.SequenceEqual(input.MapMapOfString) + + this.MapMapOfString.IsSet && this.MapMapOfString.Value != null && + input.MapMapOfString.IsSet && input.MapMapOfString.Value != null && + this.MapMapOfString.Value.SequenceEqual(input.MapMapOfString.Value) ) && ( - this.MapOfEnumString == input.MapOfEnumString || - this.MapOfEnumString != null && - input.MapOfEnumString != null && - this.MapOfEnumString.SequenceEqual(input.MapOfEnumString) + + this.MapOfEnumString.IsSet && this.MapOfEnumString.Value != null && + input.MapOfEnumString.IsSet && input.MapOfEnumString.Value != null && + this.MapOfEnumString.Value.SequenceEqual(input.MapOfEnumString.Value) ) && ( - this.DirectMap == input.DirectMap || - this.DirectMap != null && - input.DirectMap != null && - this.DirectMap.SequenceEqual(input.DirectMap) + + this.DirectMap.IsSet && this.DirectMap.Value != null && + input.DirectMap.IsSet && input.DirectMap.Value != null && + this.DirectMap.Value.SequenceEqual(input.DirectMap.Value) ) && ( - this.IndirectMap == input.IndirectMap || - this.IndirectMap != null && - input.IndirectMap != null && - this.IndirectMap.SequenceEqual(input.IndirectMap) + + this.IndirectMap.IsSet && this.IndirectMap.Value != null && + input.IndirectMap.IsSet && input.IndirectMap.Value != null && + this.IndirectMap.Value.SequenceEqual(input.IndirectMap.Value) ); } @@ -170,21 +191,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.MapMapOfString != null) + if (this.MapMapOfString.IsSet && this.MapMapOfString.Value != null) { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapMapOfString.Value.GetHashCode(); } - if (this.MapOfEnumString != null) + if (this.MapOfEnumString.IsSet && this.MapOfEnumString.Value != null) { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); + hashCode = (hashCode * 59) + this.MapOfEnumString.Value.GetHashCode(); } - if (this.DirectMap != null) + if (this.DirectMap.IsSet && this.DirectMap.Value != null) { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.DirectMap.Value.GetHashCode(); } - if (this.IndirectMap != null) + if (this.IndirectMap.IsSet && this.IndirectMap.Value != null) { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); + hashCode = (hashCode * 59) + this.IndirectMap.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs index dfc02b8315c4..c525fea244cf 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -70,23 +71,138 @@ protected MixLog() { } /// ProductId is only required for color mixes. /// ProductName is only required for color mixes. /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) + public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Option shopId = default(Option), Option totalPrice = default(Option), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), Option someCode = default(Option), Option batchNumber = default(Option), Option brandCode = default(Option), Option brandId = default(Option), Option brandName = default(Option), Option categoryCode = default(Option), Option color = default(Option), Option colorDescription = default(Option), Option comment = default(Option), Option commercialProductCode = default(Option), Option productLineCode = default(Option), Option country = default(Option), Option createdBy = default(Option), Option createdByFirstName = default(Option), Option createdByLastName = default(Option), Option deltaECalculationRepaired = default(Option), Option deltaECalculationSprayout = default(Option), Option ownColorVariantNumber = default(Option), Option primerProductId = default(Option), Option productId = default(Option), Option productName = default(Option), Option selectedVersionIndex = default(Option)) { - this.Id = id; - // to ensure "description" is required (not null) + // to ensure "id" (not nullable) is not null + if (id == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "description" (not nullable) is not null if (description == null) { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); + throw new ArgumentNullException("description isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "mixDate" (not nullable) is not null + if (mixDate == null) + { + throw new ArgumentNullException("mixDate isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "shopId" (not nullable) is not null + if (shopId.IsSet && shopId.Value == null) + { + throw new ArgumentNullException("shopId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "formulaVersionDate" (not nullable) is not null + if (formulaVersionDate == null) + { + throw new ArgumentNullException("formulaVersionDate isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "batchNumber" (not nullable) is not null + if (batchNumber.IsSet && batchNumber.Value == null) + { + throw new ArgumentNullException("batchNumber isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandCode" (not nullable) is not null + if (brandCode.IsSet && brandCode.Value == null) + { + throw new ArgumentNullException("brandCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandId" (not nullable) is not null + if (brandId.IsSet && brandId.Value == null) + { + throw new ArgumentNullException("brandId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "brandName" (not nullable) is not null + if (brandName.IsSet && brandName.Value == null) + { + throw new ArgumentNullException("brandName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "categoryCode" (not nullable) is not null + if (categoryCode.IsSet && categoryCode.Value == null) + { + throw new ArgumentNullException("categoryCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "color" (not nullable) is not null + if (color.IsSet && color.Value == null) + { + throw new ArgumentNullException("color isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "colorDescription" (not nullable) is not null + if (colorDescription.IsSet && colorDescription.Value == null) + { + throw new ArgumentNullException("colorDescription isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "comment" (not nullable) is not null + if (comment.IsSet && comment.Value == null) + { + throw new ArgumentNullException("comment isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "commercialProductCode" (not nullable) is not null + if (commercialProductCode.IsSet && commercialProductCode.Value == null) + { + throw new ArgumentNullException("commercialProductCode isn't a nullable property for MixLog and cannot be null"); } + // to ensure "productLineCode" (not nullable) is not null + if (productLineCode.IsSet && productLineCode.Value == null) + { + throw new ArgumentNullException("productLineCode isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "country" (not nullable) is not null + if (country.IsSet && country.Value == null) + { + throw new ArgumentNullException("country isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdBy" (not nullable) is not null + if (createdBy.IsSet && createdBy.Value == null) + { + throw new ArgumentNullException("createdBy isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdByFirstName" (not nullable) is not null + if (createdByFirstName.IsSet && createdByFirstName.Value == null) + { + throw new ArgumentNullException("createdByFirstName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "createdByLastName" (not nullable) is not null + if (createdByLastName.IsSet && createdByLastName.Value == null) + { + throw new ArgumentNullException("createdByLastName isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "deltaECalculationRepaired" (not nullable) is not null + if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) + { + throw new ArgumentNullException("deltaECalculationRepaired isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "deltaECalculationSprayout" (not nullable) is not null + if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) + { + throw new ArgumentNullException("deltaECalculationSprayout isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "primerProductId" (not nullable) is not null + if (primerProductId.IsSet && primerProductId.Value == null) + { + throw new ArgumentNullException("primerProductId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "productId" (not nullable) is not null + if (productId.IsSet && productId.Value == null) + { + throw new ArgumentNullException("productId isn't a nullable property for MixLog and cannot be null"); + } + // to ensure "productName" (not nullable) is not null + if (productName.IsSet && productName.Value == null) + { + throw new ArgumentNullException("productName isn't a nullable property for MixLog and cannot be null"); + } + this.Id = id; this.Description = description; this.MixDate = mixDate; + this.ShopId = shopId; + this.TotalPrice = totalPrice; this.TotalRecalculations = totalRecalculations; this.TotalOverPoors = totalOverPoors; this.TotalSkips = totalSkips; this.TotalUnderPours = totalUnderPours; this.FormulaVersionDate = formulaVersionDate; - this.ShopId = shopId; - this.TotalPrice = totalPrice; this.SomeCode = someCode; this.BatchNumber = batchNumber; this.BrandCode = brandCode; @@ -133,13 +249,13 @@ protected MixLog() { } /// Gets or Sets ShopId /// [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId { get; set; } + public Option ShopId { get; set; } /// /// Gets or Sets TotalPrice /// [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice { get; set; } + public Option TotalPrice { get; set; } /// /// Gets or Sets TotalRecalculations @@ -176,141 +292,141 @@ protected MixLog() { } /// /// SomeCode is only required for color mixes [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode { get; set; } + public Option SomeCode { get; set; } /// /// Gets or Sets BatchNumber /// [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber { get; set; } + public Option BatchNumber { get; set; } /// /// BrandCode is only required for non-color mixes /// /// BrandCode is only required for non-color mixes [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode { get; set; } + public Option BrandCode { get; set; } /// /// BrandId is only required for color mixes /// /// BrandId is only required for color mixes [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId { get; set; } + public Option BrandId { get; set; } /// /// BrandName is only required for color mixes /// /// BrandName is only required for color mixes [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName { get; set; } + public Option BrandName { get; set; } /// /// CategoryCode is not used anymore /// /// CategoryCode is not used anymore [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode { get; set; } + public Option CategoryCode { get; set; } /// /// Color is only required for color mixes /// /// Color is only required for color mixes [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } + public Option Color { get; set; } /// /// Gets or Sets ColorDescription /// [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription { get; set; } + public Option ColorDescription { get; set; } /// /// Gets or Sets Comment /// [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment { get; set; } + public Option Comment { get; set; } /// /// Gets or Sets CommercialProductCode /// [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode { get; set; } + public Option CommercialProductCode { get; set; } /// /// ProductLineCode is only required for color mixes /// /// ProductLineCode is only required for color mixes [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode { get; set; } + public Option ProductLineCode { get; set; } /// /// Gets or Sets Country /// [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } + public Option Country { get; set; } /// /// Gets or Sets CreatedBy /// [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy { get; set; } + public Option CreatedBy { get; set; } /// /// Gets or Sets CreatedByFirstName /// [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName { get; set; } + public Option CreatedByFirstName { get; set; } /// /// Gets or Sets CreatedByLastName /// [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName { get; set; } + public Option CreatedByLastName { get; set; } /// /// Gets or Sets DeltaECalculationRepaired /// [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired { get; set; } + public Option DeltaECalculationRepaired { get; set; } /// /// Gets or Sets DeltaECalculationSprayout /// [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout { get; set; } + public Option DeltaECalculationSprayout { get; set; } /// /// Gets or Sets OwnColorVariantNumber /// [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber { get; set; } + public Option OwnColorVariantNumber { get; set; } /// /// Gets or Sets PrimerProductId /// [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId { get; set; } + public Option PrimerProductId { get; set; } /// /// ProductId is only required for color mixes /// /// ProductId is only required for color mixes [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId { get; set; } + public Option ProductId { get; set; } /// /// ProductName is only required for color mixes /// /// ProductName is only required for color mixes [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName { get; set; } + public Option ProductName { get; set; } /// /// Gets or Sets SelectedVersionIndex /// [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex { get; set; } + public Option SelectedVersionIndex { get; set; } /// /// Returns the string presentation of the object @@ -403,14 +519,11 @@ public bool Equals(MixLog input) this.MixDate.Equals(input.MixDate)) ) && ( - this.ShopId == input.ShopId || - (this.ShopId != null && - this.ShopId.Equals(input.ShopId)) + + this.ShopId.Equals(input.ShopId) ) && ( - this.TotalPrice == input.TotalPrice || - (this.TotalPrice != null && - this.TotalPrice.Equals(input.TotalPrice)) + this.TotalPrice.Equals(input.TotalPrice) ) && ( this.TotalRecalculations == input.TotalRecalculations || @@ -434,112 +547,89 @@ public bool Equals(MixLog input) this.FormulaVersionDate.Equals(input.FormulaVersionDate)) ) && ( - this.SomeCode == input.SomeCode || - (this.SomeCode != null && - this.SomeCode.Equals(input.SomeCode)) + + this.SomeCode.Equals(input.SomeCode) ) && ( - this.BatchNumber == input.BatchNumber || - (this.BatchNumber != null && - this.BatchNumber.Equals(input.BatchNumber)) + + this.BatchNumber.Equals(input.BatchNumber) ) && ( - this.BrandCode == input.BrandCode || - (this.BrandCode != null && - this.BrandCode.Equals(input.BrandCode)) + + this.BrandCode.Equals(input.BrandCode) ) && ( - this.BrandId == input.BrandId || - (this.BrandId != null && - this.BrandId.Equals(input.BrandId)) + + this.BrandId.Equals(input.BrandId) ) && ( - this.BrandName == input.BrandName || - (this.BrandName != null && - this.BrandName.Equals(input.BrandName)) + + this.BrandName.Equals(input.BrandName) ) && ( - this.CategoryCode == input.CategoryCode || - (this.CategoryCode != null && - this.CategoryCode.Equals(input.CategoryCode)) + + this.CategoryCode.Equals(input.CategoryCode) ) && ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) + + this.Color.Equals(input.Color) ) && ( - this.ColorDescription == input.ColorDescription || - (this.ColorDescription != null && - this.ColorDescription.Equals(input.ColorDescription)) + + this.ColorDescription.Equals(input.ColorDescription) ) && ( - this.Comment == input.Comment || - (this.Comment != null && - this.Comment.Equals(input.Comment)) + + this.Comment.Equals(input.Comment) ) && ( - this.CommercialProductCode == input.CommercialProductCode || - (this.CommercialProductCode != null && - this.CommercialProductCode.Equals(input.CommercialProductCode)) + + this.CommercialProductCode.Equals(input.CommercialProductCode) ) && ( - this.ProductLineCode == input.ProductLineCode || - (this.ProductLineCode != null && - this.ProductLineCode.Equals(input.ProductLineCode)) + + this.ProductLineCode.Equals(input.ProductLineCode) ) && ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) + + this.Country.Equals(input.Country) ) && ( - this.CreatedBy == input.CreatedBy || - (this.CreatedBy != null && - this.CreatedBy.Equals(input.CreatedBy)) + + this.CreatedBy.Equals(input.CreatedBy) ) && ( - this.CreatedByFirstName == input.CreatedByFirstName || - (this.CreatedByFirstName != null && - this.CreatedByFirstName.Equals(input.CreatedByFirstName)) + + this.CreatedByFirstName.Equals(input.CreatedByFirstName) ) && ( - this.CreatedByLastName == input.CreatedByLastName || - (this.CreatedByLastName != null && - this.CreatedByLastName.Equals(input.CreatedByLastName)) + + this.CreatedByLastName.Equals(input.CreatedByLastName) ) && ( - this.DeltaECalculationRepaired == input.DeltaECalculationRepaired || - (this.DeltaECalculationRepaired != null && - this.DeltaECalculationRepaired.Equals(input.DeltaECalculationRepaired)) + + this.DeltaECalculationRepaired.Equals(input.DeltaECalculationRepaired) ) && ( - this.DeltaECalculationSprayout == input.DeltaECalculationSprayout || - (this.DeltaECalculationSprayout != null && - this.DeltaECalculationSprayout.Equals(input.DeltaECalculationSprayout)) + + this.DeltaECalculationSprayout.Equals(input.DeltaECalculationSprayout) ) && ( - this.OwnColorVariantNumber == input.OwnColorVariantNumber || - (this.OwnColorVariantNumber != null && - this.OwnColorVariantNumber.Equals(input.OwnColorVariantNumber)) + this.OwnColorVariantNumber.Equals(input.OwnColorVariantNumber) ) && ( - this.PrimerProductId == input.PrimerProductId || - (this.PrimerProductId != null && - this.PrimerProductId.Equals(input.PrimerProductId)) + + this.PrimerProductId.Equals(input.PrimerProductId) ) && ( - this.ProductId == input.ProductId || - (this.ProductId != null && - this.ProductId.Equals(input.ProductId)) + + this.ProductId.Equals(input.ProductId) ) && ( - this.ProductName == input.ProductName || - (this.ProductName != null && - this.ProductName.Equals(input.ProductName)) + + this.ProductName.Equals(input.ProductName) ) && ( - this.SelectedVersionIndex == input.SelectedVersionIndex || this.SelectedVersionIndex.Equals(input.SelectedVersionIndex) ); } @@ -565,13 +655,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); } - if (this.ShopId != null) + if (this.ShopId.IsSet && this.ShopId.Value != null) { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); + hashCode = (hashCode * 59) + this.ShopId.Value.GetHashCode(); } - if (this.TotalPrice != null) + if (this.TotalPrice.IsSet) { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPrice.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); @@ -581,91 +671,94 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); } - if (this.SomeCode != null) + if (this.SomeCode.IsSet && this.SomeCode.Value != null) + { + hashCode = (hashCode * 59) + this.SomeCode.Value.GetHashCode(); + } + if (this.BatchNumber.IsSet && this.BatchNumber.Value != null) { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); + hashCode = (hashCode * 59) + this.BatchNumber.Value.GetHashCode(); } - if (this.BatchNumber != null) + if (this.BrandCode.IsSet && this.BrandCode.Value != null) { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandCode.Value.GetHashCode(); } - if (this.BrandCode != null) + if (this.BrandId.IsSet && this.BrandId.Value != null) { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandId.Value.GetHashCode(); } - if (this.BrandId != null) + if (this.BrandName.IsSet && this.BrandName.Value != null) { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); + hashCode = (hashCode * 59) + this.BrandName.Value.GetHashCode(); } - if (this.BrandName != null) + if (this.CategoryCode.IsSet && this.CategoryCode.Value != null) { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); + hashCode = (hashCode * 59) + this.CategoryCode.Value.GetHashCode(); } - if (this.CategoryCode != null) + if (this.Color.IsSet && this.Color.Value != null) { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); + hashCode = (hashCode * 59) + this.Color.Value.GetHashCode(); } - if (this.Color != null) + if (this.ColorDescription.IsSet && this.ColorDescription.Value != null) { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); + hashCode = (hashCode * 59) + this.ColorDescription.Value.GetHashCode(); } - if (this.ColorDescription != null) + if (this.Comment.IsSet && this.Comment.Value != null) { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); + hashCode = (hashCode * 59) + this.Comment.Value.GetHashCode(); } - if (this.Comment != null) + if (this.CommercialProductCode.IsSet && this.CommercialProductCode.Value != null) { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); + hashCode = (hashCode * 59) + this.CommercialProductCode.Value.GetHashCode(); } - if (this.CommercialProductCode != null) + if (this.ProductLineCode.IsSet && this.ProductLineCode.Value != null) { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductLineCode.Value.GetHashCode(); } - if (this.ProductLineCode != null) + if (this.Country.IsSet && this.Country.Value != null) { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); + hashCode = (hashCode * 59) + this.Country.Value.GetHashCode(); } - if (this.Country != null) + if (this.CreatedBy.IsSet && this.CreatedBy.Value != null) { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedBy.Value.GetHashCode(); } - if (this.CreatedBy != null) + if (this.CreatedByFirstName.IsSet && this.CreatedByFirstName.Value != null) { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedByFirstName.Value.GetHashCode(); } - if (this.CreatedByFirstName != null) + if (this.CreatedByLastName.IsSet && this.CreatedByLastName.Value != null) { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.CreatedByLastName.Value.GetHashCode(); } - if (this.CreatedByLastName != null) + if (this.DeltaECalculationRepaired.IsSet && this.DeltaECalculationRepaired.Value != null) { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); + hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.Value.GetHashCode(); } - if (this.DeltaECalculationRepaired != null) + if (this.DeltaECalculationSprayout.IsSet && this.DeltaECalculationSprayout.Value != null) { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); + hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.Value.GetHashCode(); } - if (this.DeltaECalculationSprayout != null) + if (this.OwnColorVariantNumber.IsSet) { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); + hashCode = (hashCode * 59) + this.OwnColorVariantNumber.Value.GetHashCode(); } - if (this.OwnColorVariantNumber != null) + if (this.PrimerProductId.IsSet && this.PrimerProductId.Value != null) { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.PrimerProductId.Value.GetHashCode(); } - if (this.PrimerProductId != null) + if (this.ProductId.IsSet && this.ProductId.Value != null) { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductId.Value.GetHashCode(); } - if (this.ProductId != null) + if (this.ProductName.IsSet && this.ProductName.Value != null) { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); + hashCode = (hashCode * 59) + this.ProductName.Value.GetHashCode(); } - if (this.ProductName != null) + if (this.SelectedVersionIndex.IsSet) { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); + hashCode = (hashCode * 59) + this.SelectedVersionIndex.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index df5cd66f3738..b43e4efd8996 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class MixedAnyOf : IEquatable /// Initializes a new instance of the class. /// /// content. - public MixedAnyOf(MixedAnyOfContent content = default(MixedAnyOfContent)) + public MixedAnyOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedAnyOf and cannot be null"); + } this.Content = content; } @@ -43,7 +49,7 @@ public partial class MixedAnyOf : IEquatable /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedAnyOfContent Content { get; set; } + public Option Content { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(MixedAnyOf input) } return ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) + + this.Content.Equals(input.Content) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs index 7a79e22bec74..a880f56da5cd 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOfContent.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index 2ef6c97e8f37..15ac8a1e916c 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class MixedOneOf : IEquatable /// Initializes a new instance of the class. /// /// content. - public MixedOneOf(MixedOneOfContent content = default(MixedOneOfContent)) + public MixedOneOf(Option content = default(Option)) { + // to ensure "content" (not nullable) is not null + if (content.IsSet && content.Value == null) + { + throw new ArgumentNullException("content isn't a nullable property for MixedOneOf and cannot be null"); + } this.Content = content; } @@ -43,7 +49,7 @@ public partial class MixedOneOf : IEquatable /// Gets or Sets Content /// [DataMember(Name = "content", EmitDefaultValue = false)] - public MixedOneOfContent Content { get; set; } + public Option Content { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(MixedOneOf input) } return ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) + + this.Content.Equals(input.Content) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Content != null) + if (this.Content.IsSet && this.Content.Value != null) { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); + hashCode = (hashCode * 59) + this.Content.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs index 316352a3fed0..6b50b73d839a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOfContent.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 521d350a9cee..368e42264537 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,28 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatableuuid. /// dateTime. /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuidWithPattern = default(Guid), Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) + public MixedPropertiesAndAdditionalPropertiesClass(Option uuidWithPattern = default(Option), Option uuid = default(Option), Option dateTime = default(Option), Option> map = default(Option>)) { + // to ensure "uuidWithPattern" (not nullable) is not null + if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) + { + throw new ArgumentNullException("uuidWithPattern isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "dateTime" (not nullable) is not null + if (dateTime.IsSet && dateTime.Value == null) + { + throw new ArgumentNullException("dateTime isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } + // to ensure "map" (not nullable) is not null + if (map.IsSet && map.Value == null) + { + throw new ArgumentNullException("map isn't a nullable property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null"); + } this.UuidWithPattern = uuidWithPattern; this.Uuid = uuid; this.DateTime = dateTime; @@ -49,25 +70,25 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable [DataMember(Name = "uuid_with_pattern", EmitDefaultValue = false)] - public Guid UuidWithPattern { get; set; } + public Option UuidWithPattern { get; set; } /// /// Gets or Sets Uuid /// [DataMember(Name = "uuid", EmitDefaultValue = false)] - public Guid Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets DateTime /// [DataMember(Name = "dateTime", EmitDefaultValue = false)] - public DateTime DateTime { get; set; } + public Option DateTime { get; set; } /// /// Gets or Sets Map /// [DataMember(Name = "map", EmitDefaultValue = false)] - public Dictionary Map { get; set; } + public Option> Map { get; set; } /// /// Returns the string presentation of the object @@ -117,25 +138,22 @@ public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) } return ( - this.UuidWithPattern == input.UuidWithPattern || - (this.UuidWithPattern != null && - this.UuidWithPattern.Equals(input.UuidWithPattern)) + + this.UuidWithPattern.Equals(input.UuidWithPattern) ) && ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) + + this.Uuid.Equals(input.Uuid) ) && ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) + + this.DateTime.Equals(input.DateTime) ) && ( - this.Map == input.Map || - this.Map != null && - input.Map != null && - this.Map.SequenceEqual(input.Map) + + this.Map.IsSet && this.Map.Value != null && + input.Map.IsSet && input.Map.Value != null && + this.Map.Value.SequenceEqual(input.Map.Value) ); } @@ -148,21 +166,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.UuidWithPattern != null) + if (this.UuidWithPattern.IsSet && this.UuidWithPattern.Value != null) { - hashCode = (hashCode * 59) + this.UuidWithPattern.GetHashCode(); + hashCode = (hashCode * 59) + this.UuidWithPattern.Value.GetHashCode(); } - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } - if (this.DateTime != null) + if (this.DateTime.IsSet && this.DateTime.Value != null) { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); + hashCode = (hashCode * 59) + this.DateTime.Value.GetHashCode(); } - if (this.Map != null) + if (this.Map.IsSet && this.Map.Value != null) { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); + hashCode = (hashCode * 59) + this.Map.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 894e1aa8e13b..52eaa61d304f 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class MixedSubId : IEquatable /// Initializes a new instance of the class. /// /// id. - public MixedSubId(string id = default(string)) + public MixedSubId(Option id = default(Option)) { + // to ensure "id" (not nullable) is not null + if (id.IsSet && id.Value == null) + { + throw new ArgumentNullException("id isn't a nullable property for MixedSubId and cannot be null"); + } this.Id = id; } @@ -43,7 +49,7 @@ public partial class MixedSubId : IEquatable /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } + public Option Id { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(MixedSubId input) } return ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) + + this.Id.Equals(input.Id) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Id != null) + if (this.Id.IsSet && this.Id.Value != null) { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index 5ebae913605a..3d792ce6dfb2 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -35,8 +36,13 @@ public partial class Model200Response : IEquatable /// /// name. /// varClass. - public Model200Response(int name = default(int), string varClass = default(string)) + public Model200Response(Option name = default(Option), Option varClass = default(Option)) { + // to ensure "varClass" (not nullable) is not null + if (varClass.IsSet && varClass.Value == null) + { + throw new ArgumentNullException("varClass isn't a nullable property for Model200Response and cannot be null"); + } this.Name = name; this.Class = varClass; } @@ -45,13 +51,13 @@ public partial class Model200Response : IEquatable /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public int Name { get; set; } + public Option Name { get; set; } /// /// Gets or Sets Class /// [DataMember(Name = "class", EmitDefaultValue = false)] - public string Class { get; set; } + public Option Class { get; set; } /// /// Returns the string presentation of the object @@ -99,13 +105,11 @@ public bool Equals(Model200Response input) } return ( - this.Name == input.Name || this.Name.Equals(input.Name) ) && ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) + + this.Class.Equals(input.Class) ); } @@ -118,10 +122,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) + if (this.Name.IsSet) + { + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); + } + if (this.Class.IsSet && this.Class.Value != null) { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); + hashCode = (hashCode * 59) + this.Class.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 1c78687d9c6d..886afad37b2b 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class ModelClient : IEquatable /// Initializes a new instance of the class. /// /// varClient. - public ModelClient(string varClient = default(string)) + public ModelClient(Option varClient = default(Option)) { + // to ensure "varClient" (not nullable) is not null + if (varClient.IsSet && varClient.Value == null) + { + throw new ArgumentNullException("varClient isn't a nullable property for ModelClient and cannot be null"); + } this.VarClient = varClient; } @@ -43,7 +49,7 @@ public partial class ModelClient : IEquatable /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public string VarClient { get; set; } + public Option VarClient { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(ModelClient input) } return ( - this.VarClient == input.VarClient || - (this.VarClient != null && - this.VarClient.Equals(input.VarClient)) + + this.VarClient.Equals(input.VarClient) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.VarClient != null) + if (this.VarClient.IsSet && this.VarClient.Value != null) { - hashCode = (hashCode * 59) + this.VarClient.GetHashCode(); + hashCode = (hashCode * 59) + this.VarClient.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs index 12d0eca05173..de6bab58bf98 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -40,8 +41,13 @@ protected Name() { } /// /// varName (required). /// property. - public Name(int varName = default(int), string property = default(string)) + public Name(int varName = default(int), Option property = default(Option)) { + // to ensure "property" (not nullable) is not null + if (property.IsSet && property.Value == null) + { + throw new ArgumentNullException("property isn't a nullable property for Name and cannot be null"); + } this.VarName = varName; this.Property = property; } @@ -56,7 +62,7 @@ protected Name() { } /// Gets or Sets SnakeCase /// [DataMember(Name = "snake_case", EmitDefaultValue = false)] - public int SnakeCase { get; private set; } + public Option SnakeCase { get; private set; } /// /// Returns false as SnakeCase should not be serialized given that it's read-only. @@ -70,13 +76,13 @@ public bool ShouldSerializeSnakeCase() /// Gets or Sets Property /// [DataMember(Name = "property", EmitDefaultValue = false)] - public string Property { get; set; } + public Option Property { get; set; } /// /// Gets or Sets Var123Number /// [DataMember(Name = "123Number", EmitDefaultValue = false)] - public int Var123Number { get; private set; } + public Option Var123Number { get; private set; } /// /// Returns false as Var123Number should not be serialized given that it's read-only. @@ -138,16 +144,13 @@ public bool Equals(Name input) this.VarName.Equals(input.VarName) ) && ( - this.SnakeCase == input.SnakeCase || this.SnakeCase.Equals(input.SnakeCase) ) && ( - this.Property == input.Property || - (this.Property != null && - this.Property.Equals(input.Property)) + + this.Property.Equals(input.Property) ) && ( - this.Var123Number == input.Var123Number || this.Var123Number.Equals(input.Var123Number) ); } @@ -162,12 +165,18 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.VarName.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) + if (this.SnakeCase.IsSet) + { + hashCode = (hashCode * 59) + this.SnakeCase.Value.GetHashCode(); + } + if (this.Property.IsSet && this.Property.Value != null) + { + hashCode = (hashCode * 59) + this.Property.Value.GetHashCode(); + } + if (this.Var123Number.IsSet) { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); + hashCode = (hashCode * 59) + this.Var123Number.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Var123Number.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 23b687949c02..0da6d69319c5 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -42,12 +43,12 @@ protected NotificationtestGetElementsV1ResponseMPayload() { } /// aObjVariableobject (required). public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List> aObjVariableobject = default(List>)) { - this.PkiNotificationtestID = pkiNotificationtestID; - // to ensure "aObjVariableobject" is required (not null) + // to ensure "aObjVariableobject" (not nullable) is not null if (aObjVariableobject == null) { - throw new ArgumentNullException("aObjVariableobject is a required property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); + throw new ArgumentNullException("aObjVariableobject isn't a nullable property for NotificationtestGetElementsV1ResponseMPayload and cannot be null"); } + this.PkiNotificationtestID = pkiNotificationtestID; this.AObjVariableobject = aObjVariableobject; } @@ -113,7 +114,7 @@ public bool Equals(NotificationtestGetElementsV1ResponseMPayload input) this.PkiNotificationtestID.Equals(input.PkiNotificationtestID) ) && ( - this.AObjVariableobject == input.AObjVariableobject || + this.AObjVariableobject == input.AObjVariableobject || this.AObjVariableobject != null && input.AObjVariableobject != null && this.AObjVariableobject.SequenceEqual(input.AObjVariableobject) diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 43e095493285..7d36d0e45b24 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -45,8 +46,18 @@ public partial class NullableClass : IEquatable /// objectNullableProp. /// objectAndItemsNullableProp. /// objectItemsNullable. - public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateTime? dateProp = default(DateTime?), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) + public NullableClass(Option integerProp = default(Option), Option numberProp = default(Option), Option booleanProp = default(Option), Option stringProp = default(Option), Option dateProp = default(Option), Option datetimeProp = default(Option), Option> arrayNullableProp = default(Option>), Option> arrayAndItemsNullableProp = default(Option>), Option> arrayItemsNullable = default(Option>), Option> objectNullableProp = default(Option>), Option> objectAndItemsNullableProp = default(Option>), Option> objectItemsNullable = default(Option>)) { + // to ensure "arrayItemsNullable" (not nullable) is not null + if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) + { + throw new ArgumentNullException("arrayItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } + // to ensure "objectItemsNullable" (not nullable) is not null + if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) + { + throw new ArgumentNullException("objectItemsNullable isn't a nullable property for NullableClass and cannot be null"); + } this.IntegerProp = integerProp; this.NumberProp = numberProp; this.BooleanProp = booleanProp; @@ -66,74 +77,74 @@ public partial class NullableClass : IEquatable /// Gets or Sets IntegerProp /// [DataMember(Name = "integer_prop", EmitDefaultValue = true)] - public int? IntegerProp { get; set; } + public Option IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// [DataMember(Name = "number_prop", EmitDefaultValue = true)] - public decimal? NumberProp { get; set; } + public Option NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] - public bool? BooleanProp { get; set; } + public Option BooleanProp { get; set; } /// /// Gets or Sets StringProp /// [DataMember(Name = "string_prop", EmitDefaultValue = true)] - public string StringProp { get; set; } + public Option StringProp { get; set; } /// /// Gets or Sets DateProp /// [DataMember(Name = "date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? DateProp { get; set; } + public Option DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] - public DateTime? DatetimeProp { get; set; } + public Option DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] - public List ArrayNullableProp { get; set; } + public Option> ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] - public List ArrayAndItemsNullableProp { get; set; } + public Option> ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] - public List ArrayItemsNullable { get; set; } + public Option> ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectNullableProp { get; set; } + public Option> ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] - public Dictionary ObjectAndItemsNullableProp { get; set; } + public Option> ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] - public Dictionary ObjectItemsNullable { get; set; } + public Option> ObjectItemsNullable { get; set; } /// /// Gets or Sets additional properties @@ -198,70 +209,61 @@ public bool Equals(NullableClass input) } return ( - this.IntegerProp == input.IntegerProp || - (this.IntegerProp != null && - this.IntegerProp.Equals(input.IntegerProp)) + this.IntegerProp.Equals(input.IntegerProp) ) && ( - this.NumberProp == input.NumberProp || - (this.NumberProp != null && - this.NumberProp.Equals(input.NumberProp)) + this.NumberProp.Equals(input.NumberProp) ) && ( - this.BooleanProp == input.BooleanProp || - (this.BooleanProp != null && - this.BooleanProp.Equals(input.BooleanProp)) + this.BooleanProp.Equals(input.BooleanProp) ) && ( - this.StringProp == input.StringProp || - (this.StringProp != null && - this.StringProp.Equals(input.StringProp)) + + this.StringProp.Equals(input.StringProp) ) && ( - this.DateProp == input.DateProp || - (this.DateProp != null && - this.DateProp.Equals(input.DateProp)) + + this.DateProp.Equals(input.DateProp) ) && ( - this.DatetimeProp == input.DatetimeProp || - (this.DatetimeProp != null && - this.DatetimeProp.Equals(input.DatetimeProp)) + + this.DatetimeProp.Equals(input.DatetimeProp) ) && ( - this.ArrayNullableProp == input.ArrayNullableProp || - this.ArrayNullableProp != null && - input.ArrayNullableProp != null && - this.ArrayNullableProp.SequenceEqual(input.ArrayNullableProp) + + this.ArrayNullableProp.IsSet && this.ArrayNullableProp.Value != null && + input.ArrayNullableProp.IsSet && input.ArrayNullableProp.Value != null && + this.ArrayNullableProp.Value.SequenceEqual(input.ArrayNullableProp.Value) ) && ( - this.ArrayAndItemsNullableProp == input.ArrayAndItemsNullableProp || - this.ArrayAndItemsNullableProp != null && - input.ArrayAndItemsNullableProp != null && - this.ArrayAndItemsNullableProp.SequenceEqual(input.ArrayAndItemsNullableProp) + + this.ArrayAndItemsNullableProp.IsSet && this.ArrayAndItemsNullableProp.Value != null && + input.ArrayAndItemsNullableProp.IsSet && input.ArrayAndItemsNullableProp.Value != null && + this.ArrayAndItemsNullableProp.Value.SequenceEqual(input.ArrayAndItemsNullableProp.Value) ) && ( - this.ArrayItemsNullable == input.ArrayItemsNullable || - this.ArrayItemsNullable != null && - input.ArrayItemsNullable != null && - this.ArrayItemsNullable.SequenceEqual(input.ArrayItemsNullable) + + this.ArrayItemsNullable.IsSet && this.ArrayItemsNullable.Value != null && + input.ArrayItemsNullable.IsSet && input.ArrayItemsNullable.Value != null && + this.ArrayItemsNullable.Value.SequenceEqual(input.ArrayItemsNullable.Value) ) && ( - this.ObjectNullableProp == input.ObjectNullableProp || - this.ObjectNullableProp != null && - input.ObjectNullableProp != null && - this.ObjectNullableProp.SequenceEqual(input.ObjectNullableProp) + + this.ObjectNullableProp.IsSet && this.ObjectNullableProp.Value != null && + input.ObjectNullableProp.IsSet && input.ObjectNullableProp.Value != null && + this.ObjectNullableProp.Value.SequenceEqual(input.ObjectNullableProp.Value) ) && ( - this.ObjectAndItemsNullableProp == input.ObjectAndItemsNullableProp || - this.ObjectAndItemsNullableProp != null && - input.ObjectAndItemsNullableProp != null && - this.ObjectAndItemsNullableProp.SequenceEqual(input.ObjectAndItemsNullableProp) + + this.ObjectAndItemsNullableProp.IsSet && this.ObjectAndItemsNullableProp.Value != null && + input.ObjectAndItemsNullableProp.IsSet && input.ObjectAndItemsNullableProp.Value != null && + this.ObjectAndItemsNullableProp.Value.SequenceEqual(input.ObjectAndItemsNullableProp.Value) ) && ( - this.ObjectItemsNullable == input.ObjectItemsNullable || - this.ObjectItemsNullable != null && - input.ObjectItemsNullable != null && - this.ObjectItemsNullable.SequenceEqual(input.ObjectItemsNullable) + + this.ObjectItemsNullable.IsSet && this.ObjectItemsNullable.Value != null && + input.ObjectItemsNullable.IsSet && input.ObjectItemsNullable.Value != null && + this.ObjectItemsNullable.Value.SequenceEqual(input.ObjectItemsNullable.Value) ) && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); } @@ -275,53 +277,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.IntegerProp != null) + if (this.IntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.IntegerProp.Value.GetHashCode(); } - if (this.NumberProp != null) + if (this.NumberProp.IsSet) { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberProp.Value.GetHashCode(); } - if (this.BooleanProp != null) + if (this.BooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.BooleanProp.Value.GetHashCode(); } - if (this.StringProp != null) + if (this.StringProp.IsSet && this.StringProp.Value != null) { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.StringProp.Value.GetHashCode(); } - if (this.DateProp != null) + if (this.DateProp.IsSet && this.DateProp.Value != null) { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DateProp.Value.GetHashCode(); } - if (this.DatetimeProp != null) + if (this.DatetimeProp.IsSet && this.DatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.DatetimeProp.Value.GetHashCode(); } - if (this.ArrayNullableProp != null) + if (this.ArrayNullableProp.IsSet && this.ArrayNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayNullableProp.Value.GetHashCode(); } - if (this.ArrayAndItemsNullableProp != null) + if (this.ArrayAndItemsNullableProp.IsSet && this.ArrayAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.Value.GetHashCode(); } - if (this.ArrayItemsNullable != null) + if (this.ArrayItemsNullable.IsSet && this.ArrayItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayItemsNullable.Value.GetHashCode(); } - if (this.ObjectNullableProp != null) + if (this.ObjectNullableProp.IsSet && this.ObjectNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectNullableProp.Value.GetHashCode(); } - if (this.ObjectAndItemsNullableProp != null) + if (this.ObjectAndItemsNullableProp.IsSet && this.ObjectAndItemsNullableProp.Value != null) { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.Value.GetHashCode(); } - if (this.ObjectItemsNullable != null) + if (this.ObjectItemsNullable.IsSet && this.ObjectItemsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectItemsNullable.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 91eb456c6186..074829f84e1d 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,7 +35,7 @@ public partial class NullableGuidClass : IEquatable /// Initializes a new instance of the class. /// /// uuid. - public NullableGuidClass(Guid? uuid = default(Guid?)) + public NullableGuidClass(Option uuid = default(Option)) { this.Uuid = uuid; } @@ -44,7 +45,7 @@ public partial class NullableGuidClass : IEquatable /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "uuid", EmitDefaultValue = true)] - public Guid? Uuid { get; set; } + public Option Uuid { get; set; } /// /// Returns the string presentation of the object @@ -91,9 +92,8 @@ public bool Equals(NullableGuidClass input) } return ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) + + this.Uuid.Equals(input.Uuid) ); } @@ -106,9 +106,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index 756e0a75a511..304936a20548 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 3230dcc91933..779002654b86 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -18,6 +18,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,7 +38,7 @@ public partial class NumberOnly : IEquatable /// Initializes a new instance of the class. /// /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) + public NumberOnly(Option justNumber = default(Option)) { this.JustNumber = justNumber; } @@ -46,7 +47,7 @@ public partial class NumberOnly : IEquatable /// Gets or Sets JustNumber /// [DataMember(Name = "JustNumber", EmitDefaultValue = false)] - public decimal JustNumber { get; set; } + public Option JustNumber { get; set; } /// /// Returns the string presentation of the object @@ -93,7 +94,6 @@ public bool Equals(NumberOnly input) } return ( - this.JustNumber == input.JustNumber || this.JustNumber.Equals(input.JustNumber) ); } @@ -107,7 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); + if (this.JustNumber.IsSet) + { + hashCode = (hashCode * 59) + this.JustNumber.Value.GetHashCode(); + } return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 05bb2ca8de6c..14f63201b432 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -37,8 +38,23 @@ public partial class ObjectWithDeprecatedFields : IEquatableid. /// deprecatedRef. /// bars. - public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List bars = default(List)) + public ObjectWithDeprecatedFields(Option uuid = default(Option), Option id = default(Option), Option deprecatedRef = default(Option), Option> bars = default(Option>)) { + // to ensure "uuid" (not nullable) is not null + if (uuid.IsSet && uuid.Value == null) + { + throw new ArgumentNullException("uuid isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "deprecatedRef" (not nullable) is not null + if (deprecatedRef.IsSet && deprecatedRef.Value == null) + { + throw new ArgumentNullException("deprecatedRef isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } + // to ensure "bars" (not nullable) is not null + if (bars.IsSet && bars.Value == null) + { + throw new ArgumentNullException("bars isn't a nullable property for ObjectWithDeprecatedFields and cannot be null"); + } this.Uuid = uuid; this.Id = id; this.DeprecatedRef = deprecatedRef; @@ -49,28 +65,28 @@ public partial class ObjectWithDeprecatedFields : IEquatable [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } + public Option Uuid { get; set; } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] [Obsolete] - public decimal Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets DeprecatedRef /// [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } + public Option DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// [DataMember(Name = "bars", EmitDefaultValue = false)] [Obsolete] - public List Bars { get; set; } + public Option> Bars { get; set; } /// /// Returns the string presentation of the object @@ -120,24 +136,21 @@ public bool Equals(ObjectWithDeprecatedFields input) } return ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) + + this.Uuid.Equals(input.Uuid) ) && ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( - this.DeprecatedRef == input.DeprecatedRef || - (this.DeprecatedRef != null && - this.DeprecatedRef.Equals(input.DeprecatedRef)) + + this.DeprecatedRef.Equals(input.DeprecatedRef) ) && ( - this.Bars == input.Bars || - this.Bars != null && - input.Bars != null && - this.Bars.SequenceEqual(input.Bars) + + this.Bars.IsSet && this.Bars.Value != null && + input.Bars.IsSet && input.Bars.Value != null && + this.Bars.Value.SequenceEqual(input.Bars.Value) ); } @@ -150,18 +163,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Uuid != null) + if (this.Uuid.IsSet && this.Uuid.Value != null) + { + hashCode = (hashCode * 59) + this.Uuid.Value.GetHashCode(); + } + if (this.Id.IsSet) { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) + if (this.DeprecatedRef.IsSet && this.DeprecatedRef.Value != null) { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); + hashCode = (hashCode * 59) + this.DeprecatedRef.Value.GetHashCode(); } - if (this.Bars != null) + if (this.Bars.IsSet && this.Bars.Value != null) { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); + hashCode = (hashCode * 59) + this.Bars.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs index da1a30c06ecb..3d8300265181 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs index 972e7167b319..2794c6cdebb8 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -62,7 +63,7 @@ public enum StatusEnum /// /// Order Status [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -72,46 +73,51 @@ public enum StatusEnum /// shipDate. /// Order Status. /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) + public Order(Option id = default(Option), Option petId = default(Option), Option quantity = default(Option), Option shipDate = default(Option), Option status = default(Option), Option complete = default(Option)) { + // to ensure "shipDate" (not nullable) is not null + if (shipDate.IsSet && shipDate.Value == null) + { + throw new ArgumentNullException("shipDate isn't a nullable property for Order and cannot be null"); + } this.Id = id; this.PetId = petId; this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - this.Complete = complete; + this.Complete = complete.IsSet ? complete : new Option(false); } /// /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets PetId /// [DataMember(Name = "petId", EmitDefaultValue = false)] - public long PetId { get; set; } + public Option PetId { get; set; } /// /// Gets or Sets Quantity /// [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int Quantity { get; set; } + public Option Quantity { get; set; } /// /// Gets or Sets ShipDate /// /// 2020-02-02T20:20:20.000222Z [DataMember(Name = "shipDate", EmitDefaultValue = false)] - public DateTime ShipDate { get; set; } + public Option ShipDate { get; set; } /// /// Gets or Sets Complete /// [DataMember(Name = "complete", EmitDefaultValue = true)] - public bool Complete { get; set; } + public Option Complete { get; set; } /// /// Returns the string presentation of the object @@ -163,28 +169,22 @@ public bool Equals(Order input) } return ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( - this.PetId == input.PetId || this.PetId.Equals(input.PetId) ) && ( - this.Quantity == input.Quantity || this.Quantity.Equals(input.Quantity) ) && ( - this.ShipDate == input.ShipDate || - (this.ShipDate != null && - this.ShipDate.Equals(input.ShipDate)) + + this.ShipDate.Equals(input.ShipDate) ) && ( - this.Status == input.Status || this.Status.Equals(input.Status) ) && ( - this.Complete == input.Complete || this.Complete.Equals(input.Complete) ); } @@ -198,15 +198,30 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.PetId.IsSet) + { + hashCode = (hashCode * 59) + this.PetId.Value.GetHashCode(); + } + if (this.Quantity.IsSet) + { + hashCode = (hashCode * 59) + this.Quantity.Value.GetHashCode(); + } + if (this.ShipDate.IsSet && this.ShipDate.Value != null) + { + hashCode = (hashCode * 59) + this.ShipDate.Value.GetHashCode(); + } + if (this.Status.IsSet) + { + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); + } + if (this.Complete.IsSet) { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); + hashCode = (hashCode * 59) + this.Complete.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 56abf7969479..d2a36e0c4e14 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -36,8 +37,13 @@ public partial class OuterComposite : IEquatable /// myNumber. /// myString. /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) + public OuterComposite(Option myNumber = default(Option), Option myString = default(Option), Option myBoolean = default(Option)) { + // to ensure "myString" (not nullable) is not null + if (myString.IsSet && myString.Value == null) + { + throw new ArgumentNullException("myString isn't a nullable property for OuterComposite and cannot be null"); + } this.MyNumber = myNumber; this.MyString = myString; this.MyBoolean = myBoolean; @@ -47,19 +53,19 @@ public partial class OuterComposite : IEquatable /// Gets or Sets MyNumber /// [DataMember(Name = "my_number", EmitDefaultValue = false)] - public decimal MyNumber { get; set; } + public Option MyNumber { get; set; } /// /// Gets or Sets MyString /// [DataMember(Name = "my_string", EmitDefaultValue = false)] - public string MyString { get; set; } + public Option MyString { get; set; } /// /// Gets or Sets MyBoolean /// [DataMember(Name = "my_boolean", EmitDefaultValue = true)] - public bool MyBoolean { get; set; } + public Option MyBoolean { get; set; } /// /// Returns the string presentation of the object @@ -108,16 +114,13 @@ public bool Equals(OuterComposite input) } return ( - this.MyNumber == input.MyNumber || this.MyNumber.Equals(input.MyNumber) ) && ( - this.MyString == input.MyString || - (this.MyString != null && - this.MyString.Equals(input.MyString)) + + this.MyString.Equals(input.MyString) ) && ( - this.MyBoolean == input.MyBoolean || this.MyBoolean.Equals(input.MyBoolean) ); } @@ -131,12 +134,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) + if (this.MyNumber.IsSet) + { + hashCode = (hashCode * 59) + this.MyNumber.Value.GetHashCode(); + } + if (this.MyString.IsSet && this.MyString.Value != null) + { + hashCode = (hashCode * 59) + this.MyString.Value.GetHashCode(); + } + if (this.MyBoolean.IsSet) { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); + hashCode = (hashCode * 59) + this.MyBoolean.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs index 27dc4a497e7e..a7753d26c6ce 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index 9978ea39b025..f7a660dfbee9 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 018bada0a5f6..f96c78cd0a85 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index a009a4092173..f79f4f551d24 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs index 1f95b2461e07..893032432144 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterEnumTest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index 3ab62d6dbff5..04711c8b38eb 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs index 5c1cdd9be600..37b991a381f7 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -62,7 +63,7 @@ public enum StatusEnum /// /// pet status in the store [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public Option Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -77,22 +78,32 @@ protected Pet() { } /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(Option id = default(Option), Option category = default(Option), string name = default(string), List photoUrls = default(List), Option> tags = default(Option>), Option status = default(Option)) { - // to ensure "name" is required (not null) + // to ensure "category" (not nullable) is not null + if (category.IsSet && category.Value == null) + { + throw new ArgumentNullException("category isn't a nullable property for Pet and cannot be null"); + } + // to ensure "name" (not nullable) is not null if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); + throw new ArgumentNullException("name isn't a nullable property for Pet and cannot be null"); } - this.Name = name; - // to ensure "photoUrls" is required (not null) + // to ensure "photoUrls" (not nullable) is not null if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); + throw new ArgumentNullException("photoUrls isn't a nullable property for Pet and cannot be null"); + } + // to ensure "tags" (not nullable) is not null + if (tags.IsSet && tags.Value == null) + { + throw new ArgumentNullException("tags isn't a nullable property for Pet and cannot be null"); } - this.PhotoUrls = photoUrls; this.Id = id; this.Category = category; + this.Name = name; + this.PhotoUrls = photoUrls; this.Tags = tags; this.Status = status; } @@ -101,13 +112,13 @@ protected Pet() { } /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Category /// [DataMember(Name = "category", EmitDefaultValue = false)] - public Category Category { get; set; } + public Option Category { get; set; } /// /// Gets or Sets Name @@ -126,7 +137,7 @@ protected Pet() { } /// Gets or Sets Tags /// [DataMember(Name = "tags", EmitDefaultValue = false)] - public List Tags { get; set; } + public Option> Tags { get; set; } /// /// Returns the string presentation of the object @@ -178,13 +189,11 @@ public bool Equals(Pet input) } return ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( - this.Category == input.Category || - (this.Category != null && - this.Category.Equals(input.Category)) + + this.Category.Equals(input.Category) ) && ( this.Name == input.Name || @@ -192,19 +201,18 @@ public bool Equals(Pet input) this.Name.Equals(input.Name)) ) && ( - this.PhotoUrls == input.PhotoUrls || + this.PhotoUrls == input.PhotoUrls || this.PhotoUrls != null && input.PhotoUrls != null && this.PhotoUrls.SequenceEqual(input.PhotoUrls) ) && ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) + + this.Tags.IsSet && this.Tags.Value != null && + input.Tags.IsSet && input.Tags.Value != null && + this.Tags.Value.SequenceEqual(input.Tags.Value) ) && ( - this.Status == input.Status || this.Status.Equals(input.Status) ); } @@ -218,10 +226,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Category.IsSet && this.Category.Value != null) { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = (hashCode * 59) + this.Category.Value.GetHashCode(); } if (this.Name != null) { @@ -231,11 +242,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); } - if (this.Tags != null) + if (this.Tags.IsSet && this.Tags.Value != null) + { + hashCode = (hashCode * 59) + this.Tags.Value.GetHashCode(); + } + if (this.Status.IsSet) { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 4497aa54fc72..73d74ffc7a6e 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index ca7b920a8d63..dfa688efa4e9 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index 8a9c02ec4904..d09e720e41b9 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index d8019ea97f4c..9fd4c1aaac49 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,10 +42,10 @@ protected QuadrilateralInterface() { } /// quadrilateralType (required). public QuadrilateralInterface(string quadrilateralType = default(string)) { - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index b32dad8c6d08..b88eec27ce78 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class ReadOnlyFirst : IEquatable /// Initializes a new instance of the class. /// /// baz. - public ReadOnlyFirst(string baz = default(string)) + public ReadOnlyFirst(Option baz = default(Option)) { + // to ensure "baz" (not nullable) is not null + if (baz.IsSet && baz.Value == null) + { + throw new ArgumentNullException("baz isn't a nullable property for ReadOnlyFirst and cannot be null"); + } this.Baz = baz; } @@ -43,7 +49,7 @@ public partial class ReadOnlyFirst : IEquatable /// Gets or Sets Bar /// [DataMember(Name = "bar", EmitDefaultValue = false)] - public string Bar { get; private set; } + public Option Bar { get; private set; } /// /// Returns false as Bar should not be serialized given that it's read-only. @@ -57,7 +63,7 @@ public bool ShouldSerializeBar() /// Gets or Sets Baz /// [DataMember(Name = "baz", EmitDefaultValue = false)] - public string Baz { get; set; } + public Option Baz { get; set; } /// /// Returns the string presentation of the object @@ -105,14 +111,12 @@ public bool Equals(ReadOnlyFirst input) } return ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) + + this.Bar.Equals(input.Bar) ) && ( - this.Baz == input.Baz || - (this.Baz != null && - this.Baz.Equals(input.Baz)) + + this.Baz.Equals(input.Baz) ); } @@ -125,13 +129,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) + if (this.Bar.IsSet && this.Bar.Value != null) { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); + hashCode = (hashCode * 59) + this.Bar.Value.GetHashCode(); } - if (this.Baz != null) + if (this.Baz.IsSet && this.Baz.Value != null) { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); + hashCode = (hashCode * 59) + this.Baz.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index eb89d56999fc..e757b34fed38 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -51,7 +52,7 @@ public enum RequiredNullableEnumIntegerEnum /// Gets or Sets RequiredNullableEnumInteger /// [DataMember(Name = "required_nullable_enum_integer", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerEnum RequiredNullableEnumInteger { get; set; } + public RequiredNullableEnumIntegerEnum? RequiredNullableEnumInteger { get; set; } /// /// Defines RequiredNotnullableEnumInteger /// @@ -95,7 +96,7 @@ public enum NotrequiredNullableEnumIntegerEnum /// Gets or Sets NotrequiredNullableEnumInteger /// [DataMember(Name = "notrequired_nullable_enum_integer", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerEnum? NotrequiredNullableEnumInteger { get; set; } + public Option NotrequiredNullableEnumInteger { get; set; } /// /// Defines NotrequiredNotnullableEnumInteger /// @@ -117,11 +118,10 @@ public enum NotrequiredNotnullableEnumIntegerEnum /// Gets or Sets NotrequiredNotnullableEnumInteger /// [DataMember(Name = "notrequired_notnullable_enum_integer", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerEnum? NotrequiredNotnullableEnumInteger { get; set; } + public Option NotrequiredNotnullableEnumInteger { get; set; } /// /// Defines RequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum RequiredNullableEnumIntegerOnlyEnum { /// @@ -140,7 +140,7 @@ public enum RequiredNullableEnumIntegerOnlyEnum /// Gets or Sets RequiredNullableEnumIntegerOnly /// [DataMember(Name = "required_nullable_enum_integer_only", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnly { get; set; } + public RequiredNullableEnumIntegerOnlyEnum? RequiredNullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumIntegerOnly /// @@ -166,7 +166,6 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum /// /// Defines NotrequiredNullableEnumIntegerOnly /// - [JsonConverter(typeof(StringEnumConverter))] public enum NotrequiredNullableEnumIntegerOnlyEnum { /// @@ -185,7 +184,7 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNullableEnumIntegerOnly /// [DataMember(Name = "notrequired_nullable_enum_integer_only", EmitDefaultValue = true)] - public NotrequiredNullableEnumIntegerOnlyEnum? NotrequiredNullableEnumIntegerOnly { get; set; } + public Option NotrequiredNullableEnumIntegerOnly { get; set; } /// /// Defines NotrequiredNotnullableEnumIntegerOnly /// @@ -207,7 +206,7 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum /// Gets or Sets NotrequiredNotnullableEnumIntegerOnly /// [DataMember(Name = "notrequired_notnullable_enum_integer_only", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumIntegerOnlyEnum? NotrequiredNotnullableEnumIntegerOnly { get; set; } + public Option NotrequiredNotnullableEnumIntegerOnly { get; set; } /// /// Defines RequiredNotnullableEnumString /// @@ -329,7 +328,7 @@ public enum RequiredNullableEnumStringEnum /// Gets or Sets RequiredNullableEnumString /// [DataMember(Name = "required_nullable_enum_string", IsRequired = true, EmitDefaultValue = true)] - public RequiredNullableEnumStringEnum RequiredNullableEnumString { get; set; } + public RequiredNullableEnumStringEnum? RequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNullableEnumString /// @@ -390,7 +389,7 @@ public enum NotrequiredNullableEnumStringEnum /// Gets or Sets NotrequiredNullableEnumString /// [DataMember(Name = "notrequired_nullable_enum_string", EmitDefaultValue = true)] - public NotrequiredNullableEnumStringEnum? NotrequiredNullableEnumString { get; set; } + public Option NotrequiredNullableEnumString { get; set; } /// /// Defines NotrequiredNotnullableEnumString /// @@ -451,7 +450,7 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNotnullableEnumString /// [DataMember(Name = "notrequired_notnullable_enum_string", EmitDefaultValue = false)] - public NotrequiredNotnullableEnumStringEnum? NotrequiredNotnullableEnumString { get; set; } + public Option NotrequiredNotnullableEnumString { get; set; } /// /// Gets or Sets RequiredNullableOuterEnumDefaultValue @@ -469,13 +468,13 @@ public enum NotrequiredNotnullableEnumStringEnum /// Gets or Sets NotrequiredNullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_nullable_outerEnumDefaultValue", EmitDefaultValue = true)] - public OuterEnumDefaultValue? NotrequiredNullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNullableOuterEnumDefaultValue { get; set; } /// /// Gets or Sets NotrequiredNotnullableOuterEnumDefaultValue /// [DataMember(Name = "notrequired_notnullable_outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? NotrequiredNotnullableOuterEnumDefaultValue { get; set; } + public Option NotrequiredNotnullableOuterEnumDefaultValue { get; set; } /// /// Initializes a new instance of the class. /// @@ -528,95 +527,100 @@ protected RequiredClass() { } /// requiredNotnullableArrayOfString (required). /// notrequiredNullableArrayOfString. /// notrequiredNotnullableArrayOfString. - public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), int? notRequiredNullableIntegerProp = default(int?), int notRequiredNotnullableintegerProp = default(int), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), string notrequiredNullableStringProp = default(string), string notrequiredNotnullableStringProp = default(string), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), bool? notrequiredNullableBooleanProp = default(bool?), bool notrequiredNotnullableBooleanProp = default(bool), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), DateTime? notRequiredNullableDateProp = default(DateTime?), DateTime notRequiredNotnullableDateProp = default(DateTime), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), DateTime? notrequiredNullableDatetimeProp = default(DateTime?), DateTime notrequiredNotnullableDatetimeProp = default(DateTime), RequiredNullableEnumIntegerEnum requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), NotrequiredNullableEnumIntegerEnum? notrequiredNullableEnumInteger = default(NotrequiredNullableEnumIntegerEnum?), NotrequiredNotnullableEnumIntegerEnum? notrequiredNotnullableEnumInteger = default(NotrequiredNotnullableEnumIntegerEnum?), RequiredNullableEnumIntegerOnlyEnum requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), NotrequiredNullableEnumIntegerOnlyEnum? notrequiredNullableEnumIntegerOnly = default(NotrequiredNullableEnumIntegerOnlyEnum?), NotrequiredNotnullableEnumIntegerOnlyEnum? notrequiredNotnullableEnumIntegerOnly = default(NotrequiredNotnullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum requiredNullableEnumString = default(RequiredNullableEnumStringEnum), NotrequiredNullableEnumStringEnum? notrequiredNullableEnumString = default(NotrequiredNullableEnumStringEnum?), NotrequiredNotnullableEnumStringEnum? notrequiredNotnullableEnumString = default(NotrequiredNotnullableEnumStringEnum?), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue? notrequiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumDefaultValue? notrequiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue?), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Guid? notrequiredNullableUuid = default(Guid?), Guid notrequiredNotnullableUuid = default(Guid), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), List notrequiredNullableArrayOfString = default(List), List notrequiredNotnullableArrayOfString = default(List)) + public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requiredNotnullableintegerProp = default(int), Option notRequiredNullableIntegerProp = default(Option), Option notRequiredNotnullableintegerProp = default(Option), string requiredNullableStringProp = default(string), string requiredNotnullableStringProp = default(string), Option notrequiredNullableStringProp = default(Option), Option notrequiredNotnullableStringProp = default(Option), bool? requiredNullableBooleanProp = default(bool?), bool requiredNotnullableBooleanProp = default(bool), Option notrequiredNullableBooleanProp = default(Option), Option notrequiredNotnullableBooleanProp = default(Option), DateTime? requiredNullableDateProp = default(DateTime?), DateTime requiredNotNullableDateProp = default(DateTime), Option notRequiredNullableDateProp = default(Option), Option notRequiredNotnullableDateProp = default(Option), DateTime requiredNotnullableDatetimeProp = default(DateTime), DateTime? requiredNullableDatetimeProp = default(DateTime?), Option notrequiredNullableDatetimeProp = default(Option), Option notrequiredNotnullableDatetimeProp = default(Option), RequiredNullableEnumIntegerEnum? requiredNullableEnumInteger = default(RequiredNullableEnumIntegerEnum?), RequiredNotnullableEnumIntegerEnum requiredNotnullableEnumInteger = default(RequiredNotnullableEnumIntegerEnum), Option notrequiredNullableEnumInteger = default(Option), Option notrequiredNotnullableEnumInteger = default(Option), RequiredNullableEnumIntegerOnlyEnum? requiredNullableEnumIntegerOnly = default(RequiredNullableEnumIntegerOnlyEnum?), RequiredNotnullableEnumIntegerOnlyEnum requiredNotnullableEnumIntegerOnly = default(RequiredNotnullableEnumIntegerOnlyEnum), Option notrequiredNullableEnumIntegerOnly = default(Option), Option notrequiredNotnullableEnumIntegerOnly = default(Option), RequiredNotnullableEnumStringEnum requiredNotnullableEnumString = default(RequiredNotnullableEnumStringEnum), RequiredNullableEnumStringEnum? requiredNullableEnumString = default(RequiredNullableEnumStringEnum?), Option notrequiredNullableEnumString = default(Option), Option notrequiredNotnullableEnumString = default(Option), OuterEnumDefaultValue requiredNullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), OuterEnumDefaultValue requiredNotnullableOuterEnumDefaultValue = default(OuterEnumDefaultValue), Option notrequiredNullableOuterEnumDefaultValue = default(Option), Option notrequiredNotnullableOuterEnumDefaultValue = default(Option), Guid? requiredNullableUuid = default(Guid?), Guid requiredNotnullableUuid = default(Guid), Option notrequiredNullableUuid = default(Option), Option notrequiredNotnullableUuid = default(Option), List requiredNullableArrayOfString = default(List), List requiredNotnullableArrayOfString = default(List), Option> notrequiredNullableArrayOfString = default(Option>), Option> notrequiredNotnullableArrayOfString = default(Option>)) { - // to ensure "requiredNullableIntegerProp" is required (not null) - if (requiredNullableIntegerProp == null) + // to ensure "requiredNotnullableStringProp" (not nullable) is not null + if (requiredNotnullableStringProp == null) { - throw new ArgumentNullException("requiredNullableIntegerProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableIntegerProp = requiredNullableIntegerProp; - this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; - // to ensure "requiredNullableStringProp" is required (not null) - if (requiredNullableStringProp == null) + // to ensure "notrequiredNotnullableStringProp" (not nullable) is not null + if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) { - throw new ArgumentNullException("requiredNullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableStringProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableStringProp = requiredNullableStringProp; - // to ensure "requiredNotnullableStringProp" is required (not null) - if (requiredNotnullableStringProp == null) + // to ensure "requiredNotNullableDateProp" (not nullable) is not null + if (requiredNotNullableDateProp == null) { - throw new ArgumentNullException("requiredNotnullableStringProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotNullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableStringProp = requiredNotnullableStringProp; - // to ensure "requiredNullableBooleanProp" is required (not null) - if (requiredNullableBooleanProp == null) + // to ensure "notRequiredNotnullableDateProp" (not nullable) is not null + if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) { - throw new ArgumentNullException("requiredNullableBooleanProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notRequiredNotnullableDateProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableBooleanProp = requiredNullableBooleanProp; - this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; - // to ensure "requiredNullableDateProp" is required (not null) - if (requiredNullableDateProp == null) + // to ensure "requiredNotnullableDatetimeProp" (not nullable) is not null + if (requiredNotnullableDatetimeProp == null) { - throw new ArgumentNullException("requiredNullableDateProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDateProp = requiredNullableDateProp; - this.RequiredNotNullableDateProp = requiredNotNullableDateProp; - this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; - // to ensure "requiredNullableDatetimeProp" is required (not null) - if (requiredNullableDatetimeProp == null) + // to ensure "notrequiredNotnullableDatetimeProp" (not nullable) is not null + if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) { - throw new ArgumentNullException("requiredNullableDatetimeProp is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableDatetimeProp isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; - this.RequiredNullableEnumInteger = requiredNullableEnumInteger; - this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; - this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; - this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; - this.RequiredNotnullableEnumString = requiredNotnullableEnumString; - this.RequiredNullableEnumString = requiredNullableEnumString; - this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; - this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; - // to ensure "requiredNullableUuid" is required (not null) - if (requiredNullableUuid == null) + // to ensure "requiredNotnullableUuid" (not nullable) is not null + if (requiredNotnullableUuid == null) { - throw new ArgumentNullException("requiredNullableUuid is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableUuid = requiredNullableUuid; - this.RequiredNotnullableUuid = requiredNotnullableUuid; - // to ensure "requiredNullableArrayOfString" is required (not null) - if (requiredNullableArrayOfString == null) + // to ensure "notrequiredNotnullableUuid" (not nullable) is not null + if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) { - throw new ArgumentNullException("requiredNullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("notrequiredNotnullableUuid isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNullableArrayOfString = requiredNullableArrayOfString; - // to ensure "requiredNotnullableArrayOfString" is required (not null) + // to ensure "requiredNotnullableArrayOfString" (not nullable) is not null if (requiredNotnullableArrayOfString == null) { - throw new ArgumentNullException("requiredNotnullableArrayOfString is a required property for RequiredClass and cannot be null"); + throw new ArgumentNullException("requiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); } - this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; + // to ensure "notrequiredNotnullableArrayOfString" (not nullable) is not null + if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) + { + throw new ArgumentNullException("notrequiredNotnullableArrayOfString isn't a nullable property for RequiredClass and cannot be null"); + } + this.RequiredNullableIntegerProp = requiredNullableIntegerProp; + this.RequiredNotnullableintegerProp = requiredNotnullableintegerProp; this.NotRequiredNullableIntegerProp = notRequiredNullableIntegerProp; this.NotRequiredNotnullableintegerProp = notRequiredNotnullableintegerProp; + this.RequiredNullableStringProp = requiredNullableStringProp; + this.RequiredNotnullableStringProp = requiredNotnullableStringProp; this.NotrequiredNullableStringProp = notrequiredNullableStringProp; this.NotrequiredNotnullableStringProp = notrequiredNotnullableStringProp; + this.RequiredNullableBooleanProp = requiredNullableBooleanProp; + this.RequiredNotnullableBooleanProp = requiredNotnullableBooleanProp; this.NotrequiredNullableBooleanProp = notrequiredNullableBooleanProp; this.NotrequiredNotnullableBooleanProp = notrequiredNotnullableBooleanProp; + this.RequiredNullableDateProp = requiredNullableDateProp; + this.RequiredNotNullableDateProp = requiredNotNullableDateProp; this.NotRequiredNullableDateProp = notRequiredNullableDateProp; this.NotRequiredNotnullableDateProp = notRequiredNotnullableDateProp; + this.RequiredNotnullableDatetimeProp = requiredNotnullableDatetimeProp; + this.RequiredNullableDatetimeProp = requiredNullableDatetimeProp; this.NotrequiredNullableDatetimeProp = notrequiredNullableDatetimeProp; this.NotrequiredNotnullableDatetimeProp = notrequiredNotnullableDatetimeProp; + this.RequiredNullableEnumInteger = requiredNullableEnumInteger; + this.RequiredNotnullableEnumInteger = requiredNotnullableEnumInteger; this.NotrequiredNullableEnumInteger = notrequiredNullableEnumInteger; this.NotrequiredNotnullableEnumInteger = notrequiredNotnullableEnumInteger; + this.RequiredNullableEnumIntegerOnly = requiredNullableEnumIntegerOnly; + this.RequiredNotnullableEnumIntegerOnly = requiredNotnullableEnumIntegerOnly; this.NotrequiredNullableEnumIntegerOnly = notrequiredNullableEnumIntegerOnly; this.NotrequiredNotnullableEnumIntegerOnly = notrequiredNotnullableEnumIntegerOnly; + this.RequiredNotnullableEnumString = requiredNotnullableEnumString; + this.RequiredNullableEnumString = requiredNullableEnumString; this.NotrequiredNullableEnumString = notrequiredNullableEnumString; this.NotrequiredNotnullableEnumString = notrequiredNotnullableEnumString; + this.RequiredNullableOuterEnumDefaultValue = requiredNullableOuterEnumDefaultValue; + this.RequiredNotnullableOuterEnumDefaultValue = requiredNotnullableOuterEnumDefaultValue; this.NotrequiredNullableOuterEnumDefaultValue = notrequiredNullableOuterEnumDefaultValue; this.NotrequiredNotnullableOuterEnumDefaultValue = notrequiredNotnullableOuterEnumDefaultValue; + this.RequiredNullableUuid = requiredNullableUuid; + this.RequiredNotnullableUuid = requiredNotnullableUuid; this.NotrequiredNullableUuid = notrequiredNullableUuid; this.NotrequiredNotnullableUuid = notrequiredNotnullableUuid; + this.RequiredNullableArrayOfString = requiredNullableArrayOfString; + this.RequiredNotnullableArrayOfString = requiredNotnullableArrayOfString; this.NotrequiredNullableArrayOfString = notrequiredNullableArrayOfString; this.NotrequiredNotnullableArrayOfString = notrequiredNotnullableArrayOfString; } @@ -637,13 +641,13 @@ protected RequiredClass() { } /// Gets or Sets NotRequiredNullableIntegerProp /// [DataMember(Name = "not_required_nullable_integer_prop", EmitDefaultValue = true)] - public int? NotRequiredNullableIntegerProp { get; set; } + public Option NotRequiredNullableIntegerProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableintegerProp /// [DataMember(Name = "not_required_notnullableinteger_prop", EmitDefaultValue = false)] - public int NotRequiredNotnullableintegerProp { get; set; } + public Option NotRequiredNotnullableintegerProp { get; set; } /// /// Gets or Sets RequiredNullableStringProp @@ -661,13 +665,13 @@ protected RequiredClass() { } /// Gets or Sets NotrequiredNullableStringProp /// [DataMember(Name = "notrequired_nullable_string_prop", EmitDefaultValue = true)] - public string NotrequiredNullableStringProp { get; set; } + public Option NotrequiredNullableStringProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableStringProp /// [DataMember(Name = "notrequired_notnullable_string_prop", EmitDefaultValue = false)] - public string NotrequiredNotnullableStringProp { get; set; } + public Option NotrequiredNotnullableStringProp { get; set; } /// /// Gets or Sets RequiredNullableBooleanProp @@ -685,13 +689,13 @@ protected RequiredClass() { } /// Gets or Sets NotrequiredNullableBooleanProp /// [DataMember(Name = "notrequired_nullable_boolean_prop", EmitDefaultValue = true)] - public bool? NotrequiredNullableBooleanProp { get; set; } + public Option NotrequiredNullableBooleanProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableBooleanProp /// [DataMember(Name = "notrequired_notnullable_boolean_prop", EmitDefaultValue = true)] - public bool NotrequiredNotnullableBooleanProp { get; set; } + public Option NotrequiredNotnullableBooleanProp { get; set; } /// /// Gets or Sets RequiredNullableDateProp @@ -712,14 +716,14 @@ protected RequiredClass() { } /// [DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? NotRequiredNullableDateProp { get; set; } + public Option NotRequiredNullableDateProp { get; set; } /// /// Gets or Sets NotRequiredNotnullableDateProp /// [DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime NotRequiredNotnullableDateProp { get; set; } + public Option NotRequiredNotnullableDateProp { get; set; } /// /// Gets or Sets RequiredNotnullableDatetimeProp @@ -737,13 +741,13 @@ protected RequiredClass() { } /// Gets or Sets NotrequiredNullableDatetimeProp /// [DataMember(Name = "notrequired_nullable_datetime_prop", EmitDefaultValue = true)] - public DateTime? NotrequiredNullableDatetimeProp { get; set; } + public Option NotrequiredNullableDatetimeProp { get; set; } /// /// Gets or Sets NotrequiredNotnullableDatetimeProp /// [DataMember(Name = "notrequired_notnullable_datetime_prop", EmitDefaultValue = false)] - public DateTime NotrequiredNotnullableDatetimeProp { get; set; } + public Option NotrequiredNotnullableDatetimeProp { get; set; } /// /// Gets or Sets RequiredNullableUuid @@ -764,14 +768,14 @@ protected RequiredClass() { } /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_nullable_uuid", EmitDefaultValue = true)] - public Guid? NotrequiredNullableUuid { get; set; } + public Option NotrequiredNullableUuid { get; set; } /// /// Gets or Sets NotrequiredNotnullableUuid /// /// 72f98069-206d-4f12-9f12-3d1e525a8e84 [DataMember(Name = "notrequired_notnullable_uuid", EmitDefaultValue = false)] - public Guid NotrequiredNotnullableUuid { get; set; } + public Option NotrequiredNotnullableUuid { get; set; } /// /// Gets or Sets RequiredNullableArrayOfString @@ -789,13 +793,13 @@ protected RequiredClass() { } /// Gets or Sets NotrequiredNullableArrayOfString /// [DataMember(Name = "notrequired_nullable_array_of_string", EmitDefaultValue = true)] - public List NotrequiredNullableArrayOfString { get; set; } + public Option> NotrequiredNullableArrayOfString { get; set; } /// /// Gets or Sets NotrequiredNotnullableArrayOfString /// [DataMember(Name = "notrequired_notnullable_array_of_string", EmitDefaultValue = false)] - public List NotrequiredNotnullableArrayOfString { get; set; } + public Option> NotrequiredNotnullableArrayOfString { get; set; } /// /// Returns the string presentation of the object @@ -886,20 +890,16 @@ public bool Equals(RequiredClass input) return ( this.RequiredNullableIntegerProp == input.RequiredNullableIntegerProp || - (this.RequiredNullableIntegerProp != null && - this.RequiredNullableIntegerProp.Equals(input.RequiredNullableIntegerProp)) + this.RequiredNullableIntegerProp.Equals(input.RequiredNullableIntegerProp) ) && ( this.RequiredNotnullableintegerProp == input.RequiredNotnullableintegerProp || this.RequiredNotnullableintegerProp.Equals(input.RequiredNotnullableintegerProp) ) && ( - this.NotRequiredNullableIntegerProp == input.NotRequiredNullableIntegerProp || - (this.NotRequiredNullableIntegerProp != null && - this.NotRequiredNullableIntegerProp.Equals(input.NotRequiredNullableIntegerProp)) + this.NotRequiredNullableIntegerProp.Equals(input.NotRequiredNullableIntegerProp) ) && ( - this.NotRequiredNotnullableintegerProp == input.NotRequiredNotnullableintegerProp || this.NotRequiredNotnullableintegerProp.Equals(input.NotRequiredNotnullableintegerProp) ) && ( @@ -913,31 +913,25 @@ public bool Equals(RequiredClass input) this.RequiredNotnullableStringProp.Equals(input.RequiredNotnullableStringProp)) ) && ( - this.NotrequiredNullableStringProp == input.NotrequiredNullableStringProp || - (this.NotrequiredNullableStringProp != null && - this.NotrequiredNullableStringProp.Equals(input.NotrequiredNullableStringProp)) + + this.NotrequiredNullableStringProp.Equals(input.NotrequiredNullableStringProp) ) && ( - this.NotrequiredNotnullableStringProp == input.NotrequiredNotnullableStringProp || - (this.NotrequiredNotnullableStringProp != null && - this.NotrequiredNotnullableStringProp.Equals(input.NotrequiredNotnullableStringProp)) + + this.NotrequiredNotnullableStringProp.Equals(input.NotrequiredNotnullableStringProp) ) && ( this.RequiredNullableBooleanProp == input.RequiredNullableBooleanProp || - (this.RequiredNullableBooleanProp != null && - this.RequiredNullableBooleanProp.Equals(input.RequiredNullableBooleanProp)) + this.RequiredNullableBooleanProp.Equals(input.RequiredNullableBooleanProp) ) && ( this.RequiredNotnullableBooleanProp == input.RequiredNotnullableBooleanProp || this.RequiredNotnullableBooleanProp.Equals(input.RequiredNotnullableBooleanProp) ) && ( - this.NotrequiredNullableBooleanProp == input.NotrequiredNullableBooleanProp || - (this.NotrequiredNullableBooleanProp != null && - this.NotrequiredNullableBooleanProp.Equals(input.NotrequiredNullableBooleanProp)) + this.NotrequiredNullableBooleanProp.Equals(input.NotrequiredNullableBooleanProp) ) && ( - this.NotrequiredNotnullableBooleanProp == input.NotrequiredNotnullableBooleanProp || this.NotrequiredNotnullableBooleanProp.Equals(input.NotrequiredNotnullableBooleanProp) ) && ( @@ -951,14 +945,12 @@ public bool Equals(RequiredClass input) this.RequiredNotNullableDateProp.Equals(input.RequiredNotNullableDateProp)) ) && ( - this.NotRequiredNullableDateProp == input.NotRequiredNullableDateProp || - (this.NotRequiredNullableDateProp != null && - this.NotRequiredNullableDateProp.Equals(input.NotRequiredNullableDateProp)) + + this.NotRequiredNullableDateProp.Equals(input.NotRequiredNullableDateProp) ) && ( - this.NotRequiredNotnullableDateProp == input.NotRequiredNotnullableDateProp || - (this.NotRequiredNotnullableDateProp != null && - this.NotRequiredNotnullableDateProp.Equals(input.NotRequiredNotnullableDateProp)) + + this.NotRequiredNotnullableDateProp.Equals(input.NotRequiredNotnullableDateProp) ) && ( this.RequiredNotnullableDatetimeProp == input.RequiredNotnullableDatetimeProp || @@ -971,14 +963,12 @@ public bool Equals(RequiredClass input) this.RequiredNullableDatetimeProp.Equals(input.RequiredNullableDatetimeProp)) ) && ( - this.NotrequiredNullableDatetimeProp == input.NotrequiredNullableDatetimeProp || - (this.NotrequiredNullableDatetimeProp != null && - this.NotrequiredNullableDatetimeProp.Equals(input.NotrequiredNullableDatetimeProp)) + + this.NotrequiredNullableDatetimeProp.Equals(input.NotrequiredNullableDatetimeProp) ) && ( - this.NotrequiredNotnullableDatetimeProp == input.NotrequiredNotnullableDatetimeProp || - (this.NotrequiredNotnullableDatetimeProp != null && - this.NotrequiredNotnullableDatetimeProp.Equals(input.NotrequiredNotnullableDatetimeProp)) + + this.NotrequiredNotnullableDatetimeProp.Equals(input.NotrequiredNotnullableDatetimeProp) ) && ( this.RequiredNullableEnumInteger == input.RequiredNullableEnumInteger || @@ -989,11 +979,9 @@ public bool Equals(RequiredClass input) this.RequiredNotnullableEnumInteger.Equals(input.RequiredNotnullableEnumInteger) ) && ( - this.NotrequiredNullableEnumInteger == input.NotrequiredNullableEnumInteger || this.NotrequiredNullableEnumInteger.Equals(input.NotrequiredNullableEnumInteger) ) && ( - this.NotrequiredNotnullableEnumInteger == input.NotrequiredNotnullableEnumInteger || this.NotrequiredNotnullableEnumInteger.Equals(input.NotrequiredNotnullableEnumInteger) ) && ( @@ -1005,11 +993,9 @@ public bool Equals(RequiredClass input) this.RequiredNotnullableEnumIntegerOnly.Equals(input.RequiredNotnullableEnumIntegerOnly) ) && ( - this.NotrequiredNullableEnumIntegerOnly == input.NotrequiredNullableEnumIntegerOnly || this.NotrequiredNullableEnumIntegerOnly.Equals(input.NotrequiredNullableEnumIntegerOnly) ) && ( - this.NotrequiredNotnullableEnumIntegerOnly == input.NotrequiredNotnullableEnumIntegerOnly || this.NotrequiredNotnullableEnumIntegerOnly.Equals(input.NotrequiredNotnullableEnumIntegerOnly) ) && ( @@ -1021,11 +1007,9 @@ public bool Equals(RequiredClass input) this.RequiredNullableEnumString.Equals(input.RequiredNullableEnumString) ) && ( - this.NotrequiredNullableEnumString == input.NotrequiredNullableEnumString || this.NotrequiredNullableEnumString.Equals(input.NotrequiredNullableEnumString) ) && ( - this.NotrequiredNotnullableEnumString == input.NotrequiredNotnullableEnumString || this.NotrequiredNotnullableEnumString.Equals(input.NotrequiredNotnullableEnumString) ) && ( @@ -1037,11 +1021,9 @@ public bool Equals(RequiredClass input) this.RequiredNotnullableOuterEnumDefaultValue.Equals(input.RequiredNotnullableOuterEnumDefaultValue) ) && ( - this.NotrequiredNullableOuterEnumDefaultValue == input.NotrequiredNullableOuterEnumDefaultValue || this.NotrequiredNullableOuterEnumDefaultValue.Equals(input.NotrequiredNullableOuterEnumDefaultValue) ) && ( - this.NotrequiredNotnullableOuterEnumDefaultValue == input.NotrequiredNotnullableOuterEnumDefaultValue || this.NotrequiredNotnullableOuterEnumDefaultValue.Equals(input.NotrequiredNotnullableOuterEnumDefaultValue) ) && ( @@ -1055,38 +1037,36 @@ public bool Equals(RequiredClass input) this.RequiredNotnullableUuid.Equals(input.RequiredNotnullableUuid)) ) && ( - this.NotrequiredNullableUuid == input.NotrequiredNullableUuid || - (this.NotrequiredNullableUuid != null && - this.NotrequiredNullableUuid.Equals(input.NotrequiredNullableUuid)) + + this.NotrequiredNullableUuid.Equals(input.NotrequiredNullableUuid) ) && ( - this.NotrequiredNotnullableUuid == input.NotrequiredNotnullableUuid || - (this.NotrequiredNotnullableUuid != null && - this.NotrequiredNotnullableUuid.Equals(input.NotrequiredNotnullableUuid)) + + this.NotrequiredNotnullableUuid.Equals(input.NotrequiredNotnullableUuid) ) && ( - this.RequiredNullableArrayOfString == input.RequiredNullableArrayOfString || + this.RequiredNullableArrayOfString == input.RequiredNullableArrayOfString || this.RequiredNullableArrayOfString != null && input.RequiredNullableArrayOfString != null && this.RequiredNullableArrayOfString.SequenceEqual(input.RequiredNullableArrayOfString) ) && ( - this.RequiredNotnullableArrayOfString == input.RequiredNotnullableArrayOfString || + this.RequiredNotnullableArrayOfString == input.RequiredNotnullableArrayOfString || this.RequiredNotnullableArrayOfString != null && input.RequiredNotnullableArrayOfString != null && this.RequiredNotnullableArrayOfString.SequenceEqual(input.RequiredNotnullableArrayOfString) ) && ( - this.NotrequiredNullableArrayOfString == input.NotrequiredNullableArrayOfString || - this.NotrequiredNullableArrayOfString != null && - input.NotrequiredNullableArrayOfString != null && - this.NotrequiredNullableArrayOfString.SequenceEqual(input.NotrequiredNullableArrayOfString) + + this.NotrequiredNullableArrayOfString.IsSet && this.NotrequiredNullableArrayOfString.Value != null && + input.NotrequiredNullableArrayOfString.IsSet && input.NotrequiredNullableArrayOfString.Value != null && + this.NotrequiredNullableArrayOfString.Value.SequenceEqual(input.NotrequiredNullableArrayOfString.Value) ) && ( - this.NotrequiredNotnullableArrayOfString == input.NotrequiredNotnullableArrayOfString || - this.NotrequiredNotnullableArrayOfString != null && - input.NotrequiredNotnullableArrayOfString != null && - this.NotrequiredNotnullableArrayOfString.SequenceEqual(input.NotrequiredNotnullableArrayOfString) + + this.NotrequiredNotnullableArrayOfString.IsSet && this.NotrequiredNotnullableArrayOfString.Value != null && + input.NotrequiredNotnullableArrayOfString.IsSet && input.NotrequiredNotnullableArrayOfString.Value != null && + this.NotrequiredNotnullableArrayOfString.Value.SequenceEqual(input.NotrequiredNotnullableArrayOfString.Value) ); } @@ -1099,16 +1079,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RequiredNullableIntegerProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); + if (this.NotRequiredNullableIntegerProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableintegerProp.GetHashCode(); - if (this.NotRequiredNullableIntegerProp != null) + if (this.NotRequiredNotnullableintegerProp.IsSet) { - hashCode = (hashCode * 59) + this.NotRequiredNullableIntegerProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotRequiredNotnullableintegerProp.GetHashCode(); if (this.RequiredNullableStringProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableStringProp.GetHashCode(); @@ -1117,24 +1097,24 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableStringProp.GetHashCode(); } - if (this.NotrequiredNullableStringProp != null) + if (this.NotrequiredNullableStringProp.IsSet && this.NotrequiredNullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableStringProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableStringProp != null) + if (this.NotrequiredNotnullableStringProp.IsSet && this.NotrequiredNotnullableStringProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableStringProp.Value.GetHashCode(); } - if (this.RequiredNullableBooleanProp != null) + hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); + if (this.NotrequiredNullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.RequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.RequiredNotnullableBooleanProp.GetHashCode(); - if (this.NotrequiredNullableBooleanProp != null) + if (this.NotrequiredNotnullableBooleanProp.IsSet) { - hashCode = (hashCode * 59) + this.NotrequiredNullableBooleanProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.NotrequiredNotnullableBooleanProp.GetHashCode(); if (this.RequiredNullableDateProp != null) { hashCode = (hashCode * 59) + this.RequiredNullableDateProp.GetHashCode(); @@ -1143,13 +1123,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotNullableDateProp.GetHashCode(); } - if (this.NotRequiredNullableDateProp != null) + if (this.NotRequiredNullableDateProp.IsSet && this.NotRequiredNullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNullableDateProp.Value.GetHashCode(); } - if (this.NotRequiredNotnullableDateProp != null) + if (this.NotRequiredNotnullableDateProp.IsSet && this.NotRequiredNotnullableDateProp.Value != null) { - hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotRequiredNotnullableDateProp.Value.GetHashCode(); } if (this.RequiredNotnullableDatetimeProp != null) { @@ -1159,30 +1139,54 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNullableDatetimeProp.GetHashCode(); } - if (this.NotrequiredNullableDatetimeProp != null) + if (this.NotrequiredNullableDatetimeProp.IsSet && this.NotrequiredNullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableDatetimeProp.Value.GetHashCode(); } - if (this.NotrequiredNotnullableDatetimeProp != null) + if (this.NotrequiredNotnullableDatetimeProp.IsSet && this.NotrequiredNotnullableDatetimeProp.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableDatetimeProp.Value.GetHashCode(); } hashCode = (hashCode * 59) + this.RequiredNullableEnumInteger.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.GetHashCode(); + if (this.NotrequiredNullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumInteger.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumInteger.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumInteger.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableEnumIntegerOnly.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.GetHashCode(); + if (this.NotrequiredNullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumIntegerOnly.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumIntegerOnly.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNotnullableEnumString.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.GetHashCode(); + if (this.NotrequiredNullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableEnumString.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableEnumString.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableEnumString.Value.GetHashCode(); + } hashCode = (hashCode * 59) + this.RequiredNullableOuterEnumDefaultValue.GetHashCode(); hashCode = (hashCode * 59) + this.RequiredNotnullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.GetHashCode(); + if (this.NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNullableOuterEnumDefaultValue.Value.GetHashCode(); + } + if (this.NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + hashCode = (hashCode * 59) + this.NotrequiredNotnullableOuterEnumDefaultValue.Value.GetHashCode(); + } if (this.RequiredNullableUuid != null) { hashCode = (hashCode * 59) + this.RequiredNullableUuid.GetHashCode(); @@ -1191,13 +1195,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableUuid.GetHashCode(); } - if (this.NotrequiredNullableUuid != null) + if (this.NotrequiredNullableUuid.IsSet && this.NotrequiredNullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableUuid.Value.GetHashCode(); } - if (this.NotrequiredNotnullableUuid != null) + if (this.NotrequiredNotnullableUuid.IsSet && this.NotrequiredNotnullableUuid.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableUuid.Value.GetHashCode(); } if (this.RequiredNullableArrayOfString != null) { @@ -1207,13 +1211,13 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RequiredNotnullableArrayOfString.GetHashCode(); } - if (this.NotrequiredNullableArrayOfString != null) + if (this.NotrequiredNullableArrayOfString.IsSet && this.NotrequiredNullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNullableArrayOfString.Value.GetHashCode(); } - if (this.NotrequiredNotnullableArrayOfString != null) + if (this.NotrequiredNotnullableArrayOfString.IsSet && this.NotrequiredNotnullableArrayOfString.Value != null) { - hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.GetHashCode(); + hashCode = (hashCode * 59) + this.NotrequiredNotnullableArrayOfString.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs index e878ddab0b92..2c54aa6d0f94 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -42,21 +43,21 @@ protected Return() { } /// varLock (required). /// varAbstract (required). /// varUnsafe. - public Return(int varReturn = default(int), string varLock = default(string), string varAbstract = default(string), string varUnsafe = default(string)) + public Return(Option varReturn = default(Option), string varLock = default(string), string varAbstract = default(string), Option varUnsafe = default(Option)) { - // to ensure "varLock" is required (not null) + // to ensure "varLock" (not nullable) is not null if (varLock == null) { - throw new ArgumentNullException("varLock is a required property for Return and cannot be null"); + throw new ArgumentNullException("varLock isn't a nullable property for Return and cannot be null"); } - this.Lock = varLock; - // to ensure "varAbstract" is required (not null) - if (varAbstract == null) + // to ensure "varUnsafe" (not nullable) is not null + if (varUnsafe.IsSet && varUnsafe.Value == null) { - throw new ArgumentNullException("varAbstract is a required property for Return and cannot be null"); + throw new ArgumentNullException("varUnsafe isn't a nullable property for Return and cannot be null"); } - this.Abstract = varAbstract; this.VarReturn = varReturn; + this.Lock = varLock; + this.Abstract = varAbstract; this.Unsafe = varUnsafe; } @@ -64,7 +65,7 @@ protected Return() { } /// Gets or Sets VarReturn /// [DataMember(Name = "return", EmitDefaultValue = false)] - public int VarReturn { get; set; } + public Option VarReturn { get; set; } /// /// Gets or Sets Lock @@ -82,7 +83,7 @@ protected Return() { } /// Gets or Sets Unsafe /// [DataMember(Name = "unsafe", EmitDefaultValue = false)] - public string Unsafe { get; set; } + public Option Unsafe { get; set; } /// /// Returns the string presentation of the object @@ -132,7 +133,6 @@ public bool Equals(Return input) } return ( - this.VarReturn == input.VarReturn || this.VarReturn.Equals(input.VarReturn) ) && ( @@ -146,9 +146,8 @@ public bool Equals(Return input) this.Abstract.Equals(input.Abstract)) ) && ( - this.Unsafe == input.Unsafe || - (this.Unsafe != null && - this.Unsafe.Equals(input.Unsafe)) + + this.Unsafe.Equals(input.Unsafe) ); } @@ -161,7 +160,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.VarReturn.GetHashCode(); + if (this.VarReturn.IsSet) + { + hashCode = (hashCode * 59) + this.VarReturn.Value.GetHashCode(); + } if (this.Lock != null) { hashCode = (hashCode * 59) + this.Lock.GetHashCode(); @@ -170,9 +172,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Abstract.GetHashCode(); } - if (this.Unsafe != null) + if (this.Unsafe.IsSet && this.Unsafe.Value != null) { - hashCode = (hashCode * 59) + this.Unsafe.GetHashCode(); + hashCode = (hashCode * 59) + this.Unsafe.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 60b9ac5c0008..0dfc2f79b282 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -35,8 +36,18 @@ public partial class RolesReportsHash : IEquatable /// /// roleUuid. /// role. - public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole)) + public RolesReportsHash(Option roleUuid = default(Option), Option role = default(Option)) { + // to ensure "roleUuid" (not nullable) is not null + if (roleUuid.IsSet && roleUuid.Value == null) + { + throw new ArgumentNullException("roleUuid isn't a nullable property for RolesReportsHash and cannot be null"); + } + // to ensure "role" (not nullable) is not null + if (role.IsSet && role.Value == null) + { + throw new ArgumentNullException("role isn't a nullable property for RolesReportsHash and cannot be null"); + } this.RoleUuid = roleUuid; this.Role = role; } @@ -45,13 +56,13 @@ public partial class RolesReportsHash : IEquatable /// Gets or Sets RoleUuid /// [DataMember(Name = "role_uuid", EmitDefaultValue = false)] - public Guid RoleUuid { get; set; } + public Option RoleUuid { get; set; } /// /// Gets or Sets Role /// [DataMember(Name = "role", EmitDefaultValue = false)] - public RolesReportsHashRole Role { get; set; } + public Option Role { get; set; } /// /// Returns the string presentation of the object @@ -99,14 +110,12 @@ public bool Equals(RolesReportsHash input) } return ( - this.RoleUuid == input.RoleUuid || - (this.RoleUuid != null && - this.RoleUuid.Equals(input.RoleUuid)) + + this.RoleUuid.Equals(input.RoleUuid) ) && ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) + + this.Role.Equals(input.Role) ); } @@ -119,13 +128,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.RoleUuid != null) + if (this.RoleUuid.IsSet && this.RoleUuid.Value != null) { - hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode(); + hashCode = (hashCode * 59) + this.RoleUuid.Value.GetHashCode(); } - if (this.Role != null) + if (this.Role.IsSet && this.Role.Value != null) { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); + hashCode = (hashCode * 59) + this.Role.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 0fe9ed282846..4419232281d0 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class RolesReportsHashRole : IEquatable /// Initializes a new instance of the class. /// /// name. - public RolesReportsHashRole(string name = default(string)) + public RolesReportsHashRole(Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for RolesReportsHashRole and cannot be null"); + } this.Name = name; } @@ -43,7 +49,7 @@ public partial class RolesReportsHashRole : IEquatable /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(RolesReportsHashRole input) } return ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) + + this.Name.Equals(input.Name) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Name != null) + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 2af6ed02f492..0ac9ffbf7494 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -42,17 +43,17 @@ protected ScaleneTriangle() { } /// triangleType (required). public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ScaleneTriangle and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for ScaleneTriangle and cannot be null"); } + this.ShapeType = shapeType; this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 33161dd544ad..b8f564f0890d 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 059b987eb0d8..b9c5001681d5 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,10 +42,10 @@ protected ShapeInterface() { } /// shapeType (required). public ShapeInterface(string shapeType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 4a94799d97ca..bee68e551f87 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index c502ce260dc5..df4e0d5aa6cb 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -42,17 +43,17 @@ protected SimpleQuadrilateral() { } /// quadrilateralType (required). public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { - // to ensure "shapeType" is required (not null) + // to ensure "shapeType" (not nullable) is not null if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("shapeType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) + // to ensure "quadrilateralType" (not nullable) is not null if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); + throw new ArgumentNullException("quadrilateralType isn't a nullable property for SimpleQuadrilateral and cannot be null"); } + this.ShapeType = shapeType; this.QuadrilateralType = quadrilateralType; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 4a637be16619..0fda9845e694 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -35,8 +36,13 @@ public partial class SpecialModelName : IEquatable /// /// specialPropertyName. /// varSpecialModelName. - public SpecialModelName(long specialPropertyName = default(long), string varSpecialModelName = default(string)) + public SpecialModelName(Option specialPropertyName = default(Option), Option varSpecialModelName = default(Option)) { + // to ensure "varSpecialModelName" (not nullable) is not null + if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) + { + throw new ArgumentNullException("varSpecialModelName isn't a nullable property for SpecialModelName and cannot be null"); + } this.SpecialPropertyName = specialPropertyName; this.VarSpecialModelName = varSpecialModelName; } @@ -45,13 +51,13 @@ public partial class SpecialModelName : IEquatable /// Gets or Sets SpecialPropertyName /// [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] - public long SpecialPropertyName { get; set; } + public Option SpecialPropertyName { get; set; } /// /// Gets or Sets VarSpecialModelName /// [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string VarSpecialModelName { get; set; } + public Option VarSpecialModelName { get; set; } /// /// Returns the string presentation of the object @@ -99,13 +105,11 @@ public bool Equals(SpecialModelName input) } return ( - this.SpecialPropertyName == input.SpecialPropertyName || this.SpecialPropertyName.Equals(input.SpecialPropertyName) ) && ( - this.VarSpecialModelName == input.VarSpecialModelName || - (this.VarSpecialModelName != null && - this.VarSpecialModelName.Equals(input.VarSpecialModelName)) + + this.VarSpecialModelName.Equals(input.VarSpecialModelName) ); } @@ -118,10 +122,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.VarSpecialModelName != null) + if (this.SpecialPropertyName.IsSet) + { + hashCode = (hashCode * 59) + this.SpecialPropertyName.Value.GetHashCode(); + } + if (this.VarSpecialModelName.IsSet && this.VarSpecialModelName.Value != null) { - hashCode = (hashCode * 59) + this.VarSpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.VarSpecialModelName.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 5699133e6672..b9352a9bb413 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -35,8 +36,13 @@ public partial class Tag : IEquatable /// /// id. /// name. - public Tag(long id = default(long), string name = default(string)) + public Tag(Option id = default(Option), Option name = default(Option)) { + // to ensure "name" (not nullable) is not null + if (name.IsSet && name.Value == null) + { + throw new ArgumentNullException("name isn't a nullable property for Tag and cannot be null"); + } this.Id = id; this.Name = name; } @@ -45,13 +51,13 @@ public partial class Tag : IEquatable /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Name /// [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } + public Option Name { get; set; } /// /// Returns the string presentation of the object @@ -99,13 +105,11 @@ public bool Equals(Tag input) } return ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) + + this.Name.Equals(input.Name) ); } @@ -118,10 +122,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Name.IsSet && this.Name.Value != null) { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); + hashCode = (hashCode * 59) + this.Name.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index aa8b827e602e..6976c91fa72b 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class TestCollectionEndingWithWordList : IEquatable class. /// /// value. - public TestCollectionEndingWithWordList(string value = default(string)) + public TestCollectionEndingWithWordList(Option value = default(Option)) { + // to ensure "value" (not nullable) is not null + if (value.IsSet && value.Value == null) + { + throw new ArgumentNullException("value isn't a nullable property for TestCollectionEndingWithWordList and cannot be null"); + } this.Value = value; } @@ -43,7 +49,7 @@ public partial class TestCollectionEndingWithWordList : IEquatable [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } + public Option Value { get; set; } /// /// Returns the string presentation of the object @@ -90,9 +96,8 @@ public bool Equals(TestCollectionEndingWithWordList input) } return ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) + + this.Value.Equals(input.Value) ); } @@ -105,9 +110,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Value != null) + if (this.Value.IsSet && this.Value.Value != null) { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 0a0740c31ccc..a64e3bdc9257 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable class. /// /// testCollectionEndingWithWordList. - public TestCollectionEndingWithWordListObject(List testCollectionEndingWithWordList = default(List)) + public TestCollectionEndingWithWordListObject(Option> testCollectionEndingWithWordList = default(Option>)) { + // to ensure "testCollectionEndingWithWordList" (not nullable) is not null + if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) + { + throw new ArgumentNullException("testCollectionEndingWithWordList isn't a nullable property for TestCollectionEndingWithWordListObject and cannot be null"); + } this.TestCollectionEndingWithWordList = testCollectionEndingWithWordList; } @@ -43,7 +49,7 @@ public partial class TestCollectionEndingWithWordListObject : IEquatable [DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)] - public List TestCollectionEndingWithWordList { get; set; } + public Option> TestCollectionEndingWithWordList { get; set; } /// /// Returns the string presentation of the object @@ -90,10 +96,10 @@ public bool Equals(TestCollectionEndingWithWordListObject input) } return ( - this.TestCollectionEndingWithWordList == input.TestCollectionEndingWithWordList || - this.TestCollectionEndingWithWordList != null && - input.TestCollectionEndingWithWordList != null && - this.TestCollectionEndingWithWordList.SequenceEqual(input.TestCollectionEndingWithWordList) + + this.TestCollectionEndingWithWordList.IsSet && this.TestCollectionEndingWithWordList.Value != null && + input.TestCollectionEndingWithWordList.IsSet && input.TestCollectionEndingWithWordList.Value != null && + this.TestCollectionEndingWithWordList.Value.SequenceEqual(input.TestCollectionEndingWithWordList.Value) ); } @@ -106,9 +112,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.TestCollectionEndingWithWordList != null) + if (this.TestCollectionEndingWithWordList.IsSet && this.TestCollectionEndingWithWordList.Value != null) { - hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.GetHashCode(); + hashCode = (hashCode * 59) + this.TestCollectionEndingWithWordList.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index b64d51277036..0558ae173f90 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -34,8 +35,13 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Initializes a new instance of the class. /// /// someProperty. - public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) + public TestInlineFreeformAdditionalPropertiesRequest(Option someProperty = default(Option)) { + // to ensure "someProperty" (not nullable) is not null + if (someProperty.IsSet && someProperty.Value == null) + { + throw new ArgumentNullException("someProperty isn't a nullable property for TestInlineFreeformAdditionalPropertiesRequest and cannot be null"); + } this.SomeProperty = someProperty; this.AdditionalProperties = new Dictionary(); } @@ -44,7 +50,7 @@ public partial class TestInlineFreeformAdditionalPropertiesRequest : IEquatable< /// Gets or Sets SomeProperty /// [DataMember(Name = "someProperty", EmitDefaultValue = false)] - public string SomeProperty { get; set; } + public Option SomeProperty { get; set; } /// /// Gets or Sets additional properties @@ -98,9 +104,8 @@ public bool Equals(TestInlineFreeformAdditionalPropertiesRequest input) } return ( - this.SomeProperty == input.SomeProperty || - (this.SomeProperty != null && - this.SomeProperty.Equals(input.SomeProperty)) + + this.SomeProperty.Equals(input.SomeProperty) ) && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); } @@ -114,9 +119,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.SomeProperty != null) + if (this.SomeProperty.IsSet && this.SomeProperty.Value != null) { - hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode(); + hashCode = (hashCode * 59) + this.SomeProperty.Value.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 6896dff7853b..11c235f1323b 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index 01e75d079627..f2018e303206 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,10 +42,10 @@ protected TriangleInterface() { } /// triangleType (required). public TriangleInterface(string triangleType = default(string)) { - // to ensure "triangleType" is required (not null) + // to ensure "triangleType" (not nullable) is not null if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); + throw new ArgumentNullException("triangleType isn't a nullable property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs index 03599102829c..7530720a4be1 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -45,8 +46,43 @@ public partial class User : IEquatable /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) + public User(Option id = default(Option), Option username = default(Option), Option firstName = default(Option), Option lastName = default(Option), Option email = default(Option), Option password = default(Option), Option phone = default(Option), Option userStatus = default(Option), Option objectWithNoDeclaredProps = default(Option), Option objectWithNoDeclaredPropsNullable = default(Option), Option anyTypeProp = default(Option), Option anyTypePropNullable = default(Option)) { + // to ensure "username" (not nullable) is not null + if (username.IsSet && username.Value == null) + { + throw new ArgumentNullException("username isn't a nullable property for User and cannot be null"); + } + // to ensure "firstName" (not nullable) is not null + if (firstName.IsSet && firstName.Value == null) + { + throw new ArgumentNullException("firstName isn't a nullable property for User and cannot be null"); + } + // to ensure "lastName" (not nullable) is not null + if (lastName.IsSet && lastName.Value == null) + { + throw new ArgumentNullException("lastName isn't a nullable property for User and cannot be null"); + } + // to ensure "email" (not nullable) is not null + if (email.IsSet && email.Value == null) + { + throw new ArgumentNullException("email isn't a nullable property for User and cannot be null"); + } + // to ensure "password" (not nullable) is not null + if (password.IsSet && password.Value == null) + { + throw new ArgumentNullException("password isn't a nullable property for User and cannot be null"); + } + // to ensure "phone" (not nullable) is not null + if (phone.IsSet && phone.Value == null) + { + throw new ArgumentNullException("phone isn't a nullable property for User and cannot be null"); + } + // to ensure "objectWithNoDeclaredProps" (not nullable) is not null + if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) + { + throw new ArgumentNullException("objectWithNoDeclaredProps isn't a nullable property for User and cannot be null"); + } this.Id = id; this.Username = username; this.FirstName = firstName; @@ -65,78 +101,78 @@ public partial class User : IEquatable /// Gets or Sets Id /// [DataMember(Name = "id", EmitDefaultValue = false)] - public long Id { get; set; } + public Option Id { get; set; } /// /// Gets or Sets Username /// [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } + public Option Username { get; set; } /// /// Gets or Sets FirstName /// [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } + public Option FirstName { get; set; } /// /// Gets or Sets LastName /// [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } + public Option LastName { get; set; } /// /// Gets or Sets Email /// [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } + public Option Email { get; set; } /// /// Gets or Sets Password /// [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } + public Option Password { get; set; } /// /// Gets or Sets Phone /// [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } + public Option Phone { get; set; } /// /// User Status /// /// User Status [DataMember(Name = "userStatus", EmitDefaultValue = false)] - public int UserStatus { get; set; } + public Option UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] - public Object ObjectWithNoDeclaredProps { get; set; } + public Option ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] - public Object ObjectWithNoDeclaredPropsNullable { get; set; } + public Option ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] - public Object AnyTypeProp { get; set; } + public Option AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] - public Object AnyTypePropNullable { get; set; } + public Option AnyTypePropNullable { get; set; } /// /// Returns the string presentation of the object @@ -194,62 +230,50 @@ public bool Equals(User input) } return ( - this.Id == input.Id || this.Id.Equals(input.Id) ) && ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) + + this.Username.Equals(input.Username) ) && ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) + + this.FirstName.Equals(input.FirstName) ) && ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) + + this.LastName.Equals(input.LastName) ) && ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) + + this.Email.Equals(input.Email) ) && ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) + + this.Password.Equals(input.Password) ) && ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) + + this.Phone.Equals(input.Phone) ) && ( - this.UserStatus == input.UserStatus || this.UserStatus.Equals(input.UserStatus) ) && ( - this.ObjectWithNoDeclaredProps == input.ObjectWithNoDeclaredProps || - (this.ObjectWithNoDeclaredProps != null && - this.ObjectWithNoDeclaredProps.Equals(input.ObjectWithNoDeclaredProps)) + + this.ObjectWithNoDeclaredProps.Equals(input.ObjectWithNoDeclaredProps) ) && ( - this.ObjectWithNoDeclaredPropsNullable == input.ObjectWithNoDeclaredPropsNullable || - (this.ObjectWithNoDeclaredPropsNullable != null && - this.ObjectWithNoDeclaredPropsNullable.Equals(input.ObjectWithNoDeclaredPropsNullable)) + + this.ObjectWithNoDeclaredPropsNullable.Equals(input.ObjectWithNoDeclaredPropsNullable) ) && ( - this.AnyTypeProp == input.AnyTypeProp || - (this.AnyTypeProp != null && - this.AnyTypeProp.Equals(input.AnyTypeProp)) + + this.AnyTypeProp.Equals(input.AnyTypeProp) ) && ( - this.AnyTypePropNullable == input.AnyTypePropNullable || - (this.AnyTypePropNullable != null && - this.AnyTypePropNullable.Equals(input.AnyTypePropNullable)) + + this.AnyTypePropNullable.Equals(input.AnyTypePropNullable) ); } @@ -262,47 +286,53 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) + if (this.Id.IsSet) + { + hashCode = (hashCode * 59) + this.Id.Value.GetHashCode(); + } + if (this.Username.IsSet && this.Username.Value != null) + { + hashCode = (hashCode * 59) + this.Username.Value.GetHashCode(); + } + if (this.FirstName.IsSet && this.FirstName.Value != null) { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); + hashCode = (hashCode * 59) + this.FirstName.Value.GetHashCode(); } - if (this.FirstName != null) + if (this.LastName.IsSet && this.LastName.Value != null) { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + hashCode = (hashCode * 59) + this.LastName.Value.GetHashCode(); } - if (this.LastName != null) + if (this.Email.IsSet && this.Email.Value != null) { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + hashCode = (hashCode * 59) + this.Email.Value.GetHashCode(); } - if (this.Email != null) + if (this.Password.IsSet && this.Password.Value != null) { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); + hashCode = (hashCode * 59) + this.Password.Value.GetHashCode(); } - if (this.Password != null) + if (this.Phone.IsSet && this.Phone.Value != null) { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); + hashCode = (hashCode * 59) + this.Phone.Value.GetHashCode(); } - if (this.Phone != null) + if (this.UserStatus.IsSet) { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); + hashCode = (hashCode * 59) + this.UserStatus.Value.GetHashCode(); } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) + if (this.ObjectWithNoDeclaredProps.IsSet && this.ObjectWithNoDeclaredProps.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.Value.GetHashCode(); } - if (this.ObjectWithNoDeclaredPropsNullable != null) + if (this.ObjectWithNoDeclaredPropsNullable.IsSet && this.ObjectWithNoDeclaredPropsNullable.Value != null) { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.Value.GetHashCode(); } - if (this.AnyTypeProp != null) + if (this.AnyTypeProp.IsSet && this.AnyTypeProp.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypeProp.Value.GetHashCode(); } - if (this.AnyTypePropNullable != null) + if (this.AnyTypePropNullable.IsSet && this.AnyTypePropNullable.Value != null) { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); + hashCode = (hashCode * 59) + this.AnyTypePropNullable.Value.GetHashCode(); } return hashCode; } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 19775ac703bc..ad91a4843711 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -41,29 +42,29 @@ protected Whale() { } /// hasBaleen. /// hasTeeth. /// className (required). - public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) + public Whale(Option hasBaleen = default(Option), Option hasTeeth = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Whale and cannot be null"); } - this.ClassName = className; this.HasBaleen = hasBaleen; this.HasTeeth = hasTeeth; + this.ClassName = className; } /// /// Gets or Sets HasBaleen /// [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] - public bool HasBaleen { get; set; } + public Option HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] - public bool HasTeeth { get; set; } + public Option HasTeeth { get; set; } /// /// Gets or Sets ClassName @@ -118,11 +119,9 @@ public bool Equals(Whale input) } return ( - this.HasBaleen == input.HasBaleen || this.HasBaleen.Equals(input.HasBaleen) ) && ( - this.HasTeeth == input.HasTeeth || this.HasTeeth.Equals(input.HasTeeth) ) && ( @@ -141,8 +140,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); + if (this.HasBaleen.IsSet) + { + hashCode = (hashCode * 59) + this.HasBaleen.Value.GetHashCode(); + } + if (this.HasTeeth.IsSet) + { + hashCode = (hashCode * 59) + this.HasTeeth.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index e08246f7a4a5..5136a7f92fb6 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -60,7 +61,7 @@ public enum TypeEnum /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } + public Option Type { get; set; } /// /// Initializes a new instance of the class. /// @@ -74,15 +75,15 @@ protected Zebra() /// /// type. /// className (required). - public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) + public Zebra(Option type = default(Option), string className = default(string)) { - // to ensure "className" is required (not null) + // to ensure "className" (not nullable) is not null if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); + throw new ArgumentNullException("className isn't a nullable property for Zebra and cannot be null"); } - this.ClassName = className; this.Type = type; + this.ClassName = className; this.AdditionalProperties = new Dictionary(); } @@ -145,7 +146,6 @@ public bool Equals(Zebra input) } return ( - this.Type == input.Type || this.Type.Equals(input.Type) ) && ( @@ -165,7 +165,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Type.IsSet) + { + hashCode = (hashCode * 59) + this.Type.Value.GetHashCode(); + } if (this.ClassName != null) { hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs index e73925f4aee4..6db9f6c94834 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnum.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index fe2e61437ee4..624f9bfeb849 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -17,6 +17,7 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using Org.OpenAPITools.Client; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; @@ -54,12 +55,12 @@ public enum ZeroBasedEnumEnum /// Gets or Sets ZeroBasedEnum /// [DataMember(Name = "ZeroBasedEnum", EmitDefaultValue = false)] - public ZeroBasedEnumEnum? ZeroBasedEnum { get; set; } + public Option ZeroBasedEnum { get; set; } /// /// Initializes a new instance of the class. /// /// zeroBasedEnum. - public ZeroBasedEnumClass(ZeroBasedEnumEnum? zeroBasedEnum = default(ZeroBasedEnumEnum?)) + public ZeroBasedEnumClass(Option zeroBasedEnum = default(Option)) { this.ZeroBasedEnum = zeroBasedEnum; } @@ -109,7 +110,6 @@ public bool Equals(ZeroBasedEnumClass input) } return ( - this.ZeroBasedEnum == input.ZeroBasedEnum || this.ZeroBasedEnum.Equals(input.ZeroBasedEnum) ); } @@ -123,7 +123,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.ZeroBasedEnum.GetHashCode(); + if (this.ZeroBasedEnum.IsSet) + { + hashCode = (hashCode * 59) + this.ZeroBasedEnum.Value.GetHashCode(); + } return hashCode; } } From 24b314aaeabf03231b5efb9416ec59064675979f Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 3 Nov 2025 15:11:54 +0100 Subject: [PATCH 32/44] fix tests --- .../src/Org.OpenAPITools.Test/Api/BodyApiTests.cs | 2 +- .../csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs index 06da198a3efa..37035011203d 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs @@ -97,7 +97,7 @@ public void TestEchoBodyFreeFormObjectResponseStringTest() [Fact] public void TestEchoBodyPetTest() { - Pet? pet = new Pet(123, "cat", new Category() { Id = 12, Name = "Test" }, new List(){"http://google.com"},null, null); + Pet? pet = new Pet(123, "cat", new Category() { Id = 12, Name = "Test" }, new List(){"http://google.com"}); var response = instance.TestEchoBodyPet(pet); Assert.IsType(response); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs index 06b930205b5c..9a5acbb58528 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs @@ -23,7 +23,7 @@ public void TestEchoBodyPet() Pet p = bodyApi.TestEchoBodyPet(queryObject); Assert.NotNull(p); Assert.Equal("Hello World", p.Name); - Assert.Equal(12345L, p.Id); + Assert.Equal(12345L, p.Id.Value); // response is empty body Pet p2 = bodyApi.TestEchoBodyPet(null); From b9f531f68cc9d0ce14276d55273307fc0c9dc1eb Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 3 Nov 2025 15:12:09 +0100 Subject: [PATCH 33/44] Fix api.mustache --- .../src/main/resources/csharp/api.mustache | 17 +++++++++++++-- .../csharp/libraries/httpclient/api.mustache | 21 +++++++++++++++---- .../libraries/unityWebRequest/api.mustache | 21 +++++++++++++++---- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index 68e73cd0b518..1dbc732928b7 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -314,7 +314,15 @@ namespace {{packageName}}.{{apiPackage}} {{#required}} {{#isDeepObject}} {{#items.vars}} + {{#required}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + {{/required}} + {{^required}} + if ({{paramName}}.{{name}}.IsSet) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}}.Value)); + } + {{/required}} {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); @@ -329,10 +337,15 @@ namespace {{packageName}}.{{apiPackage}} { {{#isDeepObject}} {{#items.vars}} - if ({{paramName}}.Value.{{name}} != null) + {{#required}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.Value.{{name}})); + {{/required}} + {{^required}} + if ({{paramName}}.Value.{{name}}.IsSet) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.Value.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.Value.{{name}}.Value)); } + {{/required}} {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}}.Value)); diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache index 16e4f85a6211..b1fa7329323f 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/httpclient/api.mustache @@ -398,7 +398,15 @@ namespace {{packageName}}.{{apiPackage}} {{#required}} {{#isDeepObject}} {{#items.vars}} + {{#required}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + {{/required}} + {{^required}} + if ({{paramName}}.{{name}}.IsSet) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}}.Value)); + } + {{/required}} {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); @@ -412,12 +420,17 @@ namespace {{packageName}}.{{apiPackage}} if ({{paramName}}.IsSet) { {{#isDeepObject}} - {{#items.vars}} - if ({{paramName}}.Value.{{name}} != null) + {{#items.vars}} + {{#required}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value.{{name}})); + {{/required}} + {{^required}} + if ({{paramName}}.Value.{{name}}.IsSet) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value.{{name}}.Value)); } - {{/items.vars}} + {{/required}} + {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}}.Value)); {{/items}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache index 987d3f95c542..32d8e9d14471 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/unityWebRequest/api.mustache @@ -324,7 +324,15 @@ namespace {{packageName}}.{{apiPackage}} {{#required}} {{#isDeepObject}} {{#items.vars}} + {{#required}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + {{/required}} + {{^required}} + if ({{paramName}}.{{name}}.IsSet) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}}.Value)); + } + {{/required}} {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); @@ -338,12 +346,17 @@ namespace {{packageName}}.{{apiPackage}} if ({{paramName}}.IsSet) { {{#isDeepObject}} - {{#items.vars}} - if ({{paramName}}.Value.{{name}} != null) + {{#items.vars}} + {{#required}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value.{{name}})); + {{/required}} + {{^required}} + if ({{paramName}}.Value.{{name}}.IsSet) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.Value.{{name}}.Value)); } - {{/items.vars}} + {{/required}} + {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}}.Value)); {{/items}} From b44670af00621371b9eef6e070caaf0bfdf43c90 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 3 Nov 2025 15:19:20 +0100 Subject: [PATCH 34/44] Fix Query Api --- .../src/Org.OpenAPITools/Api/QueryApi.cs | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs index df9e174fb097..92ed6d51c805 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs @@ -1220,29 +1220,23 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory if (queryObject.IsSet) { - if (queryObject.Value.Id != null) - { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Value.Id)); - } - if (queryObject.Value.Name != null) - { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Value.Name)); - } - if (queryObject.Value.Category != null) + if (queryObject.Value.Id.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Value.Category)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Value.Id.Value)); } - if (queryObject.Value.PhotoUrls != null) + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Value.Name)); + if (queryObject.Value.Category.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.Value.PhotoUrls)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Value.Category.Value)); } - if (queryObject.Value.Tags != null) + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.Value.PhotoUrls)); + if (queryObject.Value.Tags.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Value.Tags)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Value.Tags.Value)); } - if (queryObject.Value.Status != null) + if (queryObject.Value.Status.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Value.Status)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Value.Status.Value)); } } From b2d6c84eb23ee9cb15b141fd65c60dc77895d191 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 3 Nov 2025 16:51:20 +0100 Subject: [PATCH 35/44] Fix ToString --- .../src/main/resources/csharp/modelGeneric.mustache | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 0f44df83604e..3b926aa7203e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -303,7 +303,17 @@ sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); {{/parent}} {{#vars}} + {{#required}} sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); + {{/required}} + {{^required}} + sb.Append(" {{name}}: "); + if ({{name}}.IsSet) + { + sb.Append({{name}}.Value); + } + sb.Append("\n"); + {{/required}} {{/vars}} {{#isAdditionalPropertiesTrue}} sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); From 348bb539138d8d2a0984c728465c63e8daacfed0 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 3 Nov 2025 16:52:37 +0100 Subject: [PATCH 36/44] Generate samples --- .../src/Org.OpenAPITools/Model/Bird.cs | 14 +- .../src/Org.OpenAPITools/Model/Category.cs | 14 +- .../src/Org.OpenAPITools/Model/DataQuery.cs | 21 ++- .../Org.OpenAPITools/Model/DefaultValue.cs | 56 +++++- .../Model/NumberPropertiesOnly.cs | 21 ++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../src/Org.OpenAPITools/Model/Query.cs | 14 +- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../TestFormObjectMultipartRequestMarker.cs | 7 +- ...lodeTrueObjectAllOfQueryObjectParameter.cs | 28 ++- ...lodeTrueArrayStringQueryObjectParameter.cs | 7 +- .../Model/MultipartArrayRequest.cs | 7 +- .../Model/MultipartMixedRequest.cs | 14 +- .../Model/MultipartMixedRequestMarker.cs | 7 +- .../Model/MultipartSingleRequest.cs | 7 +- .../src/Org.OpenAPITools/Model/Activity.cs | 7 +- .../ActivityOutputElementRepresentation.cs | 14 +- .../Model/AdditionalPropertiesClass.cs | 56 +++++- .../src/Org.OpenAPITools/Model/Animal.cs | 7 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 21 ++- .../src/Org.OpenAPITools/Model/Apple.cs | 21 ++- .../src/Org.OpenAPITools/Model/AppleReq.cs | 7 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 7 +- .../Model/ArrayOfNumberOnly.cs | 7 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 21 ++- .../src/Org.OpenAPITools/Model/Banana.cs | 7 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 7 +- .../Org.OpenAPITools/Model/Capitalization.cs | 42 ++++- .../src/Org.OpenAPITools/Model/Cat.cs | 7 +- .../src/Org.OpenAPITools/Model/Category.cs | 7 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 7 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 7 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 7 +- .../Model/DeprecatedObject.cs | 7 +- .../src/Org.OpenAPITools/Model/Dog.cs | 7 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 28 ++- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 14 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 56 +++++- .../src/Org.OpenAPITools/Model/File.cs | 7 +- .../Model/FileSchemaTestClass.cs | 14 +- .../src/Org.OpenAPITools/Model/Foo.cs | 7 +- .../Model/FooGetDefaultResponse.cs | 7 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 105 +++++++++-- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 14 +- .../Model/HealthCheckResult.cs | 7 +- .../src/Org.OpenAPITools/Model/List.cs | 7 +- .../Model/LiteralStringClass.cs | 14 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixLog.cs | 168 +++++++++++++++--- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 7 +- .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 7 +- ...dPropertiesAndAdditionalPropertiesClass.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 7 +- .../Model/Model200Response.cs | 14 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 7 +- .../src/Org.OpenAPITools/Model/Name.cs | 21 ++- .../Org.OpenAPITools/Model/NullableClass.cs | 84 +++++++-- .../Model/NullableGuidClass.cs | 7 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 7 +- .../Model/ObjectWithDeprecatedFields.cs | 28 ++- .../src/Org.OpenAPITools/Model/Order.cs | 42 ++++- .../Org.OpenAPITools/Model/OuterComposite.cs | 21 ++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 14 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 154 +++++++++++++--- .../src/Org.OpenAPITools/Model/Return.cs | 14 +- .../Model/RolesReportsHash.cs | 14 +- .../Model/RolesReportsHashRole.cs | 7 +- .../Model/SpecialModelName.cs | 14 +- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../Model/TestCollectionEndingWithWordList.cs | 7 +- .../TestCollectionEndingWithWordListObject.cs | 7 +- ...lineFreeformAdditionalPropertiesRequest.cs | 7 +- .../src/Org.OpenAPITools/Model/User.cs | 84 +++++++-- .../src/Org.OpenAPITools/Model/Whale.cs | 14 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 7 +- .../Model/ZeroBasedEnumClass.cs | 7 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 21 ++- .../src/Org.OpenAPITools/Model/Category.cs | 14 +- .../src/Org.OpenAPITools/Model/Order.cs | 42 ++++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../src/Org.OpenAPITools/Model/User.cs | 56 +++++- .../src/Org.OpenAPITools/Model/Activity.cs | 7 +- .../ActivityOutputElementRepresentation.cs | 14 +- .../Model/AdditionalPropertiesClass.cs | 56 +++++- .../src/Org.OpenAPITools/Model/Animal.cs | 7 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 21 ++- .../src/Org.OpenAPITools/Model/Apple.cs | 21 ++- .../src/Org.OpenAPITools/Model/AppleReq.cs | 7 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 7 +- .../Model/ArrayOfNumberOnly.cs | 7 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 21 ++- .../src/Org.OpenAPITools/Model/Banana.cs | 7 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 7 +- .../Org.OpenAPITools/Model/Capitalization.cs | 42 ++++- .../src/Org.OpenAPITools/Model/Cat.cs | 7 +- .../src/Org.OpenAPITools/Model/Category.cs | 7 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 7 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 7 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 7 +- .../Model/DeprecatedObject.cs | 7 +- .../src/Org.OpenAPITools/Model/Dog.cs | 7 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 28 ++- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 14 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 56 +++++- .../src/Org.OpenAPITools/Model/File.cs | 7 +- .../Model/FileSchemaTestClass.cs | 14 +- .../src/Org.OpenAPITools/Model/Foo.cs | 7 +- .../Model/FooGetDefaultResponse.cs | 7 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 105 +++++++++-- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 14 +- .../Model/HealthCheckResult.cs | 7 +- .../src/Org.OpenAPITools/Model/List.cs | 7 +- .../Model/LiteralStringClass.cs | 14 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 7 +- .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 7 +- ...dPropertiesAndAdditionalPropertiesClass.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 7 +- .../Model/Model200Response.cs | 14 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 7 +- .../src/Org.OpenAPITools/Model/Name.cs | 21 ++- .../Org.OpenAPITools/Model/NullableClass.cs | 84 +++++++-- .../Model/NullableGuidClass.cs | 7 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 7 +- .../Model/ObjectWithDeprecatedFields.cs | 28 ++- .../src/Org.OpenAPITools/Model/Order.cs | 42 ++++- .../Org.OpenAPITools/Model/OuterComposite.cs | 21 ++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 14 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 154 +++++++++++++--- .../src/Org.OpenAPITools/Model/Return.cs | 7 +- .../Model/RolesReportsHash.cs | 14 +- .../Model/RolesReportsHashRole.cs | 7 +- .../Model/SpecialModelName.cs | 14 +- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../Model/TestCollectionEndingWithWordList.cs | 7 +- .../TestCollectionEndingWithWordListObject.cs | 7 +- ...lineFreeformAdditionalPropertiesRequest.cs | 7 +- .../src/Org.OpenAPITools/Model/User.cs | 84 +++++++-- .../src/Org.OpenAPITools/Model/Whale.cs | 14 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 7 +- .../Model/ZeroBasedEnumClass.cs | 7 +- .../src/Org.OpenAPITools/Model/Activity.cs | 7 +- .../ActivityOutputElementRepresentation.cs | 14 +- .../Model/AdditionalPropertiesClass.cs | 56 +++++- .../src/Org.OpenAPITools/Model/Animal.cs | 7 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 21 ++- .../src/Org.OpenAPITools/Model/Apple.cs | 21 ++- .../src/Org.OpenAPITools/Model/AppleReq.cs | 7 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 7 +- .../Model/ArrayOfNumberOnly.cs | 7 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 21 ++- .../src/Org.OpenAPITools/Model/Banana.cs | 7 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 7 +- .../Org.OpenAPITools/Model/Capitalization.cs | 42 ++++- .../src/Org.OpenAPITools/Model/Cat.cs | 7 +- .../src/Org.OpenAPITools/Model/Category.cs | 7 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 7 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 7 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 7 +- .../Model/DeprecatedObject.cs | 7 +- .../src/Org.OpenAPITools/Model/Dog.cs | 7 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 28 ++- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 14 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 56 +++++- .../src/Org.OpenAPITools/Model/File.cs | 7 +- .../Model/FileSchemaTestClass.cs | 14 +- .../src/Org.OpenAPITools/Model/Foo.cs | 7 +- .../Model/FooGetDefaultResponse.cs | 7 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 105 +++++++++-- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 14 +- .../Model/HealthCheckResult.cs | 7 +- .../src/Org.OpenAPITools/Model/List.cs | 7 +- .../Model/LiteralStringClass.cs | 14 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 7 +- .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 7 +- ...dPropertiesAndAdditionalPropertiesClass.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 7 +- .../Model/Model200Response.cs | 14 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 7 +- .../src/Org.OpenAPITools/Model/Name.cs | 21 ++- .../Org.OpenAPITools/Model/NullableClass.cs | 84 +++++++-- .../Model/NullableGuidClass.cs | 7 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 7 +- .../Model/ObjectWithDeprecatedFields.cs | 28 ++- .../src/Org.OpenAPITools/Model/Order.cs | 42 ++++- .../Org.OpenAPITools/Model/OuterComposite.cs | 21 ++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 14 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 154 +++++++++++++--- .../src/Org.OpenAPITools/Model/Return.cs | 7 +- .../Model/RolesReportsHash.cs | 14 +- .../Model/RolesReportsHashRole.cs | 7 +- .../Model/SpecialModelName.cs | 14 +- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../Model/TestCollectionEndingWithWordList.cs | 7 +- .../TestCollectionEndingWithWordListObject.cs | 7 +- ...lineFreeformAdditionalPropertiesRequest.cs | 7 +- .../src/Org.OpenAPITools/Model/User.cs | 84 +++++++-- .../src/Org.OpenAPITools/Model/Whale.cs | 14 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 7 +- .../Model/ZeroBasedEnumClass.cs | 7 +- .../src/Org.OpenAPITools/Model/Env.cs | 7 +- .../Model/PropertyNameMapping.cs | 28 ++- .../src/Org.OpenAPITools/Model/Activity.cs | 7 +- .../ActivityOutputElementRepresentation.cs | 14 +- .../Model/AdditionalPropertiesClass.cs | 56 +++++- .../src/Org.OpenAPITools/Model/Animal.cs | 7 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 21 ++- .../src/Org.OpenAPITools/Model/Apple.cs | 21 ++- .../src/Org.OpenAPITools/Model/AppleReq.cs | 7 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 7 +- .../Model/ArrayOfNumberOnly.cs | 7 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 21 ++- .../src/Org.OpenAPITools/Model/Banana.cs | 7 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 7 +- .../Org.OpenAPITools/Model/Capitalization.cs | 42 ++++- .../src/Org.OpenAPITools/Model/Cat.cs | 7 +- .../src/Org.OpenAPITools/Model/Category.cs | 7 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 7 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 7 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 7 +- .../Model/DeprecatedObject.cs | 7 +- .../src/Org.OpenAPITools/Model/Dog.cs | 7 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 28 ++- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 14 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 56 +++++- .../src/Org.OpenAPITools/Model/File.cs | 7 +- .../Model/FileSchemaTestClass.cs | 14 +- .../src/Org.OpenAPITools/Model/Foo.cs | 7 +- .../Model/FooGetDefaultResponse.cs | 7 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 105 +++++++++-- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 14 +- .../Model/HealthCheckResult.cs | 7 +- .../src/Org.OpenAPITools/Model/List.cs | 7 +- .../Model/LiteralStringClass.cs | 14 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 7 +- .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 7 +- ...dPropertiesAndAdditionalPropertiesClass.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 7 +- .../Model/Model200Response.cs | 14 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 7 +- .../src/Org.OpenAPITools/Model/Name.cs | 21 ++- .../Org.OpenAPITools/Model/NullableClass.cs | 84 +++++++-- .../Model/NullableGuidClass.cs | 7 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 7 +- .../Model/ObjectWithDeprecatedFields.cs | 28 ++- .../src/Org.OpenAPITools/Model/Order.cs | 42 ++++- .../Org.OpenAPITools/Model/OuterComposite.cs | 21 ++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 14 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 154 +++++++++++++--- .../src/Org.OpenAPITools/Model/Return.cs | 7 +- .../Model/RolesReportsHash.cs | 14 +- .../Model/RolesReportsHashRole.cs | 7 +- .../Model/SpecialModelName.cs | 14 +- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../Model/TestCollectionEndingWithWordList.cs | 7 +- .../TestCollectionEndingWithWordListObject.cs | 7 +- ...lineFreeformAdditionalPropertiesRequest.cs | 7 +- .../src/Org.OpenAPITools/Model/User.cs | 84 +++++++-- .../src/Org.OpenAPITools/Model/Whale.cs | 14 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 7 +- .../Model/ZeroBasedEnumClass.cs | 7 +- .../src/Org.OpenAPITools/Model/Activity.cs | 7 +- .../ActivityOutputElementRepresentation.cs | 14 +- .../Model/AdditionalPropertiesClass.cs | 56 +++++- .../src/Org.OpenAPITools/Model/Animal.cs | 7 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 21 ++- .../src/Org.OpenAPITools/Model/Apple.cs | 21 ++- .../src/Org.OpenAPITools/Model/AppleReq.cs | 7 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 7 +- .../Model/ArrayOfNumberOnly.cs | 7 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 21 ++- .../src/Org.OpenAPITools/Model/Banana.cs | 7 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 7 +- .../Org.OpenAPITools/Model/Capitalization.cs | 42 ++++- .../src/Org.OpenAPITools/Model/Cat.cs | 7 +- .../src/Org.OpenAPITools/Model/Category.cs | 7 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 7 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 7 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 7 +- .../Model/DeprecatedObject.cs | 7 +- .../src/Org.OpenAPITools/Model/Dog.cs | 7 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 28 ++- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 14 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 56 +++++- .../src/Org.OpenAPITools/Model/File.cs | 7 +- .../Model/FileSchemaTestClass.cs | 14 +- .../src/Org.OpenAPITools/Model/Foo.cs | 7 +- .../Model/FooGetDefaultResponse.cs | 7 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 105 +++++++++-- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 14 +- .../Model/HealthCheckResult.cs | 7 +- .../src/Org.OpenAPITools/Model/List.cs | 7 +- .../Model/LiteralStringClass.cs | 14 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixLog.cs | 168 +++++++++++++++--- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 7 +- .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 7 +- ...dPropertiesAndAdditionalPropertiesClass.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 7 +- .../Model/Model200Response.cs | 14 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 7 +- .../src/Org.OpenAPITools/Model/Name.cs | 21 ++- .../Org.OpenAPITools/Model/NullableClass.cs | 84 +++++++-- .../Model/NullableGuidClass.cs | 7 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 7 +- .../Model/ObjectWithDeprecatedFields.cs | 28 ++- .../src/Org.OpenAPITools/Model/Order.cs | 42 ++++- .../Org.OpenAPITools/Model/OuterComposite.cs | 21 ++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 14 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 154 +++++++++++++--- .../src/Org.OpenAPITools/Model/Return.cs | 14 +- .../Model/RolesReportsHash.cs | 14 +- .../Model/RolesReportsHashRole.cs | 7 +- .../Model/SpecialModelName.cs | 14 +- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../Model/TestCollectionEndingWithWordList.cs | 7 +- .../TestCollectionEndingWithWordListObject.cs | 7 +- ...lineFreeformAdditionalPropertiesRequest.cs | 7 +- .../src/Org.OpenAPITools/Model/User.cs | 84 +++++++-- .../src/Org.OpenAPITools/Model/Whale.cs | 14 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 7 +- .../Model/ZeroBasedEnumClass.cs | 7 +- .../Model/NowGet200Response.cs | 14 +- .../src/Org.OpenAPITools/Model/Activity.cs | 7 +- .../ActivityOutputElementRepresentation.cs | 14 +- .../Model/AdditionalPropertiesClass.cs | 56 +++++- .../src/Org.OpenAPITools/Model/Animal.cs | 7 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 21 ++- .../src/Org.OpenAPITools/Model/Apple.cs | 21 ++- .../src/Org.OpenAPITools/Model/AppleReq.cs | 7 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 7 +- .../Model/ArrayOfNumberOnly.cs | 7 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 21 ++- .../src/Org.OpenAPITools/Model/Banana.cs | 7 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 7 +- .../Org.OpenAPITools/Model/Capitalization.cs | 42 ++++- .../src/Org.OpenAPITools/Model/Cat.cs | 7 +- .../src/Org.OpenAPITools/Model/Category.cs | 7 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 7 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 7 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 7 +- .../Model/DeprecatedObject.cs | 7 +- .../src/Org.OpenAPITools/Model/Dog.cs | 7 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 28 ++- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 14 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 56 +++++- .../src/Org.OpenAPITools/Model/File.cs | 7 +- .../Model/FileSchemaTestClass.cs | 14 +- .../src/Org.OpenAPITools/Model/Foo.cs | 7 +- .../Model/FooGetDefaultResponse.cs | 7 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 105 +++++++++-- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 14 +- .../Model/HealthCheckResult.cs | 7 +- .../src/Org.OpenAPITools/Model/List.cs | 7 +- .../Model/LiteralStringClass.cs | 14 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixLog.cs | 168 +++++++++++++++--- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 7 +- .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 7 +- ...dPropertiesAndAdditionalPropertiesClass.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 7 +- .../Model/Model200Response.cs | 14 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 7 +- .../src/Org.OpenAPITools/Model/Name.cs | 21 ++- .../Org.OpenAPITools/Model/NullableClass.cs | 84 +++++++-- .../Model/NullableGuidClass.cs | 7 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 7 +- .../Model/ObjectWithDeprecatedFields.cs | 28 ++- .../src/Org.OpenAPITools/Model/Order.cs | 42 ++++- .../Org.OpenAPITools/Model/OuterComposite.cs | 21 ++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 14 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 154 +++++++++++++--- .../src/Org.OpenAPITools/Model/Return.cs | 14 +- .../Model/RolesReportsHash.cs | 14 +- .../Model/RolesReportsHashRole.cs | 7 +- .../Model/SpecialModelName.cs | 14 +- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../Model/TestCollectionEndingWithWordList.cs | 7 +- .../TestCollectionEndingWithWordListObject.cs | 7 +- ...lineFreeformAdditionalPropertiesRequest.cs | 7 +- .../src/Org.OpenAPITools/Model/User.cs | 84 +++++++-- .../src/Org.OpenAPITools/Model/Whale.cs | 14 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 7 +- .../Model/ZeroBasedEnumClass.cs | 7 +- .../src/Org.OpenAPITools/Model/Activity.cs | 7 +- .../ActivityOutputElementRepresentation.cs | 14 +- .../Model/AdditionalPropertiesClass.cs | 56 +++++- .../src/Org.OpenAPITools/Model/Animal.cs | 7 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 21 ++- .../src/Org.OpenAPITools/Model/Apple.cs | 21 ++- .../src/Org.OpenAPITools/Model/AppleReq.cs | 7 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 7 +- .../Model/ArrayOfNumberOnly.cs | 7 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 21 ++- .../src/Org.OpenAPITools/Model/Banana.cs | 7 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 7 +- .../Org.OpenAPITools/Model/Capitalization.cs | 42 ++++- .../src/Org.OpenAPITools/Model/Cat.cs | 7 +- .../src/Org.OpenAPITools/Model/Category.cs | 7 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 7 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 7 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 7 +- .../Model/DeprecatedObject.cs | 7 +- .../src/Org.OpenAPITools/Model/Dog.cs | 7 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 28 ++- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 14 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 56 +++++- .../src/Org.OpenAPITools/Model/File.cs | 7 +- .../Model/FileSchemaTestClass.cs | 14 +- .../src/Org.OpenAPITools/Model/Foo.cs | 7 +- .../Model/FooGetDefaultResponse.cs | 7 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 105 +++++++++-- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 14 +- .../Model/HealthCheckResult.cs | 7 +- .../src/Org.OpenAPITools/Model/List.cs | 7 +- .../Model/LiteralStringClass.cs | 14 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 7 +- .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 7 +- ...dPropertiesAndAdditionalPropertiesClass.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 7 +- .../Model/Model200Response.cs | 14 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 7 +- .../src/Org.OpenAPITools/Model/Name.cs | 21 ++- .../Org.OpenAPITools/Model/NullableClass.cs | 84 +++++++-- .../Model/NullableGuidClass.cs | 7 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 7 +- .../Model/ObjectWithDeprecatedFields.cs | 28 ++- .../src/Org.OpenAPITools/Model/Order.cs | 42 ++++- .../Org.OpenAPITools/Model/OuterComposite.cs | 21 ++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 14 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 154 +++++++++++++--- .../src/Org.OpenAPITools/Model/Return.cs | 7 +- .../Model/RolesReportsHash.cs | 14 +- .../Model/RolesReportsHashRole.cs | 7 +- .../Model/SpecialModelName.cs | 14 +- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../Model/TestCollectionEndingWithWordList.cs | 7 +- .../TestCollectionEndingWithWordListObject.cs | 7 +- ...lineFreeformAdditionalPropertiesRequest.cs | 7 +- .../src/Org.OpenAPITools/Model/User.cs | 84 +++++++-- .../src/Org.OpenAPITools/Model/Whale.cs | 14 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 7 +- .../Model/ZeroBasedEnumClass.cs | 7 +- .../src/Org.OpenAPITools/Model/Activity.cs | 7 +- .../ActivityOutputElementRepresentation.cs | 14 +- .../Model/AdditionalPropertiesClass.cs | 56 +++++- .../src/Org.OpenAPITools/Model/Animal.cs | 7 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 21 ++- .../src/Org.OpenAPITools/Model/Apple.cs | 21 ++- .../src/Org.OpenAPITools/Model/AppleReq.cs | 7 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 7 +- .../Model/ArrayOfNumberOnly.cs | 7 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 21 ++- .../src/Org.OpenAPITools/Model/Banana.cs | 7 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 7 +- .../Org.OpenAPITools/Model/Capitalization.cs | 42 ++++- .../src/Org.OpenAPITools/Model/Cat.cs | 7 +- .../src/Org.OpenAPITools/Model/Category.cs | 7 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 7 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 7 +- .../Org.OpenAPITools/Model/DateOnlyClass.cs | 7 +- .../Model/DeprecatedObject.cs | 7 +- .../src/Org.OpenAPITools/Model/Dog.cs | 7 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 28 ++- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 14 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 56 +++++- .../src/Org.OpenAPITools/Model/File.cs | 7 +- .../Model/FileSchemaTestClass.cs | 14 +- .../src/Org.OpenAPITools/Model/Foo.cs | 7 +- .../Model/FooGetDefaultResponse.cs | 7 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 105 +++++++++-- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 14 +- .../Model/HealthCheckResult.cs | 7 +- .../src/Org.OpenAPITools/Model/List.cs | 7 +- .../Model/LiteralStringClass.cs | 14 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixLog.cs | 168 +++++++++++++++--- .../src/Org.OpenAPITools/Model/MixedAnyOf.cs | 7 +- .../src/Org.OpenAPITools/Model/MixedOneOf.cs | 7 +- ...dPropertiesAndAdditionalPropertiesClass.cs | 28 ++- .../src/Org.OpenAPITools/Model/MixedSubId.cs | 7 +- .../Model/Model200Response.cs | 14 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 7 +- .../src/Org.OpenAPITools/Model/Name.cs | 21 ++- .../Org.OpenAPITools/Model/NullableClass.cs | 84 +++++++-- .../Model/NullableGuidClass.cs | 7 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 7 +- .../Model/ObjectWithDeprecatedFields.cs | 28 ++- .../src/Org.OpenAPITools/Model/Order.cs | 42 ++++- .../Org.OpenAPITools/Model/OuterComposite.cs | 21 ++- .../src/Org.OpenAPITools/Model/Pet.cs | 28 ++- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 14 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 154 +++++++++++++--- .../src/Org.OpenAPITools/Model/Return.cs | 14 +- .../Model/RolesReportsHash.cs | 14 +- .../Model/RolesReportsHashRole.cs | 7 +- .../Model/SpecialModelName.cs | 14 +- .../src/Org.OpenAPITools/Model/Tag.cs | 14 +- .../Model/TestCollectionEndingWithWordList.cs | 7 +- .../TestCollectionEndingWithWordListObject.cs | 7 +- ...lineFreeformAdditionalPropertiesRequest.cs | 7 +- .../src/Org.OpenAPITools/Model/User.cs | 84 +++++++-- .../src/Org.OpenAPITools/Model/Whale.cs | 14 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 7 +- .../Model/ZeroBasedEnumClass.cs | 7 +- 516 files changed, 9558 insertions(+), 1593 deletions(-) diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Bird.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Bird.cs index 69841b4f36c6..554504d5ca08 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Bird.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Bird.cs @@ -74,8 +74,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Bird {\n"); - sb.Append(" Size: ").Append(Size).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" Size: "); + if (Size.IsSet) + { + sb.Append(Size.Value); + } + sb.Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Category.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Category.cs index c80014c96cc5..d77bed3be2bb 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Category.cs @@ -71,8 +71,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DataQuery.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DataQuery.cs index 63014fc0a1b7..7fe3c62d22ff 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DataQuery.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DataQuery.cs @@ -94,9 +94,24 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class DataQuery {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Suffix: ").Append(Suffix).Append("\n"); - sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Suffix: "); + if (Suffix.IsSet) + { + sb.Append(Suffix.Value); + } + sb.Append("\n"); + sb.Append(" Text: "); + if (Text.IsSet) + { + sb.Append(Text.Value); + } + sb.Append("\n"); + sb.Append(" Date: "); + if (Date.IsSet) + { + sb.Append(Date.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DefaultValue.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DefaultValue.cs index c8252bbec94a..25bd5aeeb7cc 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DefaultValue.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/DefaultValue.cs @@ -162,14 +162,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DefaultValue {\n"); - sb.Append(" ArrayStringEnumRefDefault: ").Append(ArrayStringEnumRefDefault).Append("\n"); - sb.Append(" ArrayStringEnumDefault: ").Append(ArrayStringEnumDefault).Append("\n"); - sb.Append(" ArrayStringDefault: ").Append(ArrayStringDefault).Append("\n"); - sb.Append(" ArrayIntegerDefault: ").Append(ArrayIntegerDefault).Append("\n"); - sb.Append(" ArrayString: ").Append(ArrayString).Append("\n"); - sb.Append(" ArrayStringNullable: ").Append(ArrayStringNullable).Append("\n"); - sb.Append(" ArrayStringExtensionNullable: ").Append(ArrayStringExtensionNullable).Append("\n"); - sb.Append(" StringNullable: ").Append(StringNullable).Append("\n"); + sb.Append(" ArrayStringEnumRefDefault: "); + if (ArrayStringEnumRefDefault.IsSet) + { + sb.Append(ArrayStringEnumRefDefault.Value); + } + sb.Append("\n"); + sb.Append(" ArrayStringEnumDefault: "); + if (ArrayStringEnumDefault.IsSet) + { + sb.Append(ArrayStringEnumDefault.Value); + } + sb.Append("\n"); + sb.Append(" ArrayStringDefault: "); + if (ArrayStringDefault.IsSet) + { + sb.Append(ArrayStringDefault.Value); + } + sb.Append("\n"); + sb.Append(" ArrayIntegerDefault: "); + if (ArrayIntegerDefault.IsSet) + { + sb.Append(ArrayIntegerDefault.Value); + } + sb.Append("\n"); + sb.Append(" ArrayString: "); + if (ArrayString.IsSet) + { + sb.Append(ArrayString.Value); + } + sb.Append("\n"); + sb.Append(" ArrayStringNullable: "); + if (ArrayStringNullable.IsSet) + { + sb.Append(ArrayStringNullable.Value); + } + sb.Append("\n"); + sb.Append(" ArrayStringExtensionNullable: "); + if (ArrayStringExtensionNullable.IsSet) + { + sb.Append(ArrayStringExtensionNullable.Value); + } + sb.Append("\n"); + sb.Append(" StringNullable: "); + if (StringNullable.IsSet) + { + sb.Append(StringNullable.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs index a352684830ec..e20d79178d35 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs @@ -72,9 +72,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NumberPropertiesOnly {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); + sb.Append(" Number: "); + if (Number.IsSet) + { + sb.Append(Number.Value); + } + sb.Append("\n"); + sb.Append(" Float: "); + if (Float.IsSet) + { + sb.Append(Float.Value); + } + sb.Append("\n"); + sb.Append(" Double: "); + if (Double.IsSet) + { + sb.Append(Double.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Pet.cs index 123941d17dc0..ef2a0af29013 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Pet.cs @@ -150,12 +150,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Query.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Query.cs index 95ef01233e10..3ab34bf4274d 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Query.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Query.cs @@ -95,8 +95,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Query {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Outcomes: ").Append(Outcomes).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Outcomes: "); + if (Outcomes.IsSet) + { + sb.Append(Outcomes.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Tag.cs index 854d42511554..fa92584b83ae 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/Tag.cs @@ -69,8 +69,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestFormObjectMultipartRequestMarker.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestFormObjectMultipartRequestMarker.cs index 3e7afe6f7fad..2ed00cf4d389 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestFormObjectMultipartRequestMarker.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestFormObjectMultipartRequestMarker.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestFormObjectMultipartRequestMarker {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.cs index 52edfd298888..e2391bfc0c21 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.cs @@ -97,10 +97,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {\n"); - sb.Append(" Size: ").Append(Size).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Size: "); + if (Size.IsSet) + { + sb.Append(Size.Value); + } + sb.Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.cs index 36561a9f9449..edb5bbb8cd65 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {\n"); - sb.Append(" Values: ").Append(Values).Append("\n"); + sb.Append(" Values: "); + if (Values.IsSet) + { + sb.Append(Values.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartArrayRequest.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartArrayRequest.cs index 05cd0feb87b6..ff55eb4bb61e 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartArrayRequest.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartArrayRequest.cs @@ -62,7 +62,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MultipartArrayRequest {\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" Files: "); + if (Files.IsSet) + { + sb.Append(Files.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequest.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequest.cs index 501e342c69a6..34ec79dbf08e 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequest.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequest.cs @@ -102,9 +102,19 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class MultipartMixedRequest {\n"); sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Marker: ").Append(Marker).Append("\n"); + sb.Append(" Marker: "); + if (Marker.IsSet) + { + sb.Append(Marker.Value); + } + sb.Append("\n"); sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" StatusArray: ").Append(StatusArray).Append("\n"); + sb.Append(" StatusArray: "); + if (StatusArray.IsSet) + { + sb.Append(StatusArray.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequestMarker.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequestMarker.cs index b766a497609b..2e81a9149a25 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequestMarker.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartMixedRequestMarker.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MultipartMixedRequestMarker {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartSingleRequest.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartSingleRequest.cs index 3621bdbaa41d..f26a5e8bdd15 100644 --- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartSingleRequest.cs +++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Model/MultipartSingleRequest.cs @@ -62,7 +62,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MultipartSingleRequest {\n"); - sb.Append(" File: ").Append(File).Append("\n"); + sb.Append(" File: "); + if (File.IsSet) + { + sb.Append(File.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 21e1a3edeca3..55a01ee1d23d 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Activity {\n"); - sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" ActivityOutputs: "); + if (ActivityOutputs.IsSet) + { + sb.Append(ActivityOutputs.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 2a44c55ee101..ecf8c237f029 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -82,8 +82,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ActivityOutputElementRepresentation {\n"); - sb.Append(" Prop1: ").Append(Prop1).Append("\n"); - sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" Prop1: "); + if (Prop1.IsSet) + { + sb.Append(Prop1.Value); + } + sb.Append("\n"); + sb.Append(" Prop2: "); + if (Prop2.IsSet) + { + sb.Append(Prop2.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 33ee65788e72..94350f8500a7 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -156,14 +156,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); - sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" MapProperty: "); + if (MapProperty.IsSet) + { + sb.Append(MapProperty.Value); + } + sb.Append("\n"); + sb.Append(" MapOfMapProperty: "); + if (MapOfMapProperty.IsSet) + { + sb.Append(MapOfMapProperty.Value); + } + sb.Append("\n"); + sb.Append(" Anytype1: "); + if (Anytype1.IsSet) + { + sb.Append(Anytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype1: "); + if (MapWithUndeclaredPropertiesAnytype1.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype2: "); + if (MapWithUndeclaredPropertiesAnytype2.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype2.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype3: "); + if (MapWithUndeclaredPropertiesAnytype3.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype3.Value); + } + sb.Append("\n"); + sb.Append(" EmptyMap: "); + if (EmptyMap.IsSet) + { + sb.Append(EmptyMap.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesString: "); + if (MapWithUndeclaredPropertiesString.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 70168c265efe..9c7f2ed65fb6 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -95,7 +95,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Animal {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index e4dbe59ef1ce..e3387f2ae1f7 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -90,9 +90,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Code: "); + if (Code.IsSet) + { + sb.Append(Code.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" Message: "); + if (Message.IsSet) + { + sb.Append(Message.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 65628313bda5..9434720207e9 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -95,9 +95,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Apple {\n"); - sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" ColorCode: ").Append(ColorCode).Append("\n"); + sb.Append(" Cultivar: "); + if (Cultivar.IsSet) + { + sb.Append(Cultivar.Value); + } + sb.Append("\n"); + sb.Append(" Origin: "); + if (Origin.IsSet) + { + sb.Append(Origin.Value); + } + sb.Append("\n"); + sb.Append(" ColorCode: "); + if (ColorCode.IsSet) + { + sb.Append(ColorCode.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index 7beec9499e2b..4fe32b7b0e8d 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -76,7 +76,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class AppleReq {\n"); sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Mealy: ").Append(Mealy).Append("\n"); + sb.Append(" Mealy: "); + if (Mealy.IsSet) + { + sb.Append(Mealy.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index d2718b042244..cc061e35fe73 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); + sb.Append(" ArrayArrayNumber: "); + if (ArrayArrayNumber.IsSet) + { + sb.Append(ArrayArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index a9af5d6b8fc6..bba5eb430695 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); + sb.Append(" ArrayNumber: "); + if (ArrayNumber.IsSet) + { + sb.Append(ArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 00ca1c89ba2c..fa28b4323fd7 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -95,9 +95,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: "); + if (ArrayOfString.IsSet) + { + sb.Append(ArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfInteger: "); + if (ArrayArrayOfInteger.IsSet) + { + sb.Append(ArrayArrayOfInteger.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfModel: "); + if (ArrayArrayOfModel.IsSet) + { + sb.Append(ArrayArrayOfModel.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 2c003d0c5da3..1c1957f22229 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -64,7 +64,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Banana {\n"); - sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" LengthCm: "); + if (LengthCm.IsSet) + { + sb.Append(LengthCm.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 9e3512562751..c3f0fd2fdeb5 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -71,7 +71,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class BananaReq {\n"); sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); - sb.Append(" Sweet: ").Append(Sweet).Append("\n"); + sb.Append(" Sweet: "); + if (Sweet.IsSet) + { + sb.Append(Sweet.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 6be7cc27e4a0..bb4f751a3dbc 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -135,12 +135,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: "); + if (SmallCamel.IsSet) + { + sb.Append(SmallCamel.Value); + } + sb.Append("\n"); + sb.Append(" CapitalCamel: "); + if (CapitalCamel.IsSet) + { + sb.Append(CapitalCamel.Value); + } + sb.Append("\n"); + sb.Append(" SmallSnake: "); + if (SmallSnake.IsSet) + { + sb.Append(SmallSnake.Value); + } + sb.Append("\n"); + sb.Append(" CapitalSnake: "); + if (CapitalSnake.IsSet) + { + sb.Append(CapitalSnake.Value); + } + sb.Append("\n"); + sb.Append(" SCAETHFlowPoints: "); + if (SCAETHFlowPoints.IsSet) + { + sb.Append(SCAETHFlowPoints.Value); + } + sb.Append("\n"); + sb.Append(" ATT_NAME: "); + if (ATT_NAME.IsSet) + { + sb.Append(ATT_NAME.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs index 6419e26ba728..b7b81cb44640 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -77,7 +77,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" Declawed: "); + if (Declawed.IsSet) + { + sb.Append(Declawed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs index 6ef04a699c7e..b86ddaaf0cfb 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -85,7 +85,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index c7e84090ff3a..6c5fc8ccac6d 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -101,7 +101,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" PetType: ").Append(PetType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 8a5ce853467c..9401c33a3764 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index ece67e39338e..d968492ebabf 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -71,7 +71,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DateOnlyClass {\n"); - sb.Append(" DateOnlyProperty: ").Append(DateOnlyProperty).Append("\n"); + sb.Append(" DateOnlyProperty: "); + if (DateOnlyProperty.IsSet) + { + sb.Append(DateOnlyProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index cbe496c6f099..aa0adce6489b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DeprecatedObject {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs index a5f0743a89cb..5a5e7c540ee3 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -82,7 +82,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" Breed: "); + if (Breed.IsSet) + { + sb.Append(Breed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 62e6c1f6c74d..ed12df8c164c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -98,10 +98,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Drawing {\n"); - sb.Append(" MainShape: ").Append(MainShape).Append("\n"); - sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); - sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" MainShape: "); + if (MainShape.IsSet) + { + sb.Append(MainShape.Value); + } + sb.Append("\n"); + sb.Append(" ShapeOrNull: "); + if (ShapeOrNull.IsSet) + { + sb.Append(ShapeOrNull.Value); + } + sb.Append("\n"); + sb.Append(" NullableShape: "); + if (NullableShape.IsSet) + { + sb.Append(NullableShape.Value); + } + sb.Append("\n"); + sb.Append(" Shapes: "); + if (Shapes.IsSet) + { + sb.Append(Shapes.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index a6cf91979e14..e02222658162 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -115,8 +115,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: "); + if (JustSymbol.IsSet) + { + sb.Append(JustSymbol.Value); + } + sb.Append("\n"); + sb.Append(" ArrayEnum: "); + if (ArrayEnum.IsSet) + { + sb.Append(ArrayEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 03facbc6e7a8..b9c1a7636104 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -297,15 +297,55 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumString: "); + if (EnumString.IsSet) + { + sb.Append(EnumString.Value); + } + sb.Append("\n"); sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); - sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); - sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" EnumInteger: "); + if (EnumInteger.IsSet) + { + sb.Append(EnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" EnumIntegerOnly: "); + if (EnumIntegerOnly.IsSet) + { + sb.Append(EnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" EnumNumber: "); + if (EnumNumber.IsSet) + { + sb.Append(EnumNumber.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnum: "); + if (OuterEnum.IsSet) + { + sb.Append(OuterEnum.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumInteger: "); + if (OuterEnumInteger.IsSet) + { + sb.Append(OuterEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumDefaultValue: "); + if (OuterEnumDefaultValue.IsSet) + { + sb.Append(OuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumIntegerDefaultValue: "); + if (OuterEnumIntegerDefaultValue.IsSet) + { + sb.Append(OuterEnumIntegerDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs index 551ef61b5c4d..87bd1682f7f1 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -70,7 +70,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); + sb.Append(" SourceURI: "); + if (SourceURI.IsSet) + { + sb.Append(SourceURI.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 4285a0634b0b..36fc6eb8dddf 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -82,8 +82,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" File: "); + if (File.IsSet) + { + sb.Append(File.Value); + } + sb.Append("\n"); + sb.Append(" Files: "); + if (Files.IsSet) + { + sb.Append(Files.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs index be7f7fce20d0..9777baf323ea 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Foo {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index fa6fb55aee55..f9229d6f6c44 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index bd0eaebd4a99..d62328f9a634 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -273,25 +273,100 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); - sb.Append(" Int32: ").Append(Int32).Append("\n"); - sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n"); - sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n"); + sb.Append(" Integer: "); + if (Integer.IsSet) + { + sb.Append(Integer.Value); + } + sb.Append("\n"); + sb.Append(" Int32: "); + if (Int32.IsSet) + { + sb.Append(Int32.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedInteger: "); + if (UnsignedInteger.IsSet) + { + sb.Append(UnsignedInteger.Value); + } + sb.Append("\n"); + sb.Append(" Int64: "); + if (Int64.IsSet) + { + sb.Append(Int64.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedLong: "); + if (UnsignedLong.IsSet) + { + sb.Append(UnsignedLong.Value); + } + sb.Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" Float: "); + if (Float.IsSet) + { + sb.Append(Float.Value); + } + sb.Append("\n"); + sb.Append(" Double: "); + if (Double.IsSet) + { + sb.Append(Double.Value); + } + sb.Append("\n"); + sb.Append(" Decimal: "); + if (Decimal.IsSet) + { + sb.Append(Decimal.Value); + } + sb.Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Binary: "); + if (Binary.IsSet) + { + sb.Append(Binary.Value); + } + sb.Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); - sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); - sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n"); + sb.Append(" PatternWithDigits: "); + if (PatternWithDigits.IsSet) + { + sb.Append(PatternWithDigits.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithDigitsAndDelimiter: "); + if (PatternWithDigitsAndDelimiter.IsSet) + { + sb.Append(PatternWithDigitsAndDelimiter.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithBackslash: "); + if (PatternWithBackslash.IsSet) + { + sb.Append(PatternWithBackslash.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 4188de16eb49..381c0ab73285 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -85,8 +85,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Foo: "); + if (Foo.IsSet) + { + sb.Append(Foo.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 4ef2968e6599..972fd8a3be37 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -64,7 +64,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HealthCheckResult {\n"); - sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); + sb.Append(" NullableMessage: "); + if (NullableMessage.IsSet) + { + sb.Append(NullableMessage.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs index 5817c1a866ee..7b05e5f94569 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class List {\n"); - sb.Append(" Var123List: ").Append(Var123List).Append("\n"); + sb.Append(" Var123List: "); + if (Var123List.IsSet) + { + sb.Append(Var123List.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 736cb4fa0011..804a64120593 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -82,8 +82,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LiteralStringClass {\n"); - sb.Append(" EscapedLiteralString: ").Append(EscapedLiteralString).Append("\n"); - sb.Append(" UnescapedLiteralString: ").Append(UnescapedLiteralString).Append("\n"); + sb.Append(" EscapedLiteralString: "); + if (EscapedLiteralString.IsSet) + { + sb.Append(EscapedLiteralString.Value); + } + sb.Append("\n"); + sb.Append(" UnescapedLiteralString: "); + if (UnescapedLiteralString.IsSet) + { + sb.Append(UnescapedLiteralString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 5ba2ac4869e9..6c74c1a67b71 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -127,10 +127,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: "); + if (MapMapOfString.IsSet) + { + sb.Append(MapMapOfString.Value); + } + sb.Append("\n"); + sb.Append(" MapOfEnumString: "); + if (MapOfEnumString.IsSet) + { + sb.Append(MapOfEnumString.Value); + } + sb.Append("\n"); + sb.Append(" DirectMap: "); + if (DirectMap.IsSet) + { + sb.Append(DirectMap.Value); + } + sb.Append("\n"); + sb.Append(" IndirectMap: "); + if (IndirectMap.IsSet) + { + sb.Append(IndirectMap.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs index d0cbd2499eb2..79166a6ffadb 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs @@ -452,35 +452,155 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); + sb.Append(" ShopId: "); + if (ShopId.IsSet) + { + sb.Append(ShopId.Value); + } + sb.Append("\n"); + sb.Append(" TotalPrice: "); + if (TotalPrice.IsSet) + { + sb.Append(TotalPrice.Value); + } + sb.Append("\n"); sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); + sb.Append(" SomeCode: "); + if (SomeCode.IsSet) + { + sb.Append(SomeCode.Value); + } + sb.Append("\n"); + sb.Append(" BatchNumber: "); + if (BatchNumber.IsSet) + { + sb.Append(BatchNumber.Value); + } + sb.Append("\n"); + sb.Append(" BrandCode: "); + if (BrandCode.IsSet) + { + sb.Append(BrandCode.Value); + } + sb.Append("\n"); + sb.Append(" BrandId: "); + if (BrandId.IsSet) + { + sb.Append(BrandId.Value); + } + sb.Append("\n"); + sb.Append(" BrandName: "); + if (BrandName.IsSet) + { + sb.Append(BrandName.Value); + } + sb.Append("\n"); + sb.Append(" CategoryCode: "); + if (CategoryCode.IsSet) + { + sb.Append(CategoryCode.Value); + } + sb.Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); + sb.Append(" ColorDescription: "); + if (ColorDescription.IsSet) + { + sb.Append(ColorDescription.Value); + } + sb.Append("\n"); + sb.Append(" Comment: "); + if (Comment.IsSet) + { + sb.Append(Comment.Value); + } + sb.Append("\n"); + sb.Append(" CommercialProductCode: "); + if (CommercialProductCode.IsSet) + { + sb.Append(CommercialProductCode.Value); + } + sb.Append("\n"); + sb.Append(" ProductLineCode: "); + if (ProductLineCode.IsSet) + { + sb.Append(ProductLineCode.Value); + } + sb.Append("\n"); + sb.Append(" Country: "); + if (Country.IsSet) + { + sb.Append(Country.Value); + } + sb.Append("\n"); + sb.Append(" CreatedBy: "); + if (CreatedBy.IsSet) + { + sb.Append(CreatedBy.Value); + } + sb.Append("\n"); + sb.Append(" CreatedByFirstName: "); + if (CreatedByFirstName.IsSet) + { + sb.Append(CreatedByFirstName.Value); + } + sb.Append("\n"); + sb.Append(" CreatedByLastName: "); + if (CreatedByLastName.IsSet) + { + sb.Append(CreatedByLastName.Value); + } + sb.Append("\n"); + sb.Append(" DeltaECalculationRepaired: "); + if (DeltaECalculationRepaired.IsSet) + { + sb.Append(DeltaECalculationRepaired.Value); + } + sb.Append("\n"); + sb.Append(" DeltaECalculationSprayout: "); + if (DeltaECalculationSprayout.IsSet) + { + sb.Append(DeltaECalculationSprayout.Value); + } + sb.Append("\n"); + sb.Append(" OwnColorVariantNumber: "); + if (OwnColorVariantNumber.IsSet) + { + sb.Append(OwnColorVariantNumber.Value); + } + sb.Append("\n"); + sb.Append(" PrimerProductId: "); + if (PrimerProductId.IsSet) + { + sb.Append(PrimerProductId.Value); + } + sb.Append("\n"); + sb.Append(" ProductId: "); + if (ProductId.IsSet) + { + sb.Append(ProductId.Value); + } + sb.Append("\n"); + sb.Append(" ProductName: "); + if (ProductName.IsSet) + { + sb.Append(ProductName.Value); + } + sb.Append("\n"); + sb.Append(" SelectedVersionIndex: "); + if (SelectedVersionIndex.IsSet) + { + sb.Append(SelectedVersionIndex.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index b40d088daa4d..37ad5fe37bbc 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedAnyOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index 0e11b34c6c2b..5d90e3453dc3 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedOneOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 41dbd7eb7c37..4b51fc8194da 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -108,10 +108,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" UuidWithPattern: ").Append(UuidWithPattern).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" UuidWithPattern: "); + if (UuidWithPattern.IsSet) + { + sb.Append(UuidWithPattern.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Map: "); + if (Map.IsSet) + { + sb.Append(Map.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 7287a1f2a8ba..27ffa8cf7f81 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedSubId {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index b557f0ca4dfe..37de4c8a000d 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -77,8 +77,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index e175491cb308..ac1b4ae003b9 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" VarClient: "); + if (VarClient.IsSet) + { + sb.Append(VarClient.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs index 0d68727e24bb..4c2c7ec9bb55 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -114,9 +114,24 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" VarName: ").Append(VarName).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" Var123Number: ").Append(Var123Number).Append("\n"); + sb.Append(" SnakeCase: "); + if (SnakeCase.IsSet) + { + sb.Append(SnakeCase.Value); + } + sb.Append("\n"); + sb.Append(" Property: "); + if (Property.IsSet) + { + sb.Append(Property.Value); + } + sb.Append("\n"); + sb.Append(" Var123Number: "); + if (Var123Number.IsSet) + { + sb.Append(Var123Number.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index a5083e57ae03..3444633eb78b 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -163,18 +163,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); - sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); - sb.Append(" DateProp: ").Append(DateProp).Append("\n"); - sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); - sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" IntegerProp: "); + if (IntegerProp.IsSet) + { + sb.Append(IntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NumberProp: "); + if (NumberProp.IsSet) + { + sb.Append(NumberProp.Value); + } + sb.Append("\n"); + sb.Append(" BooleanProp: "); + if (BooleanProp.IsSet) + { + sb.Append(BooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" StringProp: "); + if (StringProp.IsSet) + { + sb.Append(StringProp.Value); + } + sb.Append("\n"); + sb.Append(" DateProp: "); + if (DateProp.IsSet) + { + sb.Append(DateProp.Value); + } + sb.Append("\n"); + sb.Append(" DatetimeProp: "); + if (DatetimeProp.IsSet) + { + sb.Append(DatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayNullableProp: "); + if (ArrayNullableProp.IsSet) + { + sb.Append(ArrayNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: "); + if (ArrayAndItemsNullableProp.IsSet) + { + sb.Append(ArrayAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayItemsNullable: "); + if (ArrayItemsNullable.IsSet) + { + sb.Append(ArrayItemsNullable.Value); + } + sb.Append("\n"); + sb.Append(" ObjectNullableProp: "); + if (ObjectNullableProp.IsSet) + { + sb.Append(ObjectNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectAndItemsNullableProp: "); + if (ObjectAndItemsNullableProp.IsSet) + { + sb.Append(ObjectAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectItemsNullable: "); + if (ObjectItemsNullable.IsSet) + { + sb.Append(ObjectItemsNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 4f80e7a49d09..1b22cf40b7bb 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -65,7 +65,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableGuidClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index f7c38e570ff6..130799561b36 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -67,7 +67,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); + sb.Append(" JustNumber: "); + if (JustNumber.IsSet) + { + sb.Append(JustNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 8f0144542005..d85994561e86 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -106,10 +106,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); - sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" DeprecatedRef: "); + if (DeprecatedRef.IsSet) + { + sb.Append(DeprecatedRef.Value); + } + sb.Append("\n"); + sb.Append(" Bars: "); + if (Bars.IsSet) + { + sb.Append(Bars.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs index 2a0e7ddbff14..0ce6f5e63a96 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -137,12 +137,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" PetId: "); + if (PetId.IsSet) + { + sb.Append(PetId.Value); + } + sb.Append("\n"); + sb.Append(" Quantity: "); + if (Quantity.IsSet) + { + sb.Append(Quantity.Value); + } + sb.Append("\n"); + sb.Append(" ShipDate: "); + if (ShipDate.IsSet) + { + sb.Append(ShipDate.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); + sb.Append(" Complete: "); + if (Complete.IsSet) + { + sb.Append(Complete.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index d0da50fcd4a5..cf0e1d711788 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -85,9 +85,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append(" MyNumber: "); + if (MyNumber.IsSet) + { + sb.Append(MyNumber.Value); + } + sb.Append("\n"); + sb.Append(" MyString: "); + if (MyString.IsSet) + { + sb.Append(MyString.Value); + } + sb.Append("\n"); + sb.Append(" MyBoolean: "); + if (MyBoolean.IsSet) + { + sb.Append(MyBoolean.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs index e9fc5008557c..d0e50e1530f2 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -160,12 +160,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index dfcd3c12a1e2..661367a500c9 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -83,8 +83,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Baz: "); + if (Baz.IsSet) + { + sb.Append(Baz.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index d73e9cc27102..5ad62e9741cd 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -824,48 +824,158 @@ public override string ToString() sb.Append("class RequiredClass {\n"); sb.Append(" RequiredNullableIntegerProp: ").Append(RequiredNullableIntegerProp).Append("\n"); sb.Append(" RequiredNotnullableintegerProp: ").Append(RequiredNotnullableintegerProp).Append("\n"); - sb.Append(" NotRequiredNullableIntegerProp: ").Append(NotRequiredNullableIntegerProp).Append("\n"); - sb.Append(" NotRequiredNotnullableintegerProp: ").Append(NotRequiredNotnullableintegerProp).Append("\n"); + sb.Append(" NotRequiredNullableIntegerProp: "); + if (NotRequiredNullableIntegerProp.IsSet) + { + sb.Append(NotRequiredNullableIntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableintegerProp: "); + if (NotRequiredNotnullableintegerProp.IsSet) + { + sb.Append(NotRequiredNotnullableintegerProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableStringProp: ").Append(RequiredNullableStringProp).Append("\n"); sb.Append(" RequiredNotnullableStringProp: ").Append(RequiredNotnullableStringProp).Append("\n"); - sb.Append(" NotrequiredNullableStringProp: ").Append(NotrequiredNullableStringProp).Append("\n"); - sb.Append(" NotrequiredNotnullableStringProp: ").Append(NotrequiredNotnullableStringProp).Append("\n"); + sb.Append(" NotrequiredNullableStringProp: "); + if (NotrequiredNullableStringProp.IsSet) + { + sb.Append(NotrequiredNullableStringProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableStringProp: "); + if (NotrequiredNotnullableStringProp.IsSet) + { + sb.Append(NotrequiredNotnullableStringProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableBooleanProp: ").Append(RequiredNullableBooleanProp).Append("\n"); sb.Append(" RequiredNotnullableBooleanProp: ").Append(RequiredNotnullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNullableBooleanProp: ").Append(NotrequiredNullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNotnullableBooleanProp: ").Append(NotrequiredNotnullableBooleanProp).Append("\n"); + sb.Append(" NotrequiredNullableBooleanProp: "); + if (NotrequiredNullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNullableBooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableBooleanProp: "); + if (NotrequiredNotnullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNotnullableBooleanProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableDateProp: ").Append(RequiredNullableDateProp).Append("\n"); sb.Append(" RequiredNotNullableDateProp: ").Append(RequiredNotNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNullableDateProp: ").Append(NotRequiredNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNotnullableDateProp: ").Append(NotRequiredNotnullableDateProp).Append("\n"); + sb.Append(" NotRequiredNullableDateProp: "); + if (NotRequiredNullableDateProp.IsSet) + { + sb.Append(NotRequiredNullableDateProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableDateProp: "); + if (NotRequiredNotnullableDateProp.IsSet) + { + sb.Append(NotRequiredNotnullableDateProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableDatetimeProp: ").Append(RequiredNotnullableDatetimeProp).Append("\n"); sb.Append(" RequiredNullableDatetimeProp: ").Append(RequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNullableDatetimeProp: ").Append(NotrequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNotnullableDatetimeProp: ").Append(NotrequiredNotnullableDatetimeProp).Append("\n"); + sb.Append(" NotrequiredNullableDatetimeProp: "); + if (NotrequiredNullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNullableDatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableDatetimeProp: "); + if (NotrequiredNotnullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNotnullableDatetimeProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumInteger: ").Append(RequiredNullableEnumInteger).Append("\n"); sb.Append(" RequiredNotnullableEnumInteger: ").Append(RequiredNotnullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNullableEnumInteger: ").Append(NotrequiredNullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumInteger: ").Append(NotrequiredNotnullableEnumInteger).Append("\n"); + sb.Append(" NotrequiredNullableEnumInteger: "); + if (NotrequiredNullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNullableEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumInteger: "); + if (NotrequiredNotnullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNotnullableEnumInteger.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumIntegerOnly: ").Append(RequiredNullableEnumIntegerOnly).Append("\n"); sb.Append(" RequiredNotnullableEnumIntegerOnly: ").Append(RequiredNotnullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNullableEnumIntegerOnly: ").Append(NotrequiredNullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumIntegerOnly: ").Append(NotrequiredNotnullableEnumIntegerOnly).Append("\n"); + sb.Append(" NotrequiredNullableEnumIntegerOnly: "); + if (NotrequiredNullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNullableEnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumIntegerOnly: "); + if (NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNotnullableEnumIntegerOnly.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableEnumString: ").Append(RequiredNotnullableEnumString).Append("\n"); sb.Append(" RequiredNullableEnumString: ").Append(RequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNullableEnumString: ").Append(NotrequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumString: ").Append(NotrequiredNotnullableEnumString).Append("\n"); + sb.Append(" NotrequiredNullableEnumString: "); + if (NotrequiredNullableEnumString.IsSet) + { + sb.Append(NotrequiredNullableEnumString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumString: "); + if (NotrequiredNotnullableEnumString.IsSet) + { + sb.Append(NotrequiredNotnullableEnumString.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableOuterEnumDefaultValue: ").Append(RequiredNullableOuterEnumDefaultValue).Append("\n"); sb.Append(" RequiredNotnullableOuterEnumDefaultValue: ").Append(RequiredNotnullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNullableOuterEnumDefaultValue: ").Append(NotrequiredNullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: ").Append(NotrequiredNotnullableOuterEnumDefaultValue).Append("\n"); + sb.Append(" NotrequiredNullableOuterEnumDefaultValue: "); + if (NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: "); + if (NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNotnullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableUuid: ").Append(RequiredNullableUuid).Append("\n"); sb.Append(" RequiredNotnullableUuid: ").Append(RequiredNotnullableUuid).Append("\n"); - sb.Append(" NotrequiredNullableUuid: ").Append(NotrequiredNullableUuid).Append("\n"); - sb.Append(" NotrequiredNotnullableUuid: ").Append(NotrequiredNotnullableUuid).Append("\n"); + sb.Append(" NotrequiredNullableUuid: "); + if (NotrequiredNullableUuid.IsSet) + { + sb.Append(NotrequiredNullableUuid.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableUuid: "); + if (NotrequiredNotnullableUuid.IsSet) + { + sb.Append(NotrequiredNotnullableUuid.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableArrayOfString: ").Append(RequiredNullableArrayOfString).Append("\n"); sb.Append(" RequiredNotnullableArrayOfString: ").Append(RequiredNotnullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNullableArrayOfString: ").Append(NotrequiredNullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNotnullableArrayOfString: ").Append(NotrequiredNotnullableArrayOfString).Append("\n"); + sb.Append(" NotrequiredNullableArrayOfString: "); + if (NotrequiredNullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNullableArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableArrayOfString: "); + if (NotrequiredNotnullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNotnullableArrayOfString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs index 7c13c296a88b..dbc8ff9779fe 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -106,10 +106,20 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" VarReturn: ").Append(VarReturn).Append("\n"); + sb.Append(" VarReturn: "); + if (VarReturn.IsSet) + { + sb.Append(VarReturn.Value); + } + sb.Append("\n"); sb.Append(" Lock: ").Append(Lock).Append("\n"); sb.Append(" Abstract: ").Append(Abstract).Append("\n"); - sb.Append(" Unsafe: ").Append(Unsafe).Append("\n"); + sb.Append(" Unsafe: "); + if (Unsafe.IsSet) + { + sb.Append(Unsafe.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 69fa327926c2..41f310224e3f 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -82,8 +82,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHash {\n"); - sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" RoleUuid: "); + if (RoleUuid.IsSet) + { + sb.Append(RoleUuid.Value); + } + sb.Append("\n"); + sb.Append(" Role: "); + if (Role.IsSet) + { + sb.Append(Role.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 3e1140cc139a..26328be18801 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHashRole {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index a4434d474515..499a570c519c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -77,8 +77,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" VarSpecialModelName: ").Append(VarSpecialModelName).Append("\n"); + sb.Append(" SpecialPropertyName: "); + if (SpecialPropertyName.IsSet) + { + sb.Append(SpecialPropertyName.Value); + } + sb.Append("\n"); + sb.Append(" VarSpecialModelName: "); + if (VarSpecialModelName.IsSet) + { + sb.Append(VarSpecialModelName.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs index b8283df15790..76ef4a9c7599 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -77,8 +77,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index f68a75c20086..c6b7ff126bc5 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordList {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Value: "); + if (Value.IsSet) + { + sb.Append(Value.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 46e26eaa65c9..fe0a2e253f2d 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordListObject {\n"); - sb.Append(" TestCollectionEndingWithWordList: ").Append(TestCollectionEndingWithWordList).Append("\n"); + sb.Append(" TestCollectionEndingWithWordList: "); + if (TestCollectionEndingWithWordList.IsSet) + { + sb.Append(TestCollectionEndingWithWordList.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 65c424f89536..ae53107912d3 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n"); - sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n"); + sb.Append(" SomeProperty: "); + if (SomeProperty.IsSet) + { + sb.Append(SomeProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs index af00e176628c..3277b0c5a5bf 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -192,18 +192,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); - sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); - sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Username: "); + if (Username.IsSet) + { + sb.Append(Username.Value); + } + sb.Append("\n"); + sb.Append(" FirstName: "); + if (FirstName.IsSet) + { + sb.Append(FirstName.Value); + } + sb.Append("\n"); + sb.Append(" LastName: "); + if (LastName.IsSet) + { + sb.Append(LastName.Value); + } + sb.Append("\n"); + sb.Append(" Email: "); + if (Email.IsSet) + { + sb.Append(Email.Value); + } + sb.Append("\n"); + sb.Append(" Password: "); + if (Password.IsSet) + { + sb.Append(Password.Value); + } + sb.Append("\n"); + sb.Append(" Phone: "); + if (Phone.IsSet) + { + sb.Append(Phone.Value); + } + sb.Append("\n"); + sb.Append(" UserStatus: "); + if (UserStatus.IsSet) + { + sb.Append(UserStatus.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: "); + if (ObjectWithNoDeclaredProps.IsSet) + { + sb.Append(ObjectWithNoDeclaredProps.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: "); + if (ObjectWithNoDeclaredPropsNullable.IsSet) + { + sb.Append(ObjectWithNoDeclaredPropsNullable.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypeProp: "); + if (AnyTypeProp.IsSet) + { + sb.Append(AnyTypeProp.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypePropNullable: "); + if (AnyTypePropNullable.IsSet) + { + sb.Append(AnyTypePropNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs index e4b135741f99..d4f197ebd661 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -93,8 +93,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Whale {\n"); - sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n"); - sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n"); + sb.Append(" HasBaleen: "); + if (HasBaleen.IsSet) + { + sb.Append(HasBaleen.Value); + } + sb.Append("\n"); + sb.Append(" HasTeeth: "); + if (HasTeeth.IsSet) + { + sb.Append(HasTeeth.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 0291d92c2813..fabd9b4b4a5f 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -110,7 +110,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Zebra {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 7c1fbbbf47dc..e1e17b29349f 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -83,7 +83,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ZeroBasedEnumClass {\n"); - sb.Append(" ZeroBasedEnum: ").Append(ZeroBasedEnum).Append("\n"); + sb.Append(" ZeroBasedEnum: "); + if (ZeroBasedEnum.IsSet) + { + sb.Append(ZeroBasedEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/ApiResponse.cs index 370380770898..37b7f57ef675 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -82,9 +82,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Code: "); + if (Code.IsSet) + { + sb.Append(Code.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" Message: "); + if (Message.IsSet) + { + sb.Append(Message.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Category.cs index f207a3688e86..3b7e4f3e51bf 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Category.cs @@ -69,8 +69,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Order.cs index 2acb794ff4a5..49ed42917150 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Order.cs @@ -128,12 +128,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" PetId: "); + if (PetId.IsSet) + { + sb.Append(PetId.Value); + } + sb.Append("\n"); + sb.Append(" Quantity: "); + if (Quantity.IsSet) + { + sb.Append(Quantity.Value); + } + sb.Append("\n"); + sb.Append(" ShipDate: "); + if (ShipDate.IsSet) + { + sb.Append(ShipDate.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); + sb.Append(" Complete: "); + if (Complete.IsSet) + { + sb.Append(Complete.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Pet.cs index 2906de6e142b..b007721d2dea 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Pet.cs @@ -150,12 +150,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Tag.cs index f144c9884662..44501a3b6b2d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/Tag.cs @@ -69,8 +69,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/User.cs index 06681606fbb9..7a5a17fb1c51 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Model/User.cs @@ -143,14 +143,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Username: "); + if (Username.IsSet) + { + sb.Append(Username.Value); + } + sb.Append("\n"); + sb.Append(" FirstName: "); + if (FirstName.IsSet) + { + sb.Append(FirstName.Value); + } + sb.Append("\n"); + sb.Append(" LastName: "); + if (LastName.IsSet) + { + sb.Append(LastName.Value); + } + sb.Append("\n"); + sb.Append(" Email: "); + if (Email.IsSet) + { + sb.Append(Email.Value); + } + sb.Append("\n"); + sb.Append(" Password: "); + if (Password.IsSet) + { + sb.Append(Password.Value); + } + sb.Append("\n"); + sb.Append(" Phone: "); + if (Phone.IsSet) + { + sb.Append(Phone.Value); + } + sb.Append("\n"); + sb.Append(" UserStatus: "); + if (UserStatus.IsSet) + { + sb.Append(UserStatus.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 64ec72ede072..968324fe7c7e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Activity {\n"); - sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" ActivityOutputs: "); + if (ActivityOutputs.IsSet) + { + sb.Append(ActivityOutputs.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 1b186a8771ed..3bd8c654d0b3 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ActivityOutputElementRepresentation {\n"); - sb.Append(" Prop1: ").Append(Prop1).Append("\n"); - sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" Prop1: "); + if (Prop1.IsSet) + { + sb.Append(Prop1.Value); + } + sb.Append("\n"); + sb.Append(" Prop2: "); + if (Prop2.IsSet) + { + sb.Append(Prop2.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index c84fba57b967..19fbc48f7f26 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -155,14 +155,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); - sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" MapProperty: "); + if (MapProperty.IsSet) + { + sb.Append(MapProperty.Value); + } + sb.Append("\n"); + sb.Append(" MapOfMapProperty: "); + if (MapOfMapProperty.IsSet) + { + sb.Append(MapOfMapProperty.Value); + } + sb.Append("\n"); + sb.Append(" Anytype1: "); + if (Anytype1.IsSet) + { + sb.Append(Anytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype1: "); + if (MapWithUndeclaredPropertiesAnytype1.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype2: "); + if (MapWithUndeclaredPropertiesAnytype2.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype2.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype3: "); + if (MapWithUndeclaredPropertiesAnytype3.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype3.Value); + } + sb.Append("\n"); + sb.Append(" EmptyMap: "); + if (EmptyMap.IsSet) + { + sb.Append(EmptyMap.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesString: "); + if (MapWithUndeclaredPropertiesString.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs index a9332678ea77..e594f5727d8d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -94,7 +94,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Animal {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 72fba0eefb19..2c4287a5d287 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -89,9 +89,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Code: "); + if (Code.IsSet) + { + sb.Append(Code.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" Message: "); + if (Message.IsSet) + { + sb.Append(Message.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs index f085a6b77f31..0eb05dfaa9c8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -94,9 +94,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Apple {\n"); - sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" ColorCode: ").Append(ColorCode).Append("\n"); + sb.Append(" Cultivar: "); + if (Cultivar.IsSet) + { + sb.Append(Cultivar.Value); + } + sb.Append("\n"); + sb.Append(" Origin: "); + if (Origin.IsSet) + { + sb.Append(Origin.Value); + } + sb.Append("\n"); + sb.Append(" ColorCode: "); + if (ColorCode.IsSet) + { + sb.Append(ColorCode.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index f2a1e63e3787..ff277fb9035d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -75,7 +75,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class AppleReq {\n"); sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Mealy: ").Append(Mealy).Append("\n"); + sb.Append(" Mealy: "); + if (Mealy.IsSet) + { + sb.Append(Mealy.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 7cc2ebed0e24..ad4969ed5a65 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); + sb.Append(" ArrayArrayNumber: "); + if (ArrayArrayNumber.IsSet) + { + sb.Append(ArrayArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 7d85fc169003..a0155ed89aa2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); + sb.Append(" ArrayNumber: "); + if (ArrayNumber.IsSet) + { + sb.Append(ArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 119862eca2e8..c13d67627c4e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -94,9 +94,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: "); + if (ArrayOfString.IsSet) + { + sb.Append(ArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfInteger: "); + if (ArrayArrayOfInteger.IsSet) + { + sb.Append(ArrayArrayOfInteger.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfModel: "); + if (ArrayArrayOfModel.IsSet) + { + sb.Append(ArrayArrayOfModel.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 3d6f908c4487..8dc5fbd16dfd 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Banana {\n"); - sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" LengthCm: "); + if (LengthCm.IsSet) + { + sb.Append(LengthCm.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 02703e4025a9..fc7c797ede4f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -70,7 +70,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class BananaReq {\n"); sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); - sb.Append(" Sweet: ").Append(Sweet).Append("\n"); + sb.Append(" Sweet: "); + if (Sweet.IsSet) + { + sb.Append(Sweet.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 46478517456c..1f918a975bed 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -134,12 +134,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: "); + if (SmallCamel.IsSet) + { + sb.Append(SmallCamel.Value); + } + sb.Append("\n"); + sb.Append(" CapitalCamel: "); + if (CapitalCamel.IsSet) + { + sb.Append(CapitalCamel.Value); + } + sb.Append("\n"); + sb.Append(" SmallSnake: "); + if (SmallSnake.IsSet) + { + sb.Append(SmallSnake.Value); + } + sb.Append("\n"); + sb.Append(" CapitalSnake: "); + if (CapitalSnake.IsSet) + { + sb.Append(CapitalSnake.Value); + } + sb.Append("\n"); + sb.Append(" SCAETHFlowPoints: "); + if (SCAETHFlowPoints.IsSet) + { + sb.Append(SCAETHFlowPoints.Value); + } + sb.Append("\n"); + sb.Append(" ATT_NAME: "); + if (ATT_NAME.IsSet) + { + sb.Append(ATT_NAME.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs index c2e163db6026..106c21bf8373 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -76,7 +76,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" Declawed: "); + if (Declawed.IsSet) + { + sb.Append(Declawed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs index fa5cfbd9a2d5..2542a088011d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -84,7 +84,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index fd54f56a6ea9..1d3035ff4c33 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -100,7 +100,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" PetType: ").Append(PetType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index c7e10769716c..7e5c313abacc 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 3b5f665905e4..4cedebb8687a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -70,7 +70,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DateOnlyClass {\n"); - sb.Append(" DateOnlyProperty: ").Append(DateOnlyProperty).Append("\n"); + sb.Append(" DateOnlyProperty: "); + if (DateOnlyProperty.IsSet) + { + sb.Append(DateOnlyProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index d323606d4072..0deddca5eb3b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DeprecatedObject {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs index d638ec7f4551..4971b148db15 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -81,7 +81,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" Breed: "); + if (Breed.IsSet) + { + sb.Append(Breed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index bcb1878282cf..f1b2857a8c8c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -97,10 +97,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Drawing {\n"); - sb.Append(" MainShape: ").Append(MainShape).Append("\n"); - sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); - sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" MainShape: "); + if (MainShape.IsSet) + { + sb.Append(MainShape.Value); + } + sb.Append("\n"); + sb.Append(" ShapeOrNull: "); + if (ShapeOrNull.IsSet) + { + sb.Append(ShapeOrNull.Value); + } + sb.Append("\n"); + sb.Append(" NullableShape: "); + if (NullableShape.IsSet) + { + sb.Append(NullableShape.Value); + } + sb.Append("\n"); + sb.Append(" Shapes: "); + if (Shapes.IsSet) + { + sb.Append(Shapes.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 569a1bbf1ea4..6f4cfcc81422 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -114,8 +114,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: "); + if (JustSymbol.IsSet) + { + sb.Append(JustSymbol.Value); + } + sb.Append("\n"); + sb.Append(" ArrayEnum: "); + if (ArrayEnum.IsSet) + { + sb.Append(ArrayEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 20e394af4bc2..d68a80401400 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -296,15 +296,55 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumString: "); + if (EnumString.IsSet) + { + sb.Append(EnumString.Value); + } + sb.Append("\n"); sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); - sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); - sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" EnumInteger: "); + if (EnumInteger.IsSet) + { + sb.Append(EnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" EnumIntegerOnly: "); + if (EnumIntegerOnly.IsSet) + { + sb.Append(EnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" EnumNumber: "); + if (EnumNumber.IsSet) + { + sb.Append(EnumNumber.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnum: "); + if (OuterEnum.IsSet) + { + sb.Append(OuterEnum.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumInteger: "); + if (OuterEnumInteger.IsSet) + { + sb.Append(OuterEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumDefaultValue: "); + if (OuterEnumDefaultValue.IsSet) + { + sb.Append(OuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumIntegerDefaultValue: "); + if (OuterEnumIntegerDefaultValue.IsSet) + { + sb.Append(OuterEnumIntegerDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs index 3073d9ce4919..087edb6767da 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); + sb.Append(" SourceURI: "); + if (SourceURI.IsSet) + { + sb.Append(SourceURI.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index bdd81d64aace..1d10ee837aad 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" File: "); + if (File.IsSet) + { + sb.Append(File.Value); + } + sb.Append("\n"); + sb.Append(" Files: "); + if (Files.IsSet) + { + sb.Append(Files.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs index d899e3f91fa0..81e2be3f56c7 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Foo {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 3465ee4146ea..08f3751f9093 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 63345fa27a20..b378e6dd5e67 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -272,25 +272,100 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); - sb.Append(" Int32: ").Append(Int32).Append("\n"); - sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n"); - sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n"); + sb.Append(" Integer: "); + if (Integer.IsSet) + { + sb.Append(Integer.Value); + } + sb.Append("\n"); + sb.Append(" Int32: "); + if (Int32.IsSet) + { + sb.Append(Int32.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedInteger: "); + if (UnsignedInteger.IsSet) + { + sb.Append(UnsignedInteger.Value); + } + sb.Append("\n"); + sb.Append(" Int64: "); + if (Int64.IsSet) + { + sb.Append(Int64.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedLong: "); + if (UnsignedLong.IsSet) + { + sb.Append(UnsignedLong.Value); + } + sb.Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" Float: "); + if (Float.IsSet) + { + sb.Append(Float.Value); + } + sb.Append("\n"); + sb.Append(" Double: "); + if (Double.IsSet) + { + sb.Append(Double.Value); + } + sb.Append("\n"); + sb.Append(" Decimal: "); + if (Decimal.IsSet) + { + sb.Append(Decimal.Value); + } + sb.Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Binary: "); + if (Binary.IsSet) + { + sb.Append(Binary.Value); + } + sb.Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); - sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); - sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n"); + sb.Append(" PatternWithDigits: "); + if (PatternWithDigits.IsSet) + { + sb.Append(PatternWithDigits.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithDigitsAndDelimiter: "); + if (PatternWithDigitsAndDelimiter.IsSet) + { + sb.Append(PatternWithDigitsAndDelimiter.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithBackslash: "); + if (PatternWithBackslash.IsSet) + { + sb.Append(PatternWithBackslash.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 96d854d60872..b8197df20437 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -84,8 +84,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Foo: "); + if (Foo.IsSet) + { + sb.Append(Foo.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index cced5965aa84..e4a388da0740 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HealthCheckResult {\n"); - sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); + sb.Append(" NullableMessage: "); + if (NullableMessage.IsSet) + { + sb.Append(NullableMessage.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs index 358846cdd689..1d1185fd7171 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class List {\n"); - sb.Append(" Var123List: ").Append(Var123List).Append("\n"); + sb.Append(" Var123List: "); + if (Var123List.IsSet) + { + sb.Append(Var123List.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 63e1726e5f79..baa3fe2f8612 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LiteralStringClass {\n"); - sb.Append(" EscapedLiteralString: ").Append(EscapedLiteralString).Append("\n"); - sb.Append(" UnescapedLiteralString: ").Append(UnescapedLiteralString).Append("\n"); + sb.Append(" EscapedLiteralString: "); + if (EscapedLiteralString.IsSet) + { + sb.Append(EscapedLiteralString.Value); + } + sb.Append("\n"); + sb.Append(" UnescapedLiteralString: "); + if (UnescapedLiteralString.IsSet) + { + sb.Append(UnescapedLiteralString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 004bf942c034..7e85200b5921 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -126,10 +126,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: "); + if (MapMapOfString.IsSet) + { + sb.Append(MapMapOfString.Value); + } + sb.Append("\n"); + sb.Append(" MapOfEnumString: "); + if (MapOfEnumString.IsSet) + { + sb.Append(MapOfEnumString.Value); + } + sb.Append("\n"); + sb.Append(" DirectMap: "); + if (DirectMap.IsSet) + { + sb.Append(DirectMap.Value); + } + sb.Append("\n"); + sb.Append(" IndirectMap: "); + if (IndirectMap.IsSet) + { + sb.Append(IndirectMap.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 5dbb7d0ef732..68c2208b6031 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedAnyOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index f18b4793a139..eb425e933a16 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedOneOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index fc342925735f..562d233f37af 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -107,10 +107,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" UuidWithPattern: ").Append(UuidWithPattern).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" UuidWithPattern: "); + if (UuidWithPattern.IsSet) + { + sb.Append(UuidWithPattern.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Map: "); + if (Map.IsSet) + { + sb.Append(Map.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 9d5c0bc35f6f..4dd8bfeb529d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedSubId {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index d22b1c824ceb..cfb54939d213 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 4c8ff7320d98..b85005404154 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" VarClient: "); + if (VarClient.IsSet) + { + sb.Append(VarClient.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs index 10b22f09b12a..e23701fe32f5 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -113,9 +113,24 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" VarName: ").Append(VarName).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" Var123Number: ").Append(Var123Number).Append("\n"); + sb.Append(" SnakeCase: "); + if (SnakeCase.IsSet) + { + sb.Append(SnakeCase.Value); + } + sb.Append("\n"); + sb.Append(" Property: "); + if (Property.IsSet) + { + sb.Append(Property.Value); + } + sb.Append("\n"); + sb.Append(" Var123Number: "); + if (Var123Number.IsSet) + { + sb.Append(Var123Number.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index c384e5bfa54f..104f0658e300 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -162,18 +162,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); - sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); - sb.Append(" DateProp: ").Append(DateProp).Append("\n"); - sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); - sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" IntegerProp: "); + if (IntegerProp.IsSet) + { + sb.Append(IntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NumberProp: "); + if (NumberProp.IsSet) + { + sb.Append(NumberProp.Value); + } + sb.Append("\n"); + sb.Append(" BooleanProp: "); + if (BooleanProp.IsSet) + { + sb.Append(BooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" StringProp: "); + if (StringProp.IsSet) + { + sb.Append(StringProp.Value); + } + sb.Append("\n"); + sb.Append(" DateProp: "); + if (DateProp.IsSet) + { + sb.Append(DateProp.Value); + } + sb.Append("\n"); + sb.Append(" DatetimeProp: "); + if (DatetimeProp.IsSet) + { + sb.Append(DatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayNullableProp: "); + if (ArrayNullableProp.IsSet) + { + sb.Append(ArrayNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: "); + if (ArrayAndItemsNullableProp.IsSet) + { + sb.Append(ArrayAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayItemsNullable: "); + if (ArrayItemsNullable.IsSet) + { + sb.Append(ArrayItemsNullable.Value); + } + sb.Append("\n"); + sb.Append(" ObjectNullableProp: "); + if (ObjectNullableProp.IsSet) + { + sb.Append(ObjectNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectAndItemsNullableProp: "); + if (ObjectAndItemsNullableProp.IsSet) + { + sb.Append(ObjectAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectItemsNullable: "); + if (ObjectItemsNullable.IsSet) + { + sb.Append(ObjectItemsNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 059dd8c09a0b..7197ed45b2f7 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -64,7 +64,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableGuidClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index eabf9cccc135..45817d11a099 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -66,7 +66,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); + sb.Append(" JustNumber: "); + if (JustNumber.IsSet) + { + sb.Append(JustNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index fe77912ea4be..f963841469a8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -105,10 +105,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); - sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" DeprecatedRef: "); + if (DeprecatedRef.IsSet) + { + sb.Append(DeprecatedRef.Value); + } + sb.Append("\n"); + sb.Append(" Bars: "); + if (Bars.IsSet) + { + sb.Append(Bars.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs index 22df3b5b7b01..82b776600fdf 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -136,12 +136,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" PetId: "); + if (PetId.IsSet) + { + sb.Append(PetId.Value); + } + sb.Append("\n"); + sb.Append(" Quantity: "); + if (Quantity.IsSet) + { + sb.Append(Quantity.Value); + } + sb.Append("\n"); + sb.Append(" ShipDate: "); + if (ShipDate.IsSet) + { + sb.Append(ShipDate.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); + sb.Append(" Complete: "); + if (Complete.IsSet) + { + sb.Append(Complete.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index f55b2f8c2454..360c09657f21 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -84,9 +84,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append(" MyNumber: "); + if (MyNumber.IsSet) + { + sb.Append(MyNumber.Value); + } + sb.Append("\n"); + sb.Append(" MyString: "); + if (MyString.IsSet) + { + sb.Append(MyString.Value); + } + sb.Append("\n"); + sb.Append(" MyBoolean: "); + if (MyBoolean.IsSet) + { + sb.Append(MyBoolean.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs index bbd65be3d7fd..38f3262281ca 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -159,12 +159,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index d6715914adc5..a348c6a0250b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -82,8 +82,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Baz: "); + if (Baz.IsSet) + { + sb.Append(Baz.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 7fbdfa344d3c..6b5ef301cfcd 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -823,48 +823,158 @@ public override string ToString() sb.Append("class RequiredClass {\n"); sb.Append(" RequiredNullableIntegerProp: ").Append(RequiredNullableIntegerProp).Append("\n"); sb.Append(" RequiredNotnullableintegerProp: ").Append(RequiredNotnullableintegerProp).Append("\n"); - sb.Append(" NotRequiredNullableIntegerProp: ").Append(NotRequiredNullableIntegerProp).Append("\n"); - sb.Append(" NotRequiredNotnullableintegerProp: ").Append(NotRequiredNotnullableintegerProp).Append("\n"); + sb.Append(" NotRequiredNullableIntegerProp: "); + if (NotRequiredNullableIntegerProp.IsSet) + { + sb.Append(NotRequiredNullableIntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableintegerProp: "); + if (NotRequiredNotnullableintegerProp.IsSet) + { + sb.Append(NotRequiredNotnullableintegerProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableStringProp: ").Append(RequiredNullableStringProp).Append("\n"); sb.Append(" RequiredNotnullableStringProp: ").Append(RequiredNotnullableStringProp).Append("\n"); - sb.Append(" NotrequiredNullableStringProp: ").Append(NotrequiredNullableStringProp).Append("\n"); - sb.Append(" NotrequiredNotnullableStringProp: ").Append(NotrequiredNotnullableStringProp).Append("\n"); + sb.Append(" NotrequiredNullableStringProp: "); + if (NotrequiredNullableStringProp.IsSet) + { + sb.Append(NotrequiredNullableStringProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableStringProp: "); + if (NotrequiredNotnullableStringProp.IsSet) + { + sb.Append(NotrequiredNotnullableStringProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableBooleanProp: ").Append(RequiredNullableBooleanProp).Append("\n"); sb.Append(" RequiredNotnullableBooleanProp: ").Append(RequiredNotnullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNullableBooleanProp: ").Append(NotrequiredNullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNotnullableBooleanProp: ").Append(NotrequiredNotnullableBooleanProp).Append("\n"); + sb.Append(" NotrequiredNullableBooleanProp: "); + if (NotrequiredNullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNullableBooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableBooleanProp: "); + if (NotrequiredNotnullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNotnullableBooleanProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableDateProp: ").Append(RequiredNullableDateProp).Append("\n"); sb.Append(" RequiredNotNullableDateProp: ").Append(RequiredNotNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNullableDateProp: ").Append(NotRequiredNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNotnullableDateProp: ").Append(NotRequiredNotnullableDateProp).Append("\n"); + sb.Append(" NotRequiredNullableDateProp: "); + if (NotRequiredNullableDateProp.IsSet) + { + sb.Append(NotRequiredNullableDateProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableDateProp: "); + if (NotRequiredNotnullableDateProp.IsSet) + { + sb.Append(NotRequiredNotnullableDateProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableDatetimeProp: ").Append(RequiredNotnullableDatetimeProp).Append("\n"); sb.Append(" RequiredNullableDatetimeProp: ").Append(RequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNullableDatetimeProp: ").Append(NotrequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNotnullableDatetimeProp: ").Append(NotrequiredNotnullableDatetimeProp).Append("\n"); + sb.Append(" NotrequiredNullableDatetimeProp: "); + if (NotrequiredNullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNullableDatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableDatetimeProp: "); + if (NotrequiredNotnullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNotnullableDatetimeProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumInteger: ").Append(RequiredNullableEnumInteger).Append("\n"); sb.Append(" RequiredNotnullableEnumInteger: ").Append(RequiredNotnullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNullableEnumInteger: ").Append(NotrequiredNullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumInteger: ").Append(NotrequiredNotnullableEnumInteger).Append("\n"); + sb.Append(" NotrequiredNullableEnumInteger: "); + if (NotrequiredNullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNullableEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumInteger: "); + if (NotrequiredNotnullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNotnullableEnumInteger.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumIntegerOnly: ").Append(RequiredNullableEnumIntegerOnly).Append("\n"); sb.Append(" RequiredNotnullableEnumIntegerOnly: ").Append(RequiredNotnullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNullableEnumIntegerOnly: ").Append(NotrequiredNullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumIntegerOnly: ").Append(NotrequiredNotnullableEnumIntegerOnly).Append("\n"); + sb.Append(" NotrequiredNullableEnumIntegerOnly: "); + if (NotrequiredNullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNullableEnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumIntegerOnly: "); + if (NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNotnullableEnumIntegerOnly.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableEnumString: ").Append(RequiredNotnullableEnumString).Append("\n"); sb.Append(" RequiredNullableEnumString: ").Append(RequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNullableEnumString: ").Append(NotrequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumString: ").Append(NotrequiredNotnullableEnumString).Append("\n"); + sb.Append(" NotrequiredNullableEnumString: "); + if (NotrequiredNullableEnumString.IsSet) + { + sb.Append(NotrequiredNullableEnumString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumString: "); + if (NotrequiredNotnullableEnumString.IsSet) + { + sb.Append(NotrequiredNotnullableEnumString.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableOuterEnumDefaultValue: ").Append(RequiredNullableOuterEnumDefaultValue).Append("\n"); sb.Append(" RequiredNotnullableOuterEnumDefaultValue: ").Append(RequiredNotnullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNullableOuterEnumDefaultValue: ").Append(NotrequiredNullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: ").Append(NotrequiredNotnullableOuterEnumDefaultValue).Append("\n"); + sb.Append(" NotrequiredNullableOuterEnumDefaultValue: "); + if (NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: "); + if (NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNotnullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableUuid: ").Append(RequiredNullableUuid).Append("\n"); sb.Append(" RequiredNotnullableUuid: ").Append(RequiredNotnullableUuid).Append("\n"); - sb.Append(" NotrequiredNullableUuid: ").Append(NotrequiredNullableUuid).Append("\n"); - sb.Append(" NotrequiredNotnullableUuid: ").Append(NotrequiredNotnullableUuid).Append("\n"); + sb.Append(" NotrequiredNullableUuid: "); + if (NotrequiredNullableUuid.IsSet) + { + sb.Append(NotrequiredNullableUuid.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableUuid: "); + if (NotrequiredNotnullableUuid.IsSet) + { + sb.Append(NotrequiredNotnullableUuid.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableArrayOfString: ").Append(RequiredNullableArrayOfString).Append("\n"); sb.Append(" RequiredNotnullableArrayOfString: ").Append(RequiredNotnullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNullableArrayOfString: ").Append(NotrequiredNullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNotnullableArrayOfString: ").Append(NotrequiredNotnullableArrayOfString).Append("\n"); + sb.Append(" NotrequiredNullableArrayOfString: "); + if (NotrequiredNullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNullableArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableArrayOfString: "); + if (NotrequiredNotnullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNotnullableArrayOfString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs index 077005d6cc27..92d4864fc08d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" VarReturn: ").Append(VarReturn).Append("\n"); + sb.Append(" VarReturn: "); + if (VarReturn.IsSet) + { + sb.Append(VarReturn.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 53d7053be15e..dfe3ccc106d2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHash {\n"); - sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" RoleUuid: "); + if (RoleUuid.IsSet) + { + sb.Append(RoleUuid.Value); + } + sb.Append("\n"); + sb.Append(" Role: "); + if (Role.IsSet) + { + sb.Append(Role.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 177eddaba12d..a0a59f65eb4c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHashRole {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 8778d6b6381c..ecec83488e3b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" VarSpecialModelName: ").Append(VarSpecialModelName).Append("\n"); + sb.Append(" SpecialPropertyName: "); + if (SpecialPropertyName.IsSet) + { + sb.Append(SpecialPropertyName.Value); + } + sb.Append("\n"); + sb.Append(" VarSpecialModelName: "); + if (VarSpecialModelName.IsSet) + { + sb.Append(VarSpecialModelName.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 74c5d5104142..fda609b9c823 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 72bd1b369aeb..56e0161283c7 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordList {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Value: "); + if (Value.IsSet) + { + sb.Append(Value.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 6e00826d7870..d8acb6ebf530 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordListObject {\n"); - sb.Append(" TestCollectionEndingWithWordList: ").Append(TestCollectionEndingWithWordList).Append("\n"); + sb.Append(" TestCollectionEndingWithWordList: "); + if (TestCollectionEndingWithWordList.IsSet) + { + sb.Append(TestCollectionEndingWithWordList.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index aca5c0652ab6..707fd66eca91 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n"); - sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n"); + sb.Append(" SomeProperty: "); + if (SomeProperty.IsSet) + { + sb.Append(SomeProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs index 4c20f415c024..e8d7cc34f942 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -191,18 +191,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); - sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); - sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Username: "); + if (Username.IsSet) + { + sb.Append(Username.Value); + } + sb.Append("\n"); + sb.Append(" FirstName: "); + if (FirstName.IsSet) + { + sb.Append(FirstName.Value); + } + sb.Append("\n"); + sb.Append(" LastName: "); + if (LastName.IsSet) + { + sb.Append(LastName.Value); + } + sb.Append("\n"); + sb.Append(" Email: "); + if (Email.IsSet) + { + sb.Append(Email.Value); + } + sb.Append("\n"); + sb.Append(" Password: "); + if (Password.IsSet) + { + sb.Append(Password.Value); + } + sb.Append("\n"); + sb.Append(" Phone: "); + if (Phone.IsSet) + { + sb.Append(Phone.Value); + } + sb.Append("\n"); + sb.Append(" UserStatus: "); + if (UserStatus.IsSet) + { + sb.Append(UserStatus.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: "); + if (ObjectWithNoDeclaredProps.IsSet) + { + sb.Append(ObjectWithNoDeclaredProps.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: "); + if (ObjectWithNoDeclaredPropsNullable.IsSet) + { + sb.Append(ObjectWithNoDeclaredPropsNullable.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypeProp: "); + if (AnyTypeProp.IsSet) + { + sb.Append(AnyTypeProp.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypePropNullable: "); + if (AnyTypePropNullable.IsSet) + { + sb.Append(AnyTypePropNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 2038fc78e8db..f5e1221d3806 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -92,8 +92,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Whale {\n"); - sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n"); - sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n"); + sb.Append(" HasBaleen: "); + if (HasBaleen.IsSet) + { + sb.Append(HasBaleen.Value); + } + sb.Append("\n"); + sb.Append(" HasTeeth: "); + if (HasTeeth.IsSet) + { + sb.Append(HasTeeth.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 3bb224da1e43..6d906475d2e0 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -109,7 +109,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Zebra {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index daccbc984737..b98444329c5f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -82,7 +82,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ZeroBasedEnumClass {\n"); - sb.Append(" ZeroBasedEnum: ").Append(ZeroBasedEnum).Append("\n"); + sb.Append(" ZeroBasedEnum: "); + if (ZeroBasedEnum.IsSet) + { + sb.Append(ZeroBasedEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 64ec72ede072..968324fe7c7e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Activity {\n"); - sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" ActivityOutputs: "); + if (ActivityOutputs.IsSet) + { + sb.Append(ActivityOutputs.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 1b186a8771ed..3bd8c654d0b3 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ActivityOutputElementRepresentation {\n"); - sb.Append(" Prop1: ").Append(Prop1).Append("\n"); - sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" Prop1: "); + if (Prop1.IsSet) + { + sb.Append(Prop1.Value); + } + sb.Append("\n"); + sb.Append(" Prop2: "); + if (Prop2.IsSet) + { + sb.Append(Prop2.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index c84fba57b967..19fbc48f7f26 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -155,14 +155,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); - sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" MapProperty: "); + if (MapProperty.IsSet) + { + sb.Append(MapProperty.Value); + } + sb.Append("\n"); + sb.Append(" MapOfMapProperty: "); + if (MapOfMapProperty.IsSet) + { + sb.Append(MapOfMapProperty.Value); + } + sb.Append("\n"); + sb.Append(" Anytype1: "); + if (Anytype1.IsSet) + { + sb.Append(Anytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype1: "); + if (MapWithUndeclaredPropertiesAnytype1.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype2: "); + if (MapWithUndeclaredPropertiesAnytype2.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype2.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype3: "); + if (MapWithUndeclaredPropertiesAnytype3.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype3.Value); + } + sb.Append("\n"); + sb.Append(" EmptyMap: "); + if (EmptyMap.IsSet) + { + sb.Append(EmptyMap.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesString: "); + if (MapWithUndeclaredPropertiesString.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs index a9332678ea77..e594f5727d8d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -94,7 +94,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Animal {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 72fba0eefb19..2c4287a5d287 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -89,9 +89,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Code: "); + if (Code.IsSet) + { + sb.Append(Code.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" Message: "); + if (Message.IsSet) + { + sb.Append(Message.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs index f085a6b77f31..0eb05dfaa9c8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -94,9 +94,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Apple {\n"); - sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" ColorCode: ").Append(ColorCode).Append("\n"); + sb.Append(" Cultivar: "); + if (Cultivar.IsSet) + { + sb.Append(Cultivar.Value); + } + sb.Append("\n"); + sb.Append(" Origin: "); + if (Origin.IsSet) + { + sb.Append(Origin.Value); + } + sb.Append("\n"); + sb.Append(" ColorCode: "); + if (ColorCode.IsSet) + { + sb.Append(ColorCode.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index f2a1e63e3787..ff277fb9035d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -75,7 +75,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class AppleReq {\n"); sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Mealy: ").Append(Mealy).Append("\n"); + sb.Append(" Mealy: "); + if (Mealy.IsSet) + { + sb.Append(Mealy.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 7cc2ebed0e24..ad4969ed5a65 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); + sb.Append(" ArrayArrayNumber: "); + if (ArrayArrayNumber.IsSet) + { + sb.Append(ArrayArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 7d85fc169003..a0155ed89aa2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); + sb.Append(" ArrayNumber: "); + if (ArrayNumber.IsSet) + { + sb.Append(ArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 119862eca2e8..c13d67627c4e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -94,9 +94,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: "); + if (ArrayOfString.IsSet) + { + sb.Append(ArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfInteger: "); + if (ArrayArrayOfInteger.IsSet) + { + sb.Append(ArrayArrayOfInteger.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfModel: "); + if (ArrayArrayOfModel.IsSet) + { + sb.Append(ArrayArrayOfModel.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 3d6f908c4487..8dc5fbd16dfd 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Banana {\n"); - sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" LengthCm: "); + if (LengthCm.IsSet) + { + sb.Append(LengthCm.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 02703e4025a9..fc7c797ede4f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -70,7 +70,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class BananaReq {\n"); sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); - sb.Append(" Sweet: ").Append(Sweet).Append("\n"); + sb.Append(" Sweet: "); + if (Sweet.IsSet) + { + sb.Append(Sweet.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 46478517456c..1f918a975bed 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -134,12 +134,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: "); + if (SmallCamel.IsSet) + { + sb.Append(SmallCamel.Value); + } + sb.Append("\n"); + sb.Append(" CapitalCamel: "); + if (CapitalCamel.IsSet) + { + sb.Append(CapitalCamel.Value); + } + sb.Append("\n"); + sb.Append(" SmallSnake: "); + if (SmallSnake.IsSet) + { + sb.Append(SmallSnake.Value); + } + sb.Append("\n"); + sb.Append(" CapitalSnake: "); + if (CapitalSnake.IsSet) + { + sb.Append(CapitalSnake.Value); + } + sb.Append("\n"); + sb.Append(" SCAETHFlowPoints: "); + if (SCAETHFlowPoints.IsSet) + { + sb.Append(SCAETHFlowPoints.Value); + } + sb.Append("\n"); + sb.Append(" ATT_NAME: "); + if (ATT_NAME.IsSet) + { + sb.Append(ATT_NAME.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs index c2e163db6026..106c21bf8373 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -76,7 +76,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" Declawed: "); + if (Declawed.IsSet) + { + sb.Append(Declawed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs index fa5cfbd9a2d5..2542a088011d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -84,7 +84,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index fd54f56a6ea9..1d3035ff4c33 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -100,7 +100,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" PetType: ").Append(PetType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index c7e10769716c..7e5c313abacc 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 3b5f665905e4..4cedebb8687a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -70,7 +70,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DateOnlyClass {\n"); - sb.Append(" DateOnlyProperty: ").Append(DateOnlyProperty).Append("\n"); + sb.Append(" DateOnlyProperty: "); + if (DateOnlyProperty.IsSet) + { + sb.Append(DateOnlyProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index d323606d4072..0deddca5eb3b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DeprecatedObject {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs index d638ec7f4551..4971b148db15 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -81,7 +81,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" Breed: "); + if (Breed.IsSet) + { + sb.Append(Breed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index bcb1878282cf..f1b2857a8c8c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -97,10 +97,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Drawing {\n"); - sb.Append(" MainShape: ").Append(MainShape).Append("\n"); - sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); - sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" MainShape: "); + if (MainShape.IsSet) + { + sb.Append(MainShape.Value); + } + sb.Append("\n"); + sb.Append(" ShapeOrNull: "); + if (ShapeOrNull.IsSet) + { + sb.Append(ShapeOrNull.Value); + } + sb.Append("\n"); + sb.Append(" NullableShape: "); + if (NullableShape.IsSet) + { + sb.Append(NullableShape.Value); + } + sb.Append("\n"); + sb.Append(" Shapes: "); + if (Shapes.IsSet) + { + sb.Append(Shapes.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 569a1bbf1ea4..6f4cfcc81422 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -114,8 +114,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: "); + if (JustSymbol.IsSet) + { + sb.Append(JustSymbol.Value); + } + sb.Append("\n"); + sb.Append(" ArrayEnum: "); + if (ArrayEnum.IsSet) + { + sb.Append(ArrayEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 20e394af4bc2..d68a80401400 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -296,15 +296,55 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumString: "); + if (EnumString.IsSet) + { + sb.Append(EnumString.Value); + } + sb.Append("\n"); sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); - sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); - sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" EnumInteger: "); + if (EnumInteger.IsSet) + { + sb.Append(EnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" EnumIntegerOnly: "); + if (EnumIntegerOnly.IsSet) + { + sb.Append(EnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" EnumNumber: "); + if (EnumNumber.IsSet) + { + sb.Append(EnumNumber.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnum: "); + if (OuterEnum.IsSet) + { + sb.Append(OuterEnum.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumInteger: "); + if (OuterEnumInteger.IsSet) + { + sb.Append(OuterEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumDefaultValue: "); + if (OuterEnumDefaultValue.IsSet) + { + sb.Append(OuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumIntegerDefaultValue: "); + if (OuterEnumIntegerDefaultValue.IsSet) + { + sb.Append(OuterEnumIntegerDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs index 3073d9ce4919..087edb6767da 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); + sb.Append(" SourceURI: "); + if (SourceURI.IsSet) + { + sb.Append(SourceURI.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index bdd81d64aace..1d10ee837aad 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" File: "); + if (File.IsSet) + { + sb.Append(File.Value); + } + sb.Append("\n"); + sb.Append(" Files: "); + if (Files.IsSet) + { + sb.Append(Files.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs index d899e3f91fa0..81e2be3f56c7 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Foo {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 3465ee4146ea..08f3751f9093 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 63345fa27a20..b378e6dd5e67 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -272,25 +272,100 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); - sb.Append(" Int32: ").Append(Int32).Append("\n"); - sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n"); - sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n"); + sb.Append(" Integer: "); + if (Integer.IsSet) + { + sb.Append(Integer.Value); + } + sb.Append("\n"); + sb.Append(" Int32: "); + if (Int32.IsSet) + { + sb.Append(Int32.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedInteger: "); + if (UnsignedInteger.IsSet) + { + sb.Append(UnsignedInteger.Value); + } + sb.Append("\n"); + sb.Append(" Int64: "); + if (Int64.IsSet) + { + sb.Append(Int64.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedLong: "); + if (UnsignedLong.IsSet) + { + sb.Append(UnsignedLong.Value); + } + sb.Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" Float: "); + if (Float.IsSet) + { + sb.Append(Float.Value); + } + sb.Append("\n"); + sb.Append(" Double: "); + if (Double.IsSet) + { + sb.Append(Double.Value); + } + sb.Append("\n"); + sb.Append(" Decimal: "); + if (Decimal.IsSet) + { + sb.Append(Decimal.Value); + } + sb.Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Binary: "); + if (Binary.IsSet) + { + sb.Append(Binary.Value); + } + sb.Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); - sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); - sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n"); + sb.Append(" PatternWithDigits: "); + if (PatternWithDigits.IsSet) + { + sb.Append(PatternWithDigits.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithDigitsAndDelimiter: "); + if (PatternWithDigitsAndDelimiter.IsSet) + { + sb.Append(PatternWithDigitsAndDelimiter.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithBackslash: "); + if (PatternWithBackslash.IsSet) + { + sb.Append(PatternWithBackslash.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 96d854d60872..b8197df20437 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -84,8 +84,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Foo: "); + if (Foo.IsSet) + { + sb.Append(Foo.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index cced5965aa84..e4a388da0740 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HealthCheckResult {\n"); - sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); + sb.Append(" NullableMessage: "); + if (NullableMessage.IsSet) + { + sb.Append(NullableMessage.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs index 358846cdd689..1d1185fd7171 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class List {\n"); - sb.Append(" Var123List: ").Append(Var123List).Append("\n"); + sb.Append(" Var123List: "); + if (Var123List.IsSet) + { + sb.Append(Var123List.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 63e1726e5f79..baa3fe2f8612 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LiteralStringClass {\n"); - sb.Append(" EscapedLiteralString: ").Append(EscapedLiteralString).Append("\n"); - sb.Append(" UnescapedLiteralString: ").Append(UnescapedLiteralString).Append("\n"); + sb.Append(" EscapedLiteralString: "); + if (EscapedLiteralString.IsSet) + { + sb.Append(EscapedLiteralString.Value); + } + sb.Append("\n"); + sb.Append(" UnescapedLiteralString: "); + if (UnescapedLiteralString.IsSet) + { + sb.Append(UnescapedLiteralString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 004bf942c034..7e85200b5921 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -126,10 +126,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: "); + if (MapMapOfString.IsSet) + { + sb.Append(MapMapOfString.Value); + } + sb.Append("\n"); + sb.Append(" MapOfEnumString: "); + if (MapOfEnumString.IsSet) + { + sb.Append(MapOfEnumString.Value); + } + sb.Append("\n"); + sb.Append(" DirectMap: "); + if (DirectMap.IsSet) + { + sb.Append(DirectMap.Value); + } + sb.Append("\n"); + sb.Append(" IndirectMap: "); + if (IndirectMap.IsSet) + { + sb.Append(IndirectMap.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 5dbb7d0ef732..68c2208b6031 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedAnyOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index f18b4793a139..eb425e933a16 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedOneOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index fc342925735f..562d233f37af 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -107,10 +107,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" UuidWithPattern: ").Append(UuidWithPattern).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" UuidWithPattern: "); + if (UuidWithPattern.IsSet) + { + sb.Append(UuidWithPattern.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Map: "); + if (Map.IsSet) + { + sb.Append(Map.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 9d5c0bc35f6f..4dd8bfeb529d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedSubId {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index d22b1c824ceb..cfb54939d213 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 4c8ff7320d98..b85005404154 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" VarClient: "); + if (VarClient.IsSet) + { + sb.Append(VarClient.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs index 10b22f09b12a..e23701fe32f5 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -113,9 +113,24 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" VarName: ").Append(VarName).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" Var123Number: ").Append(Var123Number).Append("\n"); + sb.Append(" SnakeCase: "); + if (SnakeCase.IsSet) + { + sb.Append(SnakeCase.Value); + } + sb.Append("\n"); + sb.Append(" Property: "); + if (Property.IsSet) + { + sb.Append(Property.Value); + } + sb.Append("\n"); + sb.Append(" Var123Number: "); + if (Var123Number.IsSet) + { + sb.Append(Var123Number.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index c384e5bfa54f..104f0658e300 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -162,18 +162,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); - sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); - sb.Append(" DateProp: ").Append(DateProp).Append("\n"); - sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); - sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" IntegerProp: "); + if (IntegerProp.IsSet) + { + sb.Append(IntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NumberProp: "); + if (NumberProp.IsSet) + { + sb.Append(NumberProp.Value); + } + sb.Append("\n"); + sb.Append(" BooleanProp: "); + if (BooleanProp.IsSet) + { + sb.Append(BooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" StringProp: "); + if (StringProp.IsSet) + { + sb.Append(StringProp.Value); + } + sb.Append("\n"); + sb.Append(" DateProp: "); + if (DateProp.IsSet) + { + sb.Append(DateProp.Value); + } + sb.Append("\n"); + sb.Append(" DatetimeProp: "); + if (DatetimeProp.IsSet) + { + sb.Append(DatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayNullableProp: "); + if (ArrayNullableProp.IsSet) + { + sb.Append(ArrayNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: "); + if (ArrayAndItemsNullableProp.IsSet) + { + sb.Append(ArrayAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayItemsNullable: "); + if (ArrayItemsNullable.IsSet) + { + sb.Append(ArrayItemsNullable.Value); + } + sb.Append("\n"); + sb.Append(" ObjectNullableProp: "); + if (ObjectNullableProp.IsSet) + { + sb.Append(ObjectNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectAndItemsNullableProp: "); + if (ObjectAndItemsNullableProp.IsSet) + { + sb.Append(ObjectAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectItemsNullable: "); + if (ObjectItemsNullable.IsSet) + { + sb.Append(ObjectItemsNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 059dd8c09a0b..7197ed45b2f7 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -64,7 +64,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableGuidClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index eabf9cccc135..45817d11a099 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -66,7 +66,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); + sb.Append(" JustNumber: "); + if (JustNumber.IsSet) + { + sb.Append(JustNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index fe77912ea4be..f963841469a8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -105,10 +105,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); - sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" DeprecatedRef: "); + if (DeprecatedRef.IsSet) + { + sb.Append(DeprecatedRef.Value); + } + sb.Append("\n"); + sb.Append(" Bars: "); + if (Bars.IsSet) + { + sb.Append(Bars.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs index 22df3b5b7b01..82b776600fdf 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -136,12 +136,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" PetId: "); + if (PetId.IsSet) + { + sb.Append(PetId.Value); + } + sb.Append("\n"); + sb.Append(" Quantity: "); + if (Quantity.IsSet) + { + sb.Append(Quantity.Value); + } + sb.Append("\n"); + sb.Append(" ShipDate: "); + if (ShipDate.IsSet) + { + sb.Append(ShipDate.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); + sb.Append(" Complete: "); + if (Complete.IsSet) + { + sb.Append(Complete.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index f55b2f8c2454..360c09657f21 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -84,9 +84,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append(" MyNumber: "); + if (MyNumber.IsSet) + { + sb.Append(MyNumber.Value); + } + sb.Append("\n"); + sb.Append(" MyString: "); + if (MyString.IsSet) + { + sb.Append(MyString.Value); + } + sb.Append("\n"); + sb.Append(" MyBoolean: "); + if (MyBoolean.IsSet) + { + sb.Append(MyBoolean.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs index bbd65be3d7fd..38f3262281ca 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -159,12 +159,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index d6715914adc5..a348c6a0250b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -82,8 +82,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Baz: "); + if (Baz.IsSet) + { + sb.Append(Baz.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 7fbdfa344d3c..6b5ef301cfcd 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -823,48 +823,158 @@ public override string ToString() sb.Append("class RequiredClass {\n"); sb.Append(" RequiredNullableIntegerProp: ").Append(RequiredNullableIntegerProp).Append("\n"); sb.Append(" RequiredNotnullableintegerProp: ").Append(RequiredNotnullableintegerProp).Append("\n"); - sb.Append(" NotRequiredNullableIntegerProp: ").Append(NotRequiredNullableIntegerProp).Append("\n"); - sb.Append(" NotRequiredNotnullableintegerProp: ").Append(NotRequiredNotnullableintegerProp).Append("\n"); + sb.Append(" NotRequiredNullableIntegerProp: "); + if (NotRequiredNullableIntegerProp.IsSet) + { + sb.Append(NotRequiredNullableIntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableintegerProp: "); + if (NotRequiredNotnullableintegerProp.IsSet) + { + sb.Append(NotRequiredNotnullableintegerProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableStringProp: ").Append(RequiredNullableStringProp).Append("\n"); sb.Append(" RequiredNotnullableStringProp: ").Append(RequiredNotnullableStringProp).Append("\n"); - sb.Append(" NotrequiredNullableStringProp: ").Append(NotrequiredNullableStringProp).Append("\n"); - sb.Append(" NotrequiredNotnullableStringProp: ").Append(NotrequiredNotnullableStringProp).Append("\n"); + sb.Append(" NotrequiredNullableStringProp: "); + if (NotrequiredNullableStringProp.IsSet) + { + sb.Append(NotrequiredNullableStringProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableStringProp: "); + if (NotrequiredNotnullableStringProp.IsSet) + { + sb.Append(NotrequiredNotnullableStringProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableBooleanProp: ").Append(RequiredNullableBooleanProp).Append("\n"); sb.Append(" RequiredNotnullableBooleanProp: ").Append(RequiredNotnullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNullableBooleanProp: ").Append(NotrequiredNullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNotnullableBooleanProp: ").Append(NotrequiredNotnullableBooleanProp).Append("\n"); + sb.Append(" NotrequiredNullableBooleanProp: "); + if (NotrequiredNullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNullableBooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableBooleanProp: "); + if (NotrequiredNotnullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNotnullableBooleanProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableDateProp: ").Append(RequiredNullableDateProp).Append("\n"); sb.Append(" RequiredNotNullableDateProp: ").Append(RequiredNotNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNullableDateProp: ").Append(NotRequiredNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNotnullableDateProp: ").Append(NotRequiredNotnullableDateProp).Append("\n"); + sb.Append(" NotRequiredNullableDateProp: "); + if (NotRequiredNullableDateProp.IsSet) + { + sb.Append(NotRequiredNullableDateProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableDateProp: "); + if (NotRequiredNotnullableDateProp.IsSet) + { + sb.Append(NotRequiredNotnullableDateProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableDatetimeProp: ").Append(RequiredNotnullableDatetimeProp).Append("\n"); sb.Append(" RequiredNullableDatetimeProp: ").Append(RequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNullableDatetimeProp: ").Append(NotrequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNotnullableDatetimeProp: ").Append(NotrequiredNotnullableDatetimeProp).Append("\n"); + sb.Append(" NotrequiredNullableDatetimeProp: "); + if (NotrequiredNullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNullableDatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableDatetimeProp: "); + if (NotrequiredNotnullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNotnullableDatetimeProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumInteger: ").Append(RequiredNullableEnumInteger).Append("\n"); sb.Append(" RequiredNotnullableEnumInteger: ").Append(RequiredNotnullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNullableEnumInteger: ").Append(NotrequiredNullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumInteger: ").Append(NotrequiredNotnullableEnumInteger).Append("\n"); + sb.Append(" NotrequiredNullableEnumInteger: "); + if (NotrequiredNullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNullableEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumInteger: "); + if (NotrequiredNotnullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNotnullableEnumInteger.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumIntegerOnly: ").Append(RequiredNullableEnumIntegerOnly).Append("\n"); sb.Append(" RequiredNotnullableEnumIntegerOnly: ").Append(RequiredNotnullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNullableEnumIntegerOnly: ").Append(NotrequiredNullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumIntegerOnly: ").Append(NotrequiredNotnullableEnumIntegerOnly).Append("\n"); + sb.Append(" NotrequiredNullableEnumIntegerOnly: "); + if (NotrequiredNullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNullableEnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumIntegerOnly: "); + if (NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNotnullableEnumIntegerOnly.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableEnumString: ").Append(RequiredNotnullableEnumString).Append("\n"); sb.Append(" RequiredNullableEnumString: ").Append(RequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNullableEnumString: ").Append(NotrequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumString: ").Append(NotrequiredNotnullableEnumString).Append("\n"); + sb.Append(" NotrequiredNullableEnumString: "); + if (NotrequiredNullableEnumString.IsSet) + { + sb.Append(NotrequiredNullableEnumString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumString: "); + if (NotrequiredNotnullableEnumString.IsSet) + { + sb.Append(NotrequiredNotnullableEnumString.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableOuterEnumDefaultValue: ").Append(RequiredNullableOuterEnumDefaultValue).Append("\n"); sb.Append(" RequiredNotnullableOuterEnumDefaultValue: ").Append(RequiredNotnullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNullableOuterEnumDefaultValue: ").Append(NotrequiredNullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: ").Append(NotrequiredNotnullableOuterEnumDefaultValue).Append("\n"); + sb.Append(" NotrequiredNullableOuterEnumDefaultValue: "); + if (NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: "); + if (NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNotnullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableUuid: ").Append(RequiredNullableUuid).Append("\n"); sb.Append(" RequiredNotnullableUuid: ").Append(RequiredNotnullableUuid).Append("\n"); - sb.Append(" NotrequiredNullableUuid: ").Append(NotrequiredNullableUuid).Append("\n"); - sb.Append(" NotrequiredNotnullableUuid: ").Append(NotrequiredNotnullableUuid).Append("\n"); + sb.Append(" NotrequiredNullableUuid: "); + if (NotrequiredNullableUuid.IsSet) + { + sb.Append(NotrequiredNullableUuid.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableUuid: "); + if (NotrequiredNotnullableUuid.IsSet) + { + sb.Append(NotrequiredNotnullableUuid.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableArrayOfString: ").Append(RequiredNullableArrayOfString).Append("\n"); sb.Append(" RequiredNotnullableArrayOfString: ").Append(RequiredNotnullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNullableArrayOfString: ").Append(NotrequiredNullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNotnullableArrayOfString: ").Append(NotrequiredNotnullableArrayOfString).Append("\n"); + sb.Append(" NotrequiredNullableArrayOfString: "); + if (NotrequiredNullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNullableArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableArrayOfString: "); + if (NotrequiredNotnullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNotnullableArrayOfString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs index 077005d6cc27..92d4864fc08d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" VarReturn: ").Append(VarReturn).Append("\n"); + sb.Append(" VarReturn: "); + if (VarReturn.IsSet) + { + sb.Append(VarReturn.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 53d7053be15e..dfe3ccc106d2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHash {\n"); - sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" RoleUuid: "); + if (RoleUuid.IsSet) + { + sb.Append(RoleUuid.Value); + } + sb.Append("\n"); + sb.Append(" Role: "); + if (Role.IsSet) + { + sb.Append(Role.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 177eddaba12d..a0a59f65eb4c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHashRole {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 8778d6b6381c..ecec83488e3b 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" VarSpecialModelName: ").Append(VarSpecialModelName).Append("\n"); + sb.Append(" SpecialPropertyName: "); + if (SpecialPropertyName.IsSet) + { + sb.Append(SpecialPropertyName.Value); + } + sb.Append("\n"); + sb.Append(" VarSpecialModelName: "); + if (VarSpecialModelName.IsSet) + { + sb.Append(VarSpecialModelName.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 74c5d5104142..fda609b9c823 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 72bd1b369aeb..56e0161283c7 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordList {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Value: "); + if (Value.IsSet) + { + sb.Append(Value.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 6e00826d7870..d8acb6ebf530 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordListObject {\n"); - sb.Append(" TestCollectionEndingWithWordList: ").Append(TestCollectionEndingWithWordList).Append("\n"); + sb.Append(" TestCollectionEndingWithWordList: "); + if (TestCollectionEndingWithWordList.IsSet) + { + sb.Append(TestCollectionEndingWithWordList.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index aca5c0652ab6..707fd66eca91 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n"); - sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n"); + sb.Append(" SomeProperty: "); + if (SomeProperty.IsSet) + { + sb.Append(SomeProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs index 4c20f415c024..e8d7cc34f942 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -191,18 +191,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); - sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); - sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Username: "); + if (Username.IsSet) + { + sb.Append(Username.Value); + } + sb.Append("\n"); + sb.Append(" FirstName: "); + if (FirstName.IsSet) + { + sb.Append(FirstName.Value); + } + sb.Append("\n"); + sb.Append(" LastName: "); + if (LastName.IsSet) + { + sb.Append(LastName.Value); + } + sb.Append("\n"); + sb.Append(" Email: "); + if (Email.IsSet) + { + sb.Append(Email.Value); + } + sb.Append("\n"); + sb.Append(" Password: "); + if (Password.IsSet) + { + sb.Append(Password.Value); + } + sb.Append("\n"); + sb.Append(" Phone: "); + if (Phone.IsSet) + { + sb.Append(Phone.Value); + } + sb.Append("\n"); + sb.Append(" UserStatus: "); + if (UserStatus.IsSet) + { + sb.Append(UserStatus.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: "); + if (ObjectWithNoDeclaredProps.IsSet) + { + sb.Append(ObjectWithNoDeclaredProps.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: "); + if (ObjectWithNoDeclaredPropsNullable.IsSet) + { + sb.Append(ObjectWithNoDeclaredPropsNullable.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypeProp: "); + if (AnyTypeProp.IsSet) + { + sb.Append(AnyTypeProp.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypePropNullable: "); + if (AnyTypePropNullable.IsSet) + { + sb.Append(AnyTypePropNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 2038fc78e8db..f5e1221d3806 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -92,8 +92,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Whale {\n"); - sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n"); - sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n"); + sb.Append(" HasBaleen: "); + if (HasBaleen.IsSet) + { + sb.Append(HasBaleen.Value); + } + sb.Append("\n"); + sb.Append(" HasTeeth: "); + if (HasTeeth.IsSet) + { + sb.Append(HasTeeth.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 3bb224da1e43..6d906475d2e0 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -109,7 +109,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Zebra {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index daccbc984737..b98444329c5f 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -82,7 +82,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ZeroBasedEnumClass {\n"); - sb.Append(" ZeroBasedEnum: ").Append(ZeroBasedEnum).Append("\n"); + sb.Append(" ZeroBasedEnum: "); + if (ZeroBasedEnum.IsSet) + { + sb.Append(ZeroBasedEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/Env.cs b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/Env.cs index 14c7607811c1..6e882cd789c9 100644 --- a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/Env.cs +++ b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/Env.cs @@ -60,7 +60,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Env {\n"); - sb.Append(" Dummy: ").Append(Dummy).Append("\n"); + sb.Append(" Dummy: "); + if (Dummy.IsSet) + { + sb.Append(Dummy.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/PropertyNameMapping.cs b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/PropertyNameMapping.cs index 3e7a2d37d3cd..cfdf7de4ebd0 100644 --- a/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/PropertyNameMapping.cs +++ b/samples/client/petstore/csharp/restsharp/net6/ParameterMappings/src/Org.OpenAPITools/Model/PropertyNameMapping.cs @@ -99,10 +99,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class PropertyNameMapping {\n"); - sb.Append(" HttpDebugOperation: ").Append(HttpDebugOperation).Append("\n"); - sb.Append(" UnderscoreType: ").Append(UnderscoreType).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" TypeWithUnderscore: ").Append(TypeWithUnderscore).Append("\n"); + sb.Append(" HttpDebugOperation: "); + if (HttpDebugOperation.IsSet) + { + sb.Append(HttpDebugOperation.Value); + } + sb.Append("\n"); + sb.Append(" UnderscoreType: "); + if (UnderscoreType.IsSet) + { + sb.Append(UnderscoreType.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" TypeWithUnderscore: "); + if (TypeWithUnderscore.IsSet) + { + sb.Append(TypeWithUnderscore.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Activity.cs index 64ec72ede072..968324fe7c7e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Activity.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Activity {\n"); - sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" ActivityOutputs: "); + if (ActivityOutputs.IsSet) + { + sb.Append(ActivityOutputs.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 1b186a8771ed..3bd8c654d0b3 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ActivityOutputElementRepresentation {\n"); - sb.Append(" Prop1: ").Append(Prop1).Append("\n"); - sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" Prop1: "); + if (Prop1.IsSet) + { + sb.Append(Prop1.Value); + } + sb.Append("\n"); + sb.Append(" Prop2: "); + if (Prop2.IsSet) + { + sb.Append(Prop2.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 7ad6ecce1c83..5af357df79b0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -155,14 +155,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); - sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" MapProperty: "); + if (MapProperty.IsSet) + { + sb.Append(MapProperty.Value); + } + sb.Append("\n"); + sb.Append(" MapOfMapProperty: "); + if (MapOfMapProperty.IsSet) + { + sb.Append(MapOfMapProperty.Value); + } + sb.Append("\n"); + sb.Append(" Anytype1: "); + if (Anytype1.IsSet) + { + sb.Append(Anytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype1: "); + if (MapWithUndeclaredPropertiesAnytype1.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype2: "); + if (MapWithUndeclaredPropertiesAnytype2.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype2.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype3: "); + if (MapWithUndeclaredPropertiesAnytype3.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype3.Value); + } + sb.Append("\n"); + sb.Append(" EmptyMap: "); + if (EmptyMap.IsSet) + { + sb.Append(EmptyMap.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesString: "); + if (MapWithUndeclaredPropertiesString.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Animal.cs index a9332678ea77..e594f5727d8d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Animal.cs @@ -94,7 +94,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Animal {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ApiResponse.cs index 72fba0eefb19..2c4287a5d287 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -89,9 +89,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Code: "); + if (Code.IsSet) + { + sb.Append(Code.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" Message: "); + if (Message.IsSet) + { + sb.Append(Message.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Apple.cs index f085a6b77f31..0eb05dfaa9c8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Apple.cs @@ -94,9 +94,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Apple {\n"); - sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" ColorCode: ").Append(ColorCode).Append("\n"); + sb.Append(" Cultivar: "); + if (Cultivar.IsSet) + { + sb.Append(Cultivar.Value); + } + sb.Append("\n"); + sb.Append(" Origin: "); + if (Origin.IsSet) + { + sb.Append(Origin.Value); + } + sb.Append("\n"); + sb.Append(" ColorCode: "); + if (ColorCode.IsSet) + { + sb.Append(ColorCode.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AppleReq.cs index f2a1e63e3787..ff277fb9035d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/AppleReq.cs @@ -75,7 +75,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class AppleReq {\n"); sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Mealy: ").Append(Mealy).Append("\n"); + sb.Append(" Mealy: "); + if (Mealy.IsSet) + { + sb.Append(Mealy.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 7cc2ebed0e24..ad4969ed5a65 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); + sb.Append(" ArrayArrayNumber: "); + if (ArrayArrayNumber.IsSet) + { + sb.Append(ArrayArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 7d85fc169003..a0155ed89aa2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); + sb.Append(" ArrayNumber: "); + if (ArrayNumber.IsSet) + { + sb.Append(ArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayTest.cs index 119862eca2e8..c13d67627c4e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -94,9 +94,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: "); + if (ArrayOfString.IsSet) + { + sb.Append(ArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfInteger: "); + if (ArrayArrayOfInteger.IsSet) + { + sb.Append(ArrayArrayOfInteger.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfModel: "); + if (ArrayArrayOfModel.IsSet) + { + sb.Append(ArrayArrayOfModel.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Banana.cs index 3d6f908c4487..8dc5fbd16dfd 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Banana.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Banana {\n"); - sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" LengthCm: "); + if (LengthCm.IsSet) + { + sb.Append(LengthCm.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BananaReq.cs index 02703e4025a9..fc7c797ede4f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/BananaReq.cs @@ -70,7 +70,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class BananaReq {\n"); sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); - sb.Append(" Sweet: ").Append(Sweet).Append("\n"); + sb.Append(" Sweet: "); + if (Sweet.IsSet) + { + sb.Append(Sweet.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Capitalization.cs index 46478517456c..1f918a975bed 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Capitalization.cs @@ -134,12 +134,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: "); + if (SmallCamel.IsSet) + { + sb.Append(SmallCamel.Value); + } + sb.Append("\n"); + sb.Append(" CapitalCamel: "); + if (CapitalCamel.IsSet) + { + sb.Append(CapitalCamel.Value); + } + sb.Append("\n"); + sb.Append(" SmallSnake: "); + if (SmallSnake.IsSet) + { + sb.Append(SmallSnake.Value); + } + sb.Append("\n"); + sb.Append(" CapitalSnake: "); + if (CapitalSnake.IsSet) + { + sb.Append(CapitalSnake.Value); + } + sb.Append("\n"); + sb.Append(" SCAETHFlowPoints: "); + if (SCAETHFlowPoints.IsSet) + { + sb.Append(SCAETHFlowPoints.Value); + } + sb.Append("\n"); + sb.Append(" ATT_NAME: "); + if (ATT_NAME.IsSet) + { + sb.Append(ATT_NAME.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Cat.cs index c2e163db6026..106c21bf8373 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Cat.cs @@ -76,7 +76,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" Declawed: "); + if (Declawed.IsSet) + { + sb.Append(Declawed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Category.cs index fa5cfbd9a2d5..2542a088011d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Category.cs @@ -84,7 +84,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ChildCat.cs index fd54f56a6ea9..1d3035ff4c33 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ChildCat.cs @@ -100,7 +100,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" PetType: ").Append(PetType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ClassModel.cs index c7e10769716c..7e5c313abacc 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ClassModel.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DateOnlyClass.cs index a0cd5a24c145..02e3ef7f3dcb 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DateOnlyClass {\n"); - sb.Append(" DateOnlyProperty: ").Append(DateOnlyProperty).Append("\n"); + sb.Append(" DateOnlyProperty: "); + if (DateOnlyProperty.IsSet) + { + sb.Append(DateOnlyProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DeprecatedObject.cs index d323606d4072..0deddca5eb3b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DeprecatedObject {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Dog.cs index d638ec7f4551..4971b148db15 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Dog.cs @@ -81,7 +81,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" Breed: "); + if (Breed.IsSet) + { + sb.Append(Breed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Drawing.cs index 64341b1a550e..aa23b74d5191 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Drawing.cs @@ -97,10 +97,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Drawing {\n"); - sb.Append(" MainShape: ").Append(MainShape).Append("\n"); - sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); - sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" MainShape: "); + if (MainShape.IsSet) + { + sb.Append(MainShape.Value); + } + sb.Append("\n"); + sb.Append(" ShapeOrNull: "); + if (ShapeOrNull.IsSet) + { + sb.Append(ShapeOrNull.Value); + } + sb.Append("\n"); + sb.Append(" NullableShape: "); + if (NullableShape.IsSet) + { + sb.Append(NullableShape.Value); + } + sb.Append("\n"); + sb.Append(" Shapes: "); + if (Shapes.IsSet) + { + sb.Append(Shapes.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumArrays.cs index 569a1bbf1ea4..6f4cfcc81422 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -114,8 +114,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: "); + if (JustSymbol.IsSet) + { + sb.Append(JustSymbol.Value); + } + sb.Append("\n"); + sb.Append(" ArrayEnum: "); + if (ArrayEnum.IsSet) + { + sb.Append(ArrayEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs index db5927382fe1..f8adcaa09a46 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs @@ -296,15 +296,55 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumString: "); + if (EnumString.IsSet) + { + sb.Append(EnumString.Value); + } + sb.Append("\n"); sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); - sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); - sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" EnumInteger: "); + if (EnumInteger.IsSet) + { + sb.Append(EnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" EnumIntegerOnly: "); + if (EnumIntegerOnly.IsSet) + { + sb.Append(EnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" EnumNumber: "); + if (EnumNumber.IsSet) + { + sb.Append(EnumNumber.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnum: "); + if (OuterEnum.IsSet) + { + sb.Append(OuterEnum.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumInteger: "); + if (OuterEnumInteger.IsSet) + { + sb.Append(OuterEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumDefaultValue: "); + if (OuterEnumDefaultValue.IsSet) + { + sb.Append(OuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumIntegerDefaultValue: "); + if (OuterEnumIntegerDefaultValue.IsSet) + { + sb.Append(OuterEnumIntegerDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/File.cs index 3073d9ce4919..087edb6767da 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/File.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); + sb.Append(" SourceURI: "); + if (SourceURI.IsSet) + { + sb.Append(SourceURI.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index bdd81d64aace..1d10ee837aad 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" File: "); + if (File.IsSet) + { + sb.Append(File.Value); + } + sb.Append("\n"); + sb.Append(" Files: "); + if (Files.IsSet) + { + sb.Append(Files.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Foo.cs index d899e3f91fa0..81e2be3f56c7 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Foo.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Foo {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 3465ee4146ea..08f3751f9093 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs index 7abaa614cd4e..d6dfd7f72e42 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs @@ -271,25 +271,100 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); - sb.Append(" Int32: ").Append(Int32).Append("\n"); - sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n"); - sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n"); + sb.Append(" Integer: "); + if (Integer.IsSet) + { + sb.Append(Integer.Value); + } + sb.Append("\n"); + sb.Append(" Int32: "); + if (Int32.IsSet) + { + sb.Append(Int32.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedInteger: "); + if (UnsignedInteger.IsSet) + { + sb.Append(UnsignedInteger.Value); + } + sb.Append("\n"); + sb.Append(" Int64: "); + if (Int64.IsSet) + { + sb.Append(Int64.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedLong: "); + if (UnsignedLong.IsSet) + { + sb.Append(UnsignedLong.Value); + } + sb.Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" Float: "); + if (Float.IsSet) + { + sb.Append(Float.Value); + } + sb.Append("\n"); + sb.Append(" Double: "); + if (Double.IsSet) + { + sb.Append(Double.Value); + } + sb.Append("\n"); + sb.Append(" Decimal: "); + if (Decimal.IsSet) + { + sb.Append(Decimal.Value); + } + sb.Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Binary: "); + if (Binary.IsSet) + { + sb.Append(Binary.Value); + } + sb.Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); - sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); - sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n"); + sb.Append(" PatternWithDigits: "); + if (PatternWithDigits.IsSet) + { + sb.Append(PatternWithDigits.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithDigitsAndDelimiter: "); + if (PatternWithDigitsAndDelimiter.IsSet) + { + sb.Append(PatternWithDigitsAndDelimiter.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithBackslash: "); + if (PatternWithBackslash.IsSet) + { + sb.Append(PatternWithBackslash.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 96d854d60872..b8197df20437 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -84,8 +84,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Foo: "); + if (Foo.IsSet) + { + sb.Append(Foo.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 9fb95d139666..5999c0c3ad16 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HealthCheckResult {\n"); - sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); + sb.Append(" NullableMessage: "); + if (NullableMessage.IsSet) + { + sb.Append(NullableMessage.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/List.cs index 358846cdd689..1d1185fd7171 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/List.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class List {\n"); - sb.Append(" Var123List: ").Append(Var123List).Append("\n"); + sb.Append(" Var123List: "); + if (Var123List.IsSet) + { + sb.Append(Var123List.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 63e1726e5f79..baa3fe2f8612 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LiteralStringClass {\n"); - sb.Append(" EscapedLiteralString: ").Append(EscapedLiteralString).Append("\n"); - sb.Append(" UnescapedLiteralString: ").Append(UnescapedLiteralString).Append("\n"); + sb.Append(" EscapedLiteralString: "); + if (EscapedLiteralString.IsSet) + { + sb.Append(EscapedLiteralString.Value); + } + sb.Append("\n"); + sb.Append(" UnescapedLiteralString: "); + if (UnescapedLiteralString.IsSet) + { + sb.Append(UnescapedLiteralString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MapTest.cs index 004bf942c034..7e85200b5921 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MapTest.cs @@ -126,10 +126,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: "); + if (MapMapOfString.IsSet) + { + sb.Append(MapMapOfString.Value); + } + sb.Append("\n"); + sb.Append(" MapOfEnumString: "); + if (MapOfEnumString.IsSet) + { + sb.Append(MapOfEnumString.Value); + } + sb.Append("\n"); + sb.Append(" DirectMap: "); + if (DirectMap.IsSet) + { + sb.Append(DirectMap.Value); + } + sb.Append("\n"); + sb.Append(" IndirectMap: "); + if (IndirectMap.IsSet) + { + sb.Append(IndirectMap.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 5dbb7d0ef732..68c2208b6031 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedAnyOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOf.cs index f18b4793a139..eb425e933a16 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedOneOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index fc342925735f..562d233f37af 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -107,10 +107,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" UuidWithPattern: ").Append(UuidWithPattern).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" UuidWithPattern: "); + if (UuidWithPattern.IsSet) + { + sb.Append(UuidWithPattern.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Map: "); + if (Map.IsSet) + { + sb.Append(Map.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedSubId.cs index 9d5c0bc35f6f..4dd8bfeb529d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedSubId {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Model200Response.cs index d22b1c824ceb..cfb54939d213 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Model200Response.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ModelClient.cs index 4c8ff7320d98..b85005404154 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ModelClient.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" VarClient: "); + if (VarClient.IsSet) + { + sb.Append(VarClient.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Name.cs index 10b22f09b12a..e23701fe32f5 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Name.cs @@ -113,9 +113,24 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" VarName: ").Append(VarName).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" Var123Number: ").Append(Var123Number).Append("\n"); + sb.Append(" SnakeCase: "); + if (SnakeCase.IsSet) + { + sb.Append(SnakeCase.Value); + } + sb.Append("\n"); + sb.Append(" Property: "); + if (Property.IsSet) + { + sb.Append(Property.Value); + } + sb.Append("\n"); + sb.Append(" Var123Number: "); + if (Var123Number.IsSet) + { + sb.Append(Var123Number.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs index 7d1a62b2dc89..76d00fe41996 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs @@ -161,18 +161,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); - sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); - sb.Append(" DateProp: ").Append(DateProp).Append("\n"); - sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); - sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" IntegerProp: "); + if (IntegerProp.IsSet) + { + sb.Append(IntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NumberProp: "); + if (NumberProp.IsSet) + { + sb.Append(NumberProp.Value); + } + sb.Append("\n"); + sb.Append(" BooleanProp: "); + if (BooleanProp.IsSet) + { + sb.Append(BooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" StringProp: "); + if (StringProp.IsSet) + { + sb.Append(StringProp.Value); + } + sb.Append("\n"); + sb.Append(" DateProp: "); + if (DateProp.IsSet) + { + sb.Append(DateProp.Value); + } + sb.Append("\n"); + sb.Append(" DatetimeProp: "); + if (DatetimeProp.IsSet) + { + sb.Append(DatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayNullableProp: "); + if (ArrayNullableProp.IsSet) + { + sb.Append(ArrayNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: "); + if (ArrayAndItemsNullableProp.IsSet) + { + sb.Append(ArrayAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayItemsNullable: "); + if (ArrayItemsNullable.IsSet) + { + sb.Append(ArrayItemsNullable.Value); + } + sb.Append("\n"); + sb.Append(" ObjectNullableProp: "); + if (ObjectNullableProp.IsSet) + { + sb.Append(ObjectNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectAndItemsNullableProp: "); + if (ObjectAndItemsNullableProp.IsSet) + { + sb.Append(ObjectAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectItemsNullable: "); + if (ObjectItemsNullable.IsSet) + { + sb.Append(ObjectItemsNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 059dd8c09a0b..7197ed45b2f7 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -64,7 +64,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableGuidClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NumberOnly.cs index eabf9cccc135..45817d11a099 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -66,7 +66,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); + sb.Append(" JustNumber: "); + if (JustNumber.IsSet) + { + sb.Append(JustNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index fe77912ea4be..f963841469a8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -105,10 +105,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); - sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" DeprecatedRef: "); + if (DeprecatedRef.IsSet) + { + sb.Append(DeprecatedRef.Value); + } + sb.Append("\n"); + sb.Append(" Bars: "); + if (Bars.IsSet) + { + sb.Append(Bars.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Order.cs index c7665143aa17..f0960cfe54d9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Order.cs @@ -136,12 +136,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" PetId: "); + if (PetId.IsSet) + { + sb.Append(PetId.Value); + } + sb.Append("\n"); + sb.Append(" Quantity: "); + if (Quantity.IsSet) + { + sb.Append(Quantity.Value); + } + sb.Append("\n"); + sb.Append(" ShipDate: "); + if (ShipDate.IsSet) + { + sb.Append(ShipDate.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); + sb.Append(" Complete: "); + if (Complete.IsSet) + { + sb.Append(Complete.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterComposite.cs index f55b2f8c2454..360c09657f21 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -84,9 +84,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append(" MyNumber: "); + if (MyNumber.IsSet) + { + sb.Append(MyNumber.Value); + } + sb.Append("\n"); + sb.Append(" MyString: "); + if (MyString.IsSet) + { + sb.Append(MyString.Value); + } + sb.Append("\n"); + sb.Append(" MyBoolean: "); + if (MyBoolean.IsSet) + { + sb.Append(MyBoolean.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pet.cs index bbd65be3d7fd..38f3262281ca 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Pet.cs @@ -159,12 +159,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index d6715914adc5..a348c6a0250b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -82,8 +82,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Baz: "); + if (Baz.IsSet) + { + sb.Append(Baz.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs index aa89e5a7386e..636b76bba122 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -819,48 +819,158 @@ public override string ToString() sb.Append("class RequiredClass {\n"); sb.Append(" RequiredNullableIntegerProp: ").Append(RequiredNullableIntegerProp).Append("\n"); sb.Append(" RequiredNotnullableintegerProp: ").Append(RequiredNotnullableintegerProp).Append("\n"); - sb.Append(" NotRequiredNullableIntegerProp: ").Append(NotRequiredNullableIntegerProp).Append("\n"); - sb.Append(" NotRequiredNotnullableintegerProp: ").Append(NotRequiredNotnullableintegerProp).Append("\n"); + sb.Append(" NotRequiredNullableIntegerProp: "); + if (NotRequiredNullableIntegerProp.IsSet) + { + sb.Append(NotRequiredNullableIntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableintegerProp: "); + if (NotRequiredNotnullableintegerProp.IsSet) + { + sb.Append(NotRequiredNotnullableintegerProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableStringProp: ").Append(RequiredNullableStringProp).Append("\n"); sb.Append(" RequiredNotnullableStringProp: ").Append(RequiredNotnullableStringProp).Append("\n"); - sb.Append(" NotrequiredNullableStringProp: ").Append(NotrequiredNullableStringProp).Append("\n"); - sb.Append(" NotrequiredNotnullableStringProp: ").Append(NotrequiredNotnullableStringProp).Append("\n"); + sb.Append(" NotrequiredNullableStringProp: "); + if (NotrequiredNullableStringProp.IsSet) + { + sb.Append(NotrequiredNullableStringProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableStringProp: "); + if (NotrequiredNotnullableStringProp.IsSet) + { + sb.Append(NotrequiredNotnullableStringProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableBooleanProp: ").Append(RequiredNullableBooleanProp).Append("\n"); sb.Append(" RequiredNotnullableBooleanProp: ").Append(RequiredNotnullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNullableBooleanProp: ").Append(NotrequiredNullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNotnullableBooleanProp: ").Append(NotrequiredNotnullableBooleanProp).Append("\n"); + sb.Append(" NotrequiredNullableBooleanProp: "); + if (NotrequiredNullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNullableBooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableBooleanProp: "); + if (NotrequiredNotnullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNotnullableBooleanProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableDateProp: ").Append(RequiredNullableDateProp).Append("\n"); sb.Append(" RequiredNotNullableDateProp: ").Append(RequiredNotNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNullableDateProp: ").Append(NotRequiredNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNotnullableDateProp: ").Append(NotRequiredNotnullableDateProp).Append("\n"); + sb.Append(" NotRequiredNullableDateProp: "); + if (NotRequiredNullableDateProp.IsSet) + { + sb.Append(NotRequiredNullableDateProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableDateProp: "); + if (NotRequiredNotnullableDateProp.IsSet) + { + sb.Append(NotRequiredNotnullableDateProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableDatetimeProp: ").Append(RequiredNotnullableDatetimeProp).Append("\n"); sb.Append(" RequiredNullableDatetimeProp: ").Append(RequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNullableDatetimeProp: ").Append(NotrequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNotnullableDatetimeProp: ").Append(NotrequiredNotnullableDatetimeProp).Append("\n"); + sb.Append(" NotrequiredNullableDatetimeProp: "); + if (NotrequiredNullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNullableDatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableDatetimeProp: "); + if (NotrequiredNotnullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNotnullableDatetimeProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumInteger: ").Append(RequiredNullableEnumInteger).Append("\n"); sb.Append(" RequiredNotnullableEnumInteger: ").Append(RequiredNotnullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNullableEnumInteger: ").Append(NotrequiredNullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumInteger: ").Append(NotrequiredNotnullableEnumInteger).Append("\n"); + sb.Append(" NotrequiredNullableEnumInteger: "); + if (NotrequiredNullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNullableEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumInteger: "); + if (NotrequiredNotnullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNotnullableEnumInteger.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumIntegerOnly: ").Append(RequiredNullableEnumIntegerOnly).Append("\n"); sb.Append(" RequiredNotnullableEnumIntegerOnly: ").Append(RequiredNotnullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNullableEnumIntegerOnly: ").Append(NotrequiredNullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumIntegerOnly: ").Append(NotrequiredNotnullableEnumIntegerOnly).Append("\n"); + sb.Append(" NotrequiredNullableEnumIntegerOnly: "); + if (NotrequiredNullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNullableEnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumIntegerOnly: "); + if (NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNotnullableEnumIntegerOnly.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableEnumString: ").Append(RequiredNotnullableEnumString).Append("\n"); sb.Append(" RequiredNullableEnumString: ").Append(RequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNullableEnumString: ").Append(NotrequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumString: ").Append(NotrequiredNotnullableEnumString).Append("\n"); + sb.Append(" NotrequiredNullableEnumString: "); + if (NotrequiredNullableEnumString.IsSet) + { + sb.Append(NotrequiredNullableEnumString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumString: "); + if (NotrequiredNotnullableEnumString.IsSet) + { + sb.Append(NotrequiredNotnullableEnumString.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableOuterEnumDefaultValue: ").Append(RequiredNullableOuterEnumDefaultValue).Append("\n"); sb.Append(" RequiredNotnullableOuterEnumDefaultValue: ").Append(RequiredNotnullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNullableOuterEnumDefaultValue: ").Append(NotrequiredNullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: ").Append(NotrequiredNotnullableOuterEnumDefaultValue).Append("\n"); + sb.Append(" NotrequiredNullableOuterEnumDefaultValue: "); + if (NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: "); + if (NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNotnullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableUuid: ").Append(RequiredNullableUuid).Append("\n"); sb.Append(" RequiredNotnullableUuid: ").Append(RequiredNotnullableUuid).Append("\n"); - sb.Append(" NotrequiredNullableUuid: ").Append(NotrequiredNullableUuid).Append("\n"); - sb.Append(" NotrequiredNotnullableUuid: ").Append(NotrequiredNotnullableUuid).Append("\n"); + sb.Append(" NotrequiredNullableUuid: "); + if (NotrequiredNullableUuid.IsSet) + { + sb.Append(NotrequiredNullableUuid.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableUuid: "); + if (NotrequiredNotnullableUuid.IsSet) + { + sb.Append(NotrequiredNotnullableUuid.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableArrayOfString: ").Append(RequiredNullableArrayOfString).Append("\n"); sb.Append(" RequiredNotnullableArrayOfString: ").Append(RequiredNotnullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNullableArrayOfString: ").Append(NotrequiredNullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNotnullableArrayOfString: ").Append(NotrequiredNotnullableArrayOfString).Append("\n"); + sb.Append(" NotrequiredNullableArrayOfString: "); + if (NotrequiredNullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNullableArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableArrayOfString: "); + if (NotrequiredNotnullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNotnullableArrayOfString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Return.cs index 077005d6cc27..92d4864fc08d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Return.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" VarReturn: ").Append(VarReturn).Append("\n"); + sb.Append(" VarReturn: "); + if (VarReturn.IsSet) + { + sb.Append(VarReturn.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 53d7053be15e..dfe3ccc106d2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHash {\n"); - sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" RoleUuid: "); + if (RoleUuid.IsSet) + { + sb.Append(RoleUuid.Value); + } + sb.Append("\n"); + sb.Append(" Role: "); + if (Role.IsSet) + { + sb.Append(Role.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 177eddaba12d..a0a59f65eb4c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHashRole {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SpecialModelName.cs index 8778d6b6381c..ecec83488e3b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" VarSpecialModelName: ").Append(VarSpecialModelName).Append("\n"); + sb.Append(" SpecialPropertyName: "); + if (SpecialPropertyName.IsSet) + { + sb.Append(SpecialPropertyName.Value); + } + sb.Append("\n"); + sb.Append(" VarSpecialModelName: "); + if (VarSpecialModelName.IsSet) + { + sb.Append(VarSpecialModelName.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Tag.cs index 74c5d5104142..fda609b9c823 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Tag.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 72bd1b369aeb..56e0161283c7 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordList {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Value: "); + if (Value.IsSet) + { + sb.Append(Value.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 6e00826d7870..d8acb6ebf530 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordListObject {\n"); - sb.Append(" TestCollectionEndingWithWordList: ").Append(TestCollectionEndingWithWordList).Append("\n"); + sb.Append(" TestCollectionEndingWithWordList: "); + if (TestCollectionEndingWithWordList.IsSet) + { + sb.Append(TestCollectionEndingWithWordList.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index aca5c0652ab6..707fd66eca91 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n"); - sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n"); + sb.Append(" SomeProperty: "); + if (SomeProperty.IsSet) + { + sb.Append(SomeProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/User.cs index ed08e1b0126a..58b7bc977102 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/User.cs @@ -191,18 +191,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); - sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); - sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Username: "); + if (Username.IsSet) + { + sb.Append(Username.Value); + } + sb.Append("\n"); + sb.Append(" FirstName: "); + if (FirstName.IsSet) + { + sb.Append(FirstName.Value); + } + sb.Append("\n"); + sb.Append(" LastName: "); + if (LastName.IsSet) + { + sb.Append(LastName.Value); + } + sb.Append("\n"); + sb.Append(" Email: "); + if (Email.IsSet) + { + sb.Append(Email.Value); + } + sb.Append("\n"); + sb.Append(" Password: "); + if (Password.IsSet) + { + sb.Append(Password.Value); + } + sb.Append("\n"); + sb.Append(" Phone: "); + if (Phone.IsSet) + { + sb.Append(Phone.Value); + } + sb.Append("\n"); + sb.Append(" UserStatus: "); + if (UserStatus.IsSet) + { + sb.Append(UserStatus.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: "); + if (ObjectWithNoDeclaredProps.IsSet) + { + sb.Append(ObjectWithNoDeclaredProps.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: "); + if (ObjectWithNoDeclaredPropsNullable.IsSet) + { + sb.Append(ObjectWithNoDeclaredPropsNullable.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypeProp: "); + if (AnyTypeProp.IsSet) + { + sb.Append(AnyTypeProp.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypePropNullable: "); + if (AnyTypePropNullable.IsSet) + { + sb.Append(AnyTypePropNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Whale.cs index 2038fc78e8db..f5e1221d3806 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Whale.cs @@ -92,8 +92,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Whale {\n"); - sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n"); - sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n"); + sb.Append(" HasBaleen: "); + if (HasBaleen.IsSet) + { + sb.Append(HasBaleen.Value); + } + sb.Append("\n"); + sb.Append(" HasTeeth: "); + if (HasTeeth.IsSet) + { + sb.Append(HasTeeth.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Zebra.cs index 3bb224da1e43..6d906475d2e0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/Zebra.cs @@ -109,7 +109,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Zebra {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index daccbc984737..b98444329c5f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -82,7 +82,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ZeroBasedEnumClass {\n"); - sb.Append(" ZeroBasedEnum: ").Append(ZeroBasedEnum).Append("\n"); + sb.Append(" ZeroBasedEnum: "); + if (ZeroBasedEnum.IsSet) + { + sb.Append(ZeroBasedEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Activity.cs index c9d60a4c7266..42c7000ccda4 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Activity {\n"); - sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" ActivityOutputs: "); + if (ActivityOutputs.IsSet) + { + sb.Append(ActivityOutputs.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index ed52d7cd954f..c05b976e1854 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -74,8 +74,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ActivityOutputElementRepresentation {\n"); - sb.Append(" Prop1: ").Append(Prop1).Append("\n"); - sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" Prop1: "); + if (Prop1.IsSet) + { + sb.Append(Prop1.Value); + } + sb.Append("\n"); + sb.Append(" Prop2: "); + if (Prop2.IsSet) + { + sb.Append(Prop2.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index b75020ce3a95..172238c4e7cd 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -148,14 +148,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); - sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" MapProperty: "); + if (MapProperty.IsSet) + { + sb.Append(MapProperty.Value); + } + sb.Append("\n"); + sb.Append(" MapOfMapProperty: "); + if (MapOfMapProperty.IsSet) + { + sb.Append(MapOfMapProperty.Value); + } + sb.Append("\n"); + sb.Append(" Anytype1: "); + if (Anytype1.IsSet) + { + sb.Append(Anytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype1: "); + if (MapWithUndeclaredPropertiesAnytype1.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype2: "); + if (MapWithUndeclaredPropertiesAnytype2.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype2.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype3: "); + if (MapWithUndeclaredPropertiesAnytype3.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype3.Value); + } + sb.Append("\n"); + sb.Append(" EmptyMap: "); + if (EmptyMap.IsSet) + { + sb.Append(EmptyMap.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesString: "); + if (MapWithUndeclaredPropertiesString.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesString.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 530b038fc5d3..d0c98f8614c8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -84,7 +84,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Animal {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index baa080590617..7e9191138db0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -82,9 +82,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Code: "); + if (Code.IsSet) + { + sb.Append(Code.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" Message: "); + if (Message.IsSet) + { + sb.Append(Message.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Apple.cs index f6ef7f0c83be..a193d0b0a1f6 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -87,9 +87,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Apple {\n"); - sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" ColorCode: ").Append(ColorCode).Append("\n"); + sb.Append(" Cultivar: "); + if (Cultivar.IsSet) + { + sb.Append(Cultivar.Value); + } + sb.Append("\n"); + sb.Append(" Origin: "); + if (Origin.IsSet) + { + sb.Append(Origin.Value); + } + sb.Append("\n"); + sb.Append(" ColorCode: "); + if (ColorCode.IsSet) + { + sb.Append(ColorCode.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index f2a1e63e3787..ff277fb9035d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -75,7 +75,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class AppleReq {\n"); sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Mealy: ").Append(Mealy).Append("\n"); + sb.Append(" Mealy: "); + if (Mealy.IsSet) + { + sb.Append(Mealy.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 019abff2315d..eb3df2bbe469 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); + sb.Append(" ArrayArrayNumber: "); + if (ArrayArrayNumber.IsSet) + { + sb.Append(ArrayArrayNumber.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 2c6d83326d59..9758ba4a5cb2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); + sb.Append(" ArrayNumber: "); + if (ArrayNumber.IsSet) + { + sb.Append(ArrayNumber.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 39a676451be3..45db1a0f7c10 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -87,9 +87,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: "); + if (ArrayOfString.IsSet) + { + sb.Append(ArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfInteger: "); + if (ArrayArrayOfInteger.IsSet) + { + sb.Append(ArrayArrayOfInteger.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfModel: "); + if (ArrayArrayOfModel.IsSet) + { + sb.Append(ArrayArrayOfModel.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 23312279bb53..b490eb3112a6 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -56,7 +56,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Banana {\n"); - sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" LengthCm: "); + if (LengthCm.IsSet) + { + sb.Append(LengthCm.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 02703e4025a9..fc7c797ede4f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -70,7 +70,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class BananaReq {\n"); sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); - sb.Append(" Sweet: ").Append(Sweet).Append("\n"); + sb.Append(" Sweet: "); + if (Sweet.IsSet) + { + sb.Append(Sweet.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index e4f6b853608e..c86bcffcec5e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -127,12 +127,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: "); + if (SmallCamel.IsSet) + { + sb.Append(SmallCamel.Value); + } + sb.Append("\n"); + sb.Append(" CapitalCamel: "); + if (CapitalCamel.IsSet) + { + sb.Append(CapitalCamel.Value); + } + sb.Append("\n"); + sb.Append(" SmallSnake: "); + if (SmallSnake.IsSet) + { + sb.Append(SmallSnake.Value); + } + sb.Append("\n"); + sb.Append(" CapitalSnake: "); + if (CapitalSnake.IsSet) + { + sb.Append(CapitalSnake.Value); + } + sb.Append("\n"); + sb.Append(" SCAETHFlowPoints: "); + if (SCAETHFlowPoints.IsSet) + { + sb.Append(SCAETHFlowPoints.Value); + } + sb.Append("\n"); + sb.Append(" ATT_NAME: "); + if (ATT_NAME.IsSet) + { + sb.Append(ATT_NAME.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Cat.cs index 13f0b663ed5b..d386ba4a2c8c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -66,7 +66,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" Declawed: "); + if (Declawed.IsSet) + { + sb.Append(Declawed.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Category.cs index 090e15895cd6..9a8a92ffde72 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -74,7 +74,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index 8a4720b7e594..766c4be3b8c1 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -90,7 +90,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" PetType: ").Append(PetType).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index fc5fbae9d301..1691e794f031 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 32273a046352..ca0eca621807 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -62,7 +62,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DateOnlyClass {\n"); - sb.Append(" DateOnlyProperty: ").Append(DateOnlyProperty).Append("\n"); + sb.Append(" DateOnlyProperty: "); + if (DateOnlyProperty.IsSet) + { + sb.Append(DateOnlyProperty.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index aae722092d42..fd3737b41d5b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DeprecatedObject {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 3d3896f075cc..6d0954881b01 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -71,7 +71,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" Breed: "); + if (Breed.IsSet) + { + sb.Append(Breed.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 64341b1a550e..aa23b74d5191 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -97,10 +97,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Drawing {\n"); - sb.Append(" MainShape: ").Append(MainShape).Append("\n"); - sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); - sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" MainShape: "); + if (MainShape.IsSet) + { + sb.Append(MainShape.Value); + } + sb.Append("\n"); + sb.Append(" ShapeOrNull: "); + if (ShapeOrNull.IsSet) + { + sb.Append(ShapeOrNull.Value); + } + sb.Append("\n"); + sb.Append(" NullableShape: "); + if (NullableShape.IsSet) + { + sb.Append(NullableShape.Value); + } + sb.Append("\n"); + sb.Append(" Shapes: "); + if (Shapes.IsSet) + { + sb.Append(Shapes.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index cb1a96d6a521..d72fec761294 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -107,8 +107,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: "); + if (JustSymbol.IsSet) + { + sb.Append(JustSymbol.Value); + } + sb.Append("\n"); + sb.Append(" ArrayEnum: "); + if (ArrayEnum.IsSet) + { + sb.Append(ArrayEnum.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 0af565a2f7ba..268fd7ee4ba2 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -286,15 +286,55 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumString: "); + if (EnumString.IsSet) + { + sb.Append(EnumString.Value); + } + sb.Append("\n"); sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); - sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); - sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" EnumInteger: "); + if (EnumInteger.IsSet) + { + sb.Append(EnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" EnumIntegerOnly: "); + if (EnumIntegerOnly.IsSet) + { + sb.Append(EnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" EnumNumber: "); + if (EnumNumber.IsSet) + { + sb.Append(EnumNumber.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnum: "); + if (OuterEnum.IsSet) + { + sb.Append(OuterEnum.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumInteger: "); + if (OuterEnumInteger.IsSet) + { + sb.Append(OuterEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumDefaultValue: "); + if (OuterEnumDefaultValue.IsSet) + { + sb.Append(OuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumIntegerDefaultValue: "); + if (OuterEnumIntegerDefaultValue.IsSet) + { + sb.Append(OuterEnumIntegerDefaultValue.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/File.cs index f3cf799aa9cf..d0c7e1cb269b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -62,7 +62,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); + sb.Append(" SourceURI: "); + if (SourceURI.IsSet) + { + sb.Append(SourceURI.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 51c68a0598ba..797749570d8b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -74,8 +74,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" File: "); + if (File.IsSet) + { + sb.Append(File.Value); + } + sb.Append("\n"); + sb.Append(" Files: "); + if (Files.IsSet) + { + sb.Append(Files.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Foo.cs index a72dc75ea28f..4dc4ea8ad542 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Foo {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index f4f7c693f9a9..23458b09f376 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index aae79f514e45..f74f20e10a49 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -261,25 +261,100 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); - sb.Append(" Int32: ").Append(Int32).Append("\n"); - sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n"); - sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n"); + sb.Append(" Integer: "); + if (Integer.IsSet) + { + sb.Append(Integer.Value); + } + sb.Append("\n"); + sb.Append(" Int32: "); + if (Int32.IsSet) + { + sb.Append(Int32.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedInteger: "); + if (UnsignedInteger.IsSet) + { + sb.Append(UnsignedInteger.Value); + } + sb.Append("\n"); + sb.Append(" Int64: "); + if (Int64.IsSet) + { + sb.Append(Int64.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedLong: "); + if (UnsignedLong.IsSet) + { + sb.Append(UnsignedLong.Value); + } + sb.Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" Float: "); + if (Float.IsSet) + { + sb.Append(Float.Value); + } + sb.Append("\n"); + sb.Append(" Double: "); + if (Double.IsSet) + { + sb.Append(Double.Value); + } + sb.Append("\n"); + sb.Append(" Decimal: "); + if (Decimal.IsSet) + { + sb.Append(Decimal.Value); + } + sb.Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Binary: "); + if (Binary.IsSet) + { + sb.Append(Binary.Value); + } + sb.Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); - sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); - sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n"); + sb.Append(" PatternWithDigits: "); + if (PatternWithDigits.IsSet) + { + sb.Append(PatternWithDigits.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithDigitsAndDelimiter: "); + if (PatternWithDigitsAndDelimiter.IsSet) + { + sb.Append(PatternWithDigitsAndDelimiter.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithBackslash: "); + if (PatternWithBackslash.IsSet) + { + sb.Append(PatternWithBackslash.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 14f697589f46..621afaf98995 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -77,8 +77,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Foo: "); + if (Foo.IsSet) + { + sb.Append(Foo.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 44ab456f84bd..edf61cd812db 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -56,7 +56,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HealthCheckResult {\n"); - sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); + sb.Append(" NullableMessage: "); + if (NullableMessage.IsSet) + { + sb.Append(NullableMessage.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/List.cs index 05353b9964ce..e83c96c94c14 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class List {\n"); - sb.Append(" Var123List: ").Append(Var123List).Append("\n"); + sb.Append(" Var123List: "); + if (Var123List.IsSet) + { + sb.Append(Var123List.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index d51d21a8e290..fcc09feb691b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -74,8 +74,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LiteralStringClass {\n"); - sb.Append(" EscapedLiteralString: ").Append(EscapedLiteralString).Append("\n"); - sb.Append(" UnescapedLiteralString: ").Append(UnescapedLiteralString).Append("\n"); + sb.Append(" EscapedLiteralString: "); + if (EscapedLiteralString.IsSet) + { + sb.Append(EscapedLiteralString.Value); + } + sb.Append("\n"); + sb.Append(" UnescapedLiteralString: "); + if (UnescapedLiteralString.IsSet) + { + sb.Append(UnescapedLiteralString.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 25250fc25d1b..41c8be7a6ec5 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -119,10 +119,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: "); + if (MapMapOfString.IsSet) + { + sb.Append(MapMapOfString.Value); + } + sb.Append("\n"); + sb.Append(" MapOfEnumString: "); + if (MapOfEnumString.IsSet) + { + sb.Append(MapOfEnumString.Value); + } + sb.Append("\n"); + sb.Append(" DirectMap: "); + if (DirectMap.IsSet) + { + sb.Append(DirectMap.Value); + } + sb.Append("\n"); + sb.Append(" IndirectMap: "); + if (IndirectMap.IsSet) + { + sb.Append(IndirectMap.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs index 75a759090ebd..e64535568f30 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs @@ -441,35 +441,155 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); + sb.Append(" ShopId: "); + if (ShopId.IsSet) + { + sb.Append(ShopId.Value); + } + sb.Append("\n"); + sb.Append(" TotalPrice: "); + if (TotalPrice.IsSet) + { + sb.Append(TotalPrice.Value); + } + sb.Append("\n"); sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); + sb.Append(" SomeCode: "); + if (SomeCode.IsSet) + { + sb.Append(SomeCode.Value); + } + sb.Append("\n"); + sb.Append(" BatchNumber: "); + if (BatchNumber.IsSet) + { + sb.Append(BatchNumber.Value); + } + sb.Append("\n"); + sb.Append(" BrandCode: "); + if (BrandCode.IsSet) + { + sb.Append(BrandCode.Value); + } + sb.Append("\n"); + sb.Append(" BrandId: "); + if (BrandId.IsSet) + { + sb.Append(BrandId.Value); + } + sb.Append("\n"); + sb.Append(" BrandName: "); + if (BrandName.IsSet) + { + sb.Append(BrandName.Value); + } + sb.Append("\n"); + sb.Append(" CategoryCode: "); + if (CategoryCode.IsSet) + { + sb.Append(CategoryCode.Value); + } + sb.Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); + sb.Append(" ColorDescription: "); + if (ColorDescription.IsSet) + { + sb.Append(ColorDescription.Value); + } + sb.Append("\n"); + sb.Append(" Comment: "); + if (Comment.IsSet) + { + sb.Append(Comment.Value); + } + sb.Append("\n"); + sb.Append(" CommercialProductCode: "); + if (CommercialProductCode.IsSet) + { + sb.Append(CommercialProductCode.Value); + } + sb.Append("\n"); + sb.Append(" ProductLineCode: "); + if (ProductLineCode.IsSet) + { + sb.Append(ProductLineCode.Value); + } + sb.Append("\n"); + sb.Append(" Country: "); + if (Country.IsSet) + { + sb.Append(Country.Value); + } + sb.Append("\n"); + sb.Append(" CreatedBy: "); + if (CreatedBy.IsSet) + { + sb.Append(CreatedBy.Value); + } + sb.Append("\n"); + sb.Append(" CreatedByFirstName: "); + if (CreatedByFirstName.IsSet) + { + sb.Append(CreatedByFirstName.Value); + } + sb.Append("\n"); + sb.Append(" CreatedByLastName: "); + if (CreatedByLastName.IsSet) + { + sb.Append(CreatedByLastName.Value); + } + sb.Append("\n"); + sb.Append(" DeltaECalculationRepaired: "); + if (DeltaECalculationRepaired.IsSet) + { + sb.Append(DeltaECalculationRepaired.Value); + } + sb.Append("\n"); + sb.Append(" DeltaECalculationSprayout: "); + if (DeltaECalculationSprayout.IsSet) + { + sb.Append(DeltaECalculationSprayout.Value); + } + sb.Append("\n"); + sb.Append(" OwnColorVariantNumber: "); + if (OwnColorVariantNumber.IsSet) + { + sb.Append(OwnColorVariantNumber.Value); + } + sb.Append("\n"); + sb.Append(" PrimerProductId: "); + if (PrimerProductId.IsSet) + { + sb.Append(PrimerProductId.Value); + } + sb.Append("\n"); + sb.Append(" ProductId: "); + if (ProductId.IsSet) + { + sb.Append(ProductId.Value); + } + sb.Append("\n"); + sb.Append(" ProductName: "); + if (ProductName.IsSet) + { + sb.Append(ProductName.Value); + } + sb.Append("\n"); + sb.Append(" SelectedVersionIndex: "); + if (SelectedVersionIndex.IsSet) + { + sb.Append(SelectedVersionIndex.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 69f4132e1b3f..8f24238efe92 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedAnyOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index 0b03bcb3b2c8..b5dd0a6d5d30 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedOneOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 454c65dd1370..4df16acda293 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -100,10 +100,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" UuidWithPattern: ").Append(UuidWithPattern).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" UuidWithPattern: "); + if (UuidWithPattern.IsSet) + { + sb.Append(UuidWithPattern.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Map: "); + if (Map.IsSet) + { + sb.Append(Map.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 204e9f8219b9..7370283963c0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedSubId {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index 719535215fd9..0d9f77d8c6c1 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -69,8 +69,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 6efceb27026f..d7d30aca4e9a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" VarClient: "); + if (VarClient.IsSet) + { + sb.Append(VarClient.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Name.cs index a3419acd2d28..74cdee3b7636 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -103,9 +103,24 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" VarName: ").Append(VarName).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" Var123Number: ").Append(Var123Number).Append("\n"); + sb.Append(" SnakeCase: "); + if (SnakeCase.IsSet) + { + sb.Append(SnakeCase.Value); + } + sb.Append("\n"); + sb.Append(" Property: "); + if (Property.IsSet) + { + sb.Append(Property.Value); + } + sb.Append("\n"); + sb.Append(" Var123Number: "); + if (Var123Number.IsSet) + { + sb.Append(Var123Number.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 7d1a62b2dc89..76d00fe41996 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -161,18 +161,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); - sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); - sb.Append(" DateProp: ").Append(DateProp).Append("\n"); - sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); - sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" IntegerProp: "); + if (IntegerProp.IsSet) + { + sb.Append(IntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NumberProp: "); + if (NumberProp.IsSet) + { + sb.Append(NumberProp.Value); + } + sb.Append("\n"); + sb.Append(" BooleanProp: "); + if (BooleanProp.IsSet) + { + sb.Append(BooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" StringProp: "); + if (StringProp.IsSet) + { + sb.Append(StringProp.Value); + } + sb.Append("\n"); + sb.Append(" DateProp: "); + if (DateProp.IsSet) + { + sb.Append(DateProp.Value); + } + sb.Append("\n"); + sb.Append(" DatetimeProp: "); + if (DatetimeProp.IsSet) + { + sb.Append(DatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayNullableProp: "); + if (ArrayNullableProp.IsSet) + { + sb.Append(ArrayNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: "); + if (ArrayAndItemsNullableProp.IsSet) + { + sb.Append(ArrayAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayItemsNullable: "); + if (ArrayItemsNullable.IsSet) + { + sb.Append(ArrayItemsNullable.Value); + } + sb.Append("\n"); + sb.Append(" ObjectNullableProp: "); + if (ObjectNullableProp.IsSet) + { + sb.Append(ObjectNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectAndItemsNullableProp: "); + if (ObjectAndItemsNullableProp.IsSet) + { + sb.Append(ObjectAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectItemsNullable: "); + if (ObjectItemsNullable.IsSet) + { + sb.Append(ObjectItemsNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 696049a0be88..7d5af79d6c3b 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -57,7 +57,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableGuidClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index b38e0d06ec9b..ade36b935c43 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); + sb.Append(" JustNumber: "); + if (JustNumber.IsSet) + { + sb.Append(JustNumber.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index ef60e6dfaaf7..ecf7b7c878fa 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -98,10 +98,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); - sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" DeprecatedRef: "); + if (DeprecatedRef.IsSet) + { + sb.Append(DeprecatedRef.Value); + } + sb.Append("\n"); + sb.Append(" Bars: "); + if (Bars.IsSet) + { + sb.Append(Bars.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Order.cs index 54b990af2ea2..196b15b73e45 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -129,12 +129,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" PetId: "); + if (PetId.IsSet) + { + sb.Append(PetId.Value); + } + sb.Append("\n"); + sb.Append(" Quantity: "); + if (Quantity.IsSet) + { + sb.Append(Quantity.Value); + } + sb.Append("\n"); + sb.Append(" ShipDate: "); + if (ShipDate.IsSet) + { + sb.Append(ShipDate.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); + sb.Append(" Complete: "); + if (Complete.IsSet) + { + sb.Append(Complete.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 2262a390c4db..078c559d89c3 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -77,9 +77,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append(" MyNumber: "); + if (MyNumber.IsSet) + { + sb.Append(MyNumber.Value); + } + sb.Append("\n"); + sb.Append(" MyString: "); + if (MyString.IsSet) + { + sb.Append(MyString.Value); + } + sb.Append("\n"); + sb.Append(" MyBoolean: "); + if (MyBoolean.IsSet) + { + sb.Append(MyBoolean.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pet.cs index 6780e015ab16..87a31bbee03d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -149,12 +149,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 2f21ea1cf97c..c05a4ae7bed5 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -75,8 +75,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Baz: "); + if (Baz.IsSet) + { + sb.Append(Baz.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 2c65037e3bb0..b0c4cf6fafd3 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -809,48 +809,158 @@ public override string ToString() sb.Append("class RequiredClass {\n"); sb.Append(" RequiredNullableIntegerProp: ").Append(RequiredNullableIntegerProp).Append("\n"); sb.Append(" RequiredNotnullableintegerProp: ").Append(RequiredNotnullableintegerProp).Append("\n"); - sb.Append(" NotRequiredNullableIntegerProp: ").Append(NotRequiredNullableIntegerProp).Append("\n"); - sb.Append(" NotRequiredNotnullableintegerProp: ").Append(NotRequiredNotnullableintegerProp).Append("\n"); + sb.Append(" NotRequiredNullableIntegerProp: "); + if (NotRequiredNullableIntegerProp.IsSet) + { + sb.Append(NotRequiredNullableIntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableintegerProp: "); + if (NotRequiredNotnullableintegerProp.IsSet) + { + sb.Append(NotRequiredNotnullableintegerProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableStringProp: ").Append(RequiredNullableStringProp).Append("\n"); sb.Append(" RequiredNotnullableStringProp: ").Append(RequiredNotnullableStringProp).Append("\n"); - sb.Append(" NotrequiredNullableStringProp: ").Append(NotrequiredNullableStringProp).Append("\n"); - sb.Append(" NotrequiredNotnullableStringProp: ").Append(NotrequiredNotnullableStringProp).Append("\n"); + sb.Append(" NotrequiredNullableStringProp: "); + if (NotrequiredNullableStringProp.IsSet) + { + sb.Append(NotrequiredNullableStringProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableStringProp: "); + if (NotrequiredNotnullableStringProp.IsSet) + { + sb.Append(NotrequiredNotnullableStringProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableBooleanProp: ").Append(RequiredNullableBooleanProp).Append("\n"); sb.Append(" RequiredNotnullableBooleanProp: ").Append(RequiredNotnullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNullableBooleanProp: ").Append(NotrequiredNullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNotnullableBooleanProp: ").Append(NotrequiredNotnullableBooleanProp).Append("\n"); + sb.Append(" NotrequiredNullableBooleanProp: "); + if (NotrequiredNullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNullableBooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableBooleanProp: "); + if (NotrequiredNotnullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNotnullableBooleanProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableDateProp: ").Append(RequiredNullableDateProp).Append("\n"); sb.Append(" RequiredNotNullableDateProp: ").Append(RequiredNotNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNullableDateProp: ").Append(NotRequiredNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNotnullableDateProp: ").Append(NotRequiredNotnullableDateProp).Append("\n"); + sb.Append(" NotRequiredNullableDateProp: "); + if (NotRequiredNullableDateProp.IsSet) + { + sb.Append(NotRequiredNullableDateProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableDateProp: "); + if (NotRequiredNotnullableDateProp.IsSet) + { + sb.Append(NotRequiredNotnullableDateProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableDatetimeProp: ").Append(RequiredNotnullableDatetimeProp).Append("\n"); sb.Append(" RequiredNullableDatetimeProp: ").Append(RequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNullableDatetimeProp: ").Append(NotrequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNotnullableDatetimeProp: ").Append(NotrequiredNotnullableDatetimeProp).Append("\n"); + sb.Append(" NotrequiredNullableDatetimeProp: "); + if (NotrequiredNullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNullableDatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableDatetimeProp: "); + if (NotrequiredNotnullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNotnullableDatetimeProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumInteger: ").Append(RequiredNullableEnumInteger).Append("\n"); sb.Append(" RequiredNotnullableEnumInteger: ").Append(RequiredNotnullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNullableEnumInteger: ").Append(NotrequiredNullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumInteger: ").Append(NotrequiredNotnullableEnumInteger).Append("\n"); + sb.Append(" NotrequiredNullableEnumInteger: "); + if (NotrequiredNullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNullableEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumInteger: "); + if (NotrequiredNotnullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNotnullableEnumInteger.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumIntegerOnly: ").Append(RequiredNullableEnumIntegerOnly).Append("\n"); sb.Append(" RequiredNotnullableEnumIntegerOnly: ").Append(RequiredNotnullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNullableEnumIntegerOnly: ").Append(NotrequiredNullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumIntegerOnly: ").Append(NotrequiredNotnullableEnumIntegerOnly).Append("\n"); + sb.Append(" NotrequiredNullableEnumIntegerOnly: "); + if (NotrequiredNullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNullableEnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumIntegerOnly: "); + if (NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNotnullableEnumIntegerOnly.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableEnumString: ").Append(RequiredNotnullableEnumString).Append("\n"); sb.Append(" RequiredNullableEnumString: ").Append(RequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNullableEnumString: ").Append(NotrequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumString: ").Append(NotrequiredNotnullableEnumString).Append("\n"); + sb.Append(" NotrequiredNullableEnumString: "); + if (NotrequiredNullableEnumString.IsSet) + { + sb.Append(NotrequiredNullableEnumString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumString: "); + if (NotrequiredNotnullableEnumString.IsSet) + { + sb.Append(NotrequiredNotnullableEnumString.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableOuterEnumDefaultValue: ").Append(RequiredNullableOuterEnumDefaultValue).Append("\n"); sb.Append(" RequiredNotnullableOuterEnumDefaultValue: ").Append(RequiredNotnullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNullableOuterEnumDefaultValue: ").Append(NotrequiredNullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: ").Append(NotrequiredNotnullableOuterEnumDefaultValue).Append("\n"); + sb.Append(" NotrequiredNullableOuterEnumDefaultValue: "); + if (NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: "); + if (NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNotnullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableUuid: ").Append(RequiredNullableUuid).Append("\n"); sb.Append(" RequiredNotnullableUuid: ").Append(RequiredNotnullableUuid).Append("\n"); - sb.Append(" NotrequiredNullableUuid: ").Append(NotrequiredNullableUuid).Append("\n"); - sb.Append(" NotrequiredNotnullableUuid: ").Append(NotrequiredNotnullableUuid).Append("\n"); + sb.Append(" NotrequiredNullableUuid: "); + if (NotrequiredNullableUuid.IsSet) + { + sb.Append(NotrequiredNullableUuid.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableUuid: "); + if (NotrequiredNotnullableUuid.IsSet) + { + sb.Append(NotrequiredNotnullableUuid.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableArrayOfString: ").Append(RequiredNullableArrayOfString).Append("\n"); sb.Append(" RequiredNotnullableArrayOfString: ").Append(RequiredNotnullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNullableArrayOfString: ").Append(NotrequiredNullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNotnullableArrayOfString: ").Append(NotrequiredNotnullableArrayOfString).Append("\n"); + sb.Append(" NotrequiredNullableArrayOfString: "); + if (NotrequiredNullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNullableArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableArrayOfString: "); + if (NotrequiredNotnullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNotnullableArrayOfString.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Return.cs index cbf686078763..94011bc13b9d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -95,10 +95,20 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" VarReturn: ").Append(VarReturn).Append("\n"); + sb.Append(" VarReturn: "); + if (VarReturn.IsSet) + { + sb.Append(VarReturn.Value); + } + sb.Append("\n"); sb.Append(" Lock: ").Append(Lock).Append("\n"); sb.Append(" Abstract: ").Append(Abstract).Append("\n"); - sb.Append(" Unsafe: ").Append(Unsafe).Append("\n"); + sb.Append(" Unsafe: "); + if (Unsafe.IsSet) + { + sb.Append(Unsafe.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index e7eed444a036..2eae11ae1d68 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -74,8 +74,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHash {\n"); - sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" RoleUuid: "); + if (RoleUuid.IsSet) + { + sb.Append(RoleUuid.Value); + } + sb.Append("\n"); + sb.Append(" Role: "); + if (Role.IsSet) + { + sb.Append(Role.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 7e6805979842..f5bebd8f835e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHashRole {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 1f75838d669c..00106e1470a5 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -69,8 +69,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" VarSpecialModelName: ").Append(VarSpecialModelName).Append("\n"); + sb.Append(" SpecialPropertyName: "); + if (SpecialPropertyName.IsSet) + { + sb.Append(SpecialPropertyName.Value); + } + sb.Append("\n"); + sb.Append(" VarSpecialModelName: "); + if (VarSpecialModelName.IsSet) + { + sb.Append(VarSpecialModelName.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 7f796bee5c3b..9bb7915108b9 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -69,8 +69,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index ebba0ebde762..f693d75d2c81 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordList {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Value: "); + if (Value.IsSet) + { + sb.Append(Value.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 1630e5b0a4b6..10d5fd9c1398 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordListObject {\n"); - sb.Append(" TestCollectionEndingWithWordList: ").Append(TestCollectionEndingWithWordList).Append("\n"); + sb.Append(" TestCollectionEndingWithWordList: "); + if (TestCollectionEndingWithWordList.IsSet) + { + sb.Append(TestCollectionEndingWithWordList.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index aca5c0652ab6..707fd66eca91 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n"); - sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n"); + sb.Append(" SomeProperty: "); + if (SomeProperty.IsSet) + { + sb.Append(SomeProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/User.cs index 5cff082be9b4..af7697c34509 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -184,18 +184,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); - sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); - sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Username: "); + if (Username.IsSet) + { + sb.Append(Username.Value); + } + sb.Append("\n"); + sb.Append(" FirstName: "); + if (FirstName.IsSet) + { + sb.Append(FirstName.Value); + } + sb.Append("\n"); + sb.Append(" LastName: "); + if (LastName.IsSet) + { + sb.Append(LastName.Value); + } + sb.Append("\n"); + sb.Append(" Email: "); + if (Email.IsSet) + { + sb.Append(Email.Value); + } + sb.Append("\n"); + sb.Append(" Password: "); + if (Password.IsSet) + { + sb.Append(Password.Value); + } + sb.Append("\n"); + sb.Append(" Phone: "); + if (Phone.IsSet) + { + sb.Append(Phone.Value); + } + sb.Append("\n"); + sb.Append(" UserStatus: "); + if (UserStatus.IsSet) + { + sb.Append(UserStatus.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: "); + if (ObjectWithNoDeclaredProps.IsSet) + { + sb.Append(ObjectWithNoDeclaredProps.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: "); + if (ObjectWithNoDeclaredPropsNullable.IsSet) + { + sb.Append(ObjectWithNoDeclaredPropsNullable.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypeProp: "); + if (AnyTypeProp.IsSet) + { + sb.Append(AnyTypeProp.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypePropNullable: "); + if (AnyTypePropNullable.IsSet) + { + sb.Append(AnyTypePropNullable.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Whale.cs index eb211e70956f..d033fa0a010f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -82,8 +82,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Whale {\n"); - sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n"); - sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n"); + sb.Append(" HasBaleen: "); + if (HasBaleen.IsSet) + { + sb.Append(HasBaleen.Value); + } + sb.Append("\n"); + sb.Append(" HasTeeth: "); + if (HasTeeth.IsSet) + { + sb.Append(HasTeeth.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 3bb224da1e43..6d906475d2e0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -109,7 +109,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Zebra {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 1e7a142d4114..2866c7679392 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -75,7 +75,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ZeroBasedEnumClass {\n"); - sb.Append(" ZeroBasedEnum: ").Append(ZeroBasedEnum).Append("\n"); + sb.Append(" ZeroBasedEnum: "); + if (ZeroBasedEnum.IsSet) + { + sb.Append(ZeroBasedEnum.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs index beeaf4cf4508..fb7b98353579 100644 --- a/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs +++ b/samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs @@ -74,8 +74,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NowGet200Response {\n"); - sb.Append(" Today: ").Append(Today).Append("\n"); - sb.Append(" Now: ").Append(Now).Append("\n"); + sb.Append(" Today: "); + if (Today.IsSet) + { + sb.Append(Today.Value); + } + sb.Append("\n"); + sb.Append(" Now: "); + if (Now.IsSet) + { + sb.Append(Now.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs index 9e982dd62c66..3f5be8388055 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Activity {\n"); - sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" ActivityOutputs: "); + if (ActivityOutputs.IsSet) + { + sb.Append(ActivityOutputs.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index aecf7233da24..0d755f543c2e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -125,8 +125,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ActivityOutputElementRepresentation {\n"); - sb.Append(" Prop1: ").Append(Prop1).Append("\n"); - sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" Prop1: "); + if (Prop1.IsSet) + { + sb.Append(Prop1.Value); + } + sb.Append("\n"); + sb.Append(" Prop2: "); + if (Prop2.IsSet) + { + sb.Append(Prop2.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index d7d43405bc66..7f77440269e2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -331,14 +331,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); - sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" MapProperty: "); + if (MapProperty.IsSet) + { + sb.Append(MapProperty.Value); + } + sb.Append("\n"); + sb.Append(" MapOfMapProperty: "); + if (MapOfMapProperty.IsSet) + { + sb.Append(MapOfMapProperty.Value); + } + sb.Append("\n"); + sb.Append(" Anytype1: "); + if (Anytype1.IsSet) + { + sb.Append(Anytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype1: "); + if (MapWithUndeclaredPropertiesAnytype1.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype2: "); + if (MapWithUndeclaredPropertiesAnytype2.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype2.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype3: "); + if (MapWithUndeclaredPropertiesAnytype3.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype3.Value); + } + sb.Append("\n"); + sb.Append(" EmptyMap: "); + if (EmptyMap.IsSet) + { + sb.Append(EmptyMap.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesString: "); + if (MapWithUndeclaredPropertiesString.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs index 27995fdaa9bc..18d0f13bf626 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs @@ -131,7 +131,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Animal {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs index 2dbf0d031b4a..448663c33adb 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -155,9 +155,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Code: "); + if (Code.IsSet) + { + sb.Append(Code.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" Message: "); + if (Message.IsSet) + { + sb.Append(Message.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs index f1f7f5569e88..85337f9e2326 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs @@ -160,9 +160,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Apple {\n"); - sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" ColorCode: ").Append(ColorCode).Append("\n"); + sb.Append(" Cultivar: "); + if (Cultivar.IsSet) + { + sb.Append(Cultivar.Value); + } + sb.Append("\n"); + sb.Append(" Origin: "); + if (Origin.IsSet) + { + sb.Append(Origin.Value); + } + sb.Append("\n"); + sb.Append(" ColorCode: "); + if (ColorCode.IsSet) + { + sb.Append(ColorCode.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs index 1c459e2284a2..ab51eec6da05 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs @@ -116,7 +116,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class AppleReq {\n"); sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Mealy: ").Append(Mealy).Append("\n"); + sb.Append(" Mealy: "); + if (Mealy.IsSet) + { + sb.Append(Mealy.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 6b2a7bca8d2e..689785979682 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); + sb.Append(" ArrayArrayNumber: "); + if (ArrayArrayNumber.IsSet) + { + sb.Append(ArrayArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index b7645c3c34fd..9c7b558cf042 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); + sb.Append(" ArrayNumber: "); + if (ArrayNumber.IsSet) + { + sb.Append(ArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs index b528432c25ab..404158453e99 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -160,9 +160,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: "); + if (ArrayOfString.IsSet) + { + sb.Append(ArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfInteger: "); + if (ArrayArrayOfInteger.IsSet) + { + sb.Append(ArrayArrayOfInteger.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfModel: "); + if (ArrayArrayOfModel.IsSet) + { + sb.Append(ArrayArrayOfModel.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs index 0eb59d76cd53..10860909f946 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs @@ -85,7 +85,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Banana {\n"); - sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" LengthCm: "); + if (LengthCm.IsSet) + { + sb.Append(LengthCm.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs index 5ec5e90170fe..f7307c95b81a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs @@ -111,7 +111,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class BananaReq {\n"); sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); - sb.Append(" Sweet: ").Append(Sweet).Append("\n"); + sb.Append(" Sweet: "); + if (Sweet.IsSet) + { + sb.Append(Sweet.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs index c72cba693df0..23d296eed45f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs @@ -266,12 +266,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: "); + if (SmallCamel.IsSet) + { + sb.Append(SmallCamel.Value); + } + sb.Append("\n"); + sb.Append(" CapitalCamel: "); + if (CapitalCamel.IsSet) + { + sb.Append(CapitalCamel.Value); + } + sb.Append("\n"); + sb.Append(" SmallSnake: "); + if (SmallSnake.IsSet) + { + sb.Append(SmallSnake.Value); + } + sb.Append("\n"); + sb.Append(" CapitalSnake: "); + if (CapitalSnake.IsSet) + { + sb.Append(CapitalSnake.Value); + } + sb.Append("\n"); + sb.Append(" SCAETHFlowPoints: "); + if (SCAETHFlowPoints.IsSet) + { + sb.Append(SCAETHFlowPoints.Value); + } + sb.Append("\n"); + sb.Append(" ATT_NAME: "); + if (ATT_NAME.IsSet) + { + sb.Append(ATT_NAME.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs index dbbd9dfdaffc..0321444650b9 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs @@ -98,7 +98,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" Declawed: "); + if (Declawed.IsSet) + { + sb.Append(Declawed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs index f9ce7c3bbe86..93d76da85d6b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs @@ -125,7 +125,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs index ef292f10e196..a9db8dacf297 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs @@ -143,7 +143,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" PetType: ").Append(PetType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs index 1019aafd7642..c31ef9bd32a4 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DateOnlyClass.cs index b41b1bb06d1e..126d910b3c68 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -92,7 +92,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DateOnlyClass {\n"); - sb.Append(" DateOnlyProperty: ").Append(DateOnlyProperty).Append("\n"); + sb.Append(" DateOnlyProperty: "); + if (DateOnlyProperty.IsSet) + { + sb.Append(DateOnlyProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs index dd3666d15239..a0c9fa25cafd 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DeprecatedObject {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs index 6225ca85908c..7bd7273adc19 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs @@ -103,7 +103,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" Breed: "); + if (Breed.IsSet) + { + sb.Append(Breed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs index 11cad191d689..cb331cb27fbb 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs @@ -185,10 +185,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Drawing {\n"); - sb.Append(" MainShape: ").Append(MainShape).Append("\n"); - sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); - sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" MainShape: "); + if (MainShape.IsSet) + { + sb.Append(MainShape.Value); + } + sb.Append("\n"); + sb.Append(" ShapeOrNull: "); + if (ShapeOrNull.IsSet) + { + sb.Append(ShapeOrNull.Value); + } + sb.Append("\n"); + sb.Append(" NullableShape: "); + if (NullableShape.IsSet) + { + sb.Append(NullableShape.Value); + } + sb.Append("\n"); + sb.Append(" Shapes: "); + if (Shapes.IsSet) + { + sb.Append(Shapes.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs index 38fe471cbaf2..9a44e2d5dc67 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -160,8 +160,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: "); + if (JustSymbol.IsSet) + { + sb.Append(JustSymbol.Value); + } + sb.Append("\n"); + sb.Append(" ArrayEnum: "); + if (ArrayEnum.IsSet) + { + sb.Append(ArrayEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs index 212d094446ec..7e6d145c7277 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs @@ -509,15 +509,55 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumString: "); + if (EnumString.IsSet) + { + sb.Append(EnumString.Value); + } + sb.Append("\n"); sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); - sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); - sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" EnumInteger: "); + if (EnumInteger.IsSet) + { + sb.Append(EnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" EnumIntegerOnly: "); + if (EnumIntegerOnly.IsSet) + { + sb.Append(EnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" EnumNumber: "); + if (EnumNumber.IsSet) + { + sb.Append(EnumNumber.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnum: "); + if (OuterEnum.IsSet) + { + sb.Append(OuterEnum.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumInteger: "); + if (OuterEnumInteger.IsSet) + { + sb.Append(OuterEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumDefaultValue: "); + if (OuterEnumDefaultValue.IsSet) + { + sb.Append(OuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumIntegerDefaultValue: "); + if (OuterEnumIntegerDefaultValue.IsSet) + { + sb.Append(OuterEnumIntegerDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs index e34061d119df..5b3dec9360da 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs @@ -91,7 +91,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); + sb.Append(" SourceURI: "); + if (SourceURI.IsSet) + { + sb.Append(SourceURI.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 97227721d357..837e5ab9d594 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -125,8 +125,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" File: "); + if (File.IsSet) + { + sb.Append(File.Value); + } + sb.Append("\n"); + sb.Append(" Files: "); + if (Files.IsSet) + { + sb.Append(Files.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs index 436ca5883adf..8f6fae1a7fbc 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs @@ -86,7 +86,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Foo {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 750a6757e3ca..3fe3e8a32557 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs index bf9286b93fd8..1ee30de10b28 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs @@ -678,25 +678,100 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); - sb.Append(" Int32: ").Append(Int32).Append("\n"); - sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n"); - sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n"); + sb.Append(" Integer: "); + if (Integer.IsSet) + { + sb.Append(Integer.Value); + } + sb.Append("\n"); + sb.Append(" Int32: "); + if (Int32.IsSet) + { + sb.Append(Int32.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedInteger: "); + if (UnsignedInteger.IsSet) + { + sb.Append(UnsignedInteger.Value); + } + sb.Append("\n"); + sb.Append(" Int64: "); + if (Int64.IsSet) + { + sb.Append(Int64.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedLong: "); + if (UnsignedLong.IsSet) + { + sb.Append(UnsignedLong.Value); + } + sb.Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" Float: "); + if (Float.IsSet) + { + sb.Append(Float.Value); + } + sb.Append("\n"); + sb.Append(" Double: "); + if (Double.IsSet) + { + sb.Append(Double.Value); + } + sb.Append("\n"); + sb.Append(" Decimal: "); + if (Decimal.IsSet) + { + sb.Append(Decimal.Value); + } + sb.Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Binary: "); + if (Binary.IsSet) + { + sb.Append(Binary.Value); + } + sb.Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); - sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); - sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n"); + sb.Append(" PatternWithDigits: "); + if (PatternWithDigits.IsSet) + { + sb.Append(PatternWithDigits.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithDigitsAndDelimiter: "); + if (PatternWithDigitsAndDelimiter.IsSet) + { + sb.Append(PatternWithDigitsAndDelimiter.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithBackslash: "); + if (PatternWithBackslash.IsSet) + { + sb.Append(PatternWithBackslash.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 96d854d60872..b8197df20437 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -84,8 +84,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Foo: "); + if (Foo.IsSet) + { + sb.Append(Foo.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs index e0b9694b84d3..4f4ffa456484 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -85,7 +85,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HealthCheckResult {\n"); - sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); + sb.Append(" NullableMessage: "); + if (NullableMessage.IsSet) + { + sb.Append(NullableMessage.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs index 1a6c8cf92a62..44a3d67f11c2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class List {\n"); - sb.Append(" Var123List: ").Append(Var123List).Append("\n"); + sb.Append(" Var123List: "); + if (Var123List.IsSet) + { + sb.Append(Var123List.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/LiteralStringClass.cs index a648f2f04b01..897d68b3a4f8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -117,8 +117,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LiteralStringClass {\n"); - sb.Append(" EscapedLiteralString: ").Append(EscapedLiteralString).Append("\n"); - sb.Append(" UnescapedLiteralString: ").Append(UnescapedLiteralString).Append("\n"); + sb.Append(" EscapedLiteralString: "); + if (EscapedLiteralString.IsSet) + { + sb.Append(EscapedLiteralString.Value); + } + sb.Append("\n"); + sb.Append(" UnescapedLiteralString: "); + if (UnescapedLiteralString.IsSet) + { + sb.Append(UnescapedLiteralString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs index 14959b6c2eae..2f682863f5ad 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs @@ -214,10 +214,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: "); + if (MapMapOfString.IsSet) + { + sb.Append(MapMapOfString.Value); + } + sb.Append("\n"); + sb.Append(" MapOfEnumString: "); + if (MapOfEnumString.IsSet) + { + sb.Append(MapOfEnumString.Value); + } + sb.Append("\n"); + sb.Append(" DirectMap: "); + if (DirectMap.IsSet) + { + sb.Append(DirectMap.Value); + } + sb.Append("\n"); + sb.Append(" IndirectMap: "); + if (IndirectMap.IsSet) + { + sb.Append(IndirectMap.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs index d8b7d523d5b6..e83eefe91e79 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs @@ -1131,35 +1131,155 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); + sb.Append(" ShopId: "); + if (ShopId.IsSet) + { + sb.Append(ShopId.Value); + } + sb.Append("\n"); + sb.Append(" TotalPrice: "); + if (TotalPrice.IsSet) + { + sb.Append(TotalPrice.Value); + } + sb.Append("\n"); sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); + sb.Append(" SomeCode: "); + if (SomeCode.IsSet) + { + sb.Append(SomeCode.Value); + } + sb.Append("\n"); + sb.Append(" BatchNumber: "); + if (BatchNumber.IsSet) + { + sb.Append(BatchNumber.Value); + } + sb.Append("\n"); + sb.Append(" BrandCode: "); + if (BrandCode.IsSet) + { + sb.Append(BrandCode.Value); + } + sb.Append("\n"); + sb.Append(" BrandId: "); + if (BrandId.IsSet) + { + sb.Append(BrandId.Value); + } + sb.Append("\n"); + sb.Append(" BrandName: "); + if (BrandName.IsSet) + { + sb.Append(BrandName.Value); + } + sb.Append("\n"); + sb.Append(" CategoryCode: "); + if (CategoryCode.IsSet) + { + sb.Append(CategoryCode.Value); + } + sb.Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); + sb.Append(" ColorDescription: "); + if (ColorDescription.IsSet) + { + sb.Append(ColorDescription.Value); + } + sb.Append("\n"); + sb.Append(" Comment: "); + if (Comment.IsSet) + { + sb.Append(Comment.Value); + } + sb.Append("\n"); + sb.Append(" CommercialProductCode: "); + if (CommercialProductCode.IsSet) + { + sb.Append(CommercialProductCode.Value); + } + sb.Append("\n"); + sb.Append(" ProductLineCode: "); + if (ProductLineCode.IsSet) + { + sb.Append(ProductLineCode.Value); + } + sb.Append("\n"); + sb.Append(" Country: "); + if (Country.IsSet) + { + sb.Append(Country.Value); + } + sb.Append("\n"); + sb.Append(" CreatedBy: "); + if (CreatedBy.IsSet) + { + sb.Append(CreatedBy.Value); + } + sb.Append("\n"); + sb.Append(" CreatedByFirstName: "); + if (CreatedByFirstName.IsSet) + { + sb.Append(CreatedByFirstName.Value); + } + sb.Append("\n"); + sb.Append(" CreatedByLastName: "); + if (CreatedByLastName.IsSet) + { + sb.Append(CreatedByLastName.Value); + } + sb.Append("\n"); + sb.Append(" DeltaECalculationRepaired: "); + if (DeltaECalculationRepaired.IsSet) + { + sb.Append(DeltaECalculationRepaired.Value); + } + sb.Append("\n"); + sb.Append(" DeltaECalculationSprayout: "); + if (DeltaECalculationSprayout.IsSet) + { + sb.Append(DeltaECalculationSprayout.Value); + } + sb.Append("\n"); + sb.Append(" OwnColorVariantNumber: "); + if (OwnColorVariantNumber.IsSet) + { + sb.Append(OwnColorVariantNumber.Value); + } + sb.Append("\n"); + sb.Append(" PrimerProductId: "); + if (PrimerProductId.IsSet) + { + sb.Append(PrimerProductId.Value); + } + sb.Append("\n"); + sb.Append(" ProductId: "); + if (ProductId.IsSet) + { + sb.Append(ProductId.Value); + } + sb.Append("\n"); + sb.Append(" ProductName: "); + if (ProductName.IsSet) + { + sb.Append(ProductName.Value); + } + sb.Append("\n"); + sb.Append(" SelectedVersionIndex: "); + if (SelectedVersionIndex.IsSet) + { + sb.Append(SelectedVersionIndex.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOf.cs index ab3d11b31d20..9899be25aff6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedAnyOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOf.cs index 39a113d2286e..76cffc057ad4 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedOneOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 70cc9207159b..2129322d5363 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -195,10 +195,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" UuidWithPattern: ").Append(UuidWithPattern).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" UuidWithPattern: "); + if (UuidWithPattern.IsSet) + { + sb.Append(UuidWithPattern.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Map: "); + if (Map.IsSet) + { + sb.Append(Map.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedSubId.cs index 74a18eb1c5b8..892646074868 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedSubId {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs index af2b2259dcea..fcf43d608607 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs @@ -120,8 +120,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs index 2c96f61f303b..c22cbe0a383c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" VarClient: "); + if (VarClient.IsSet) + { + sb.Append(VarClient.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs index af076c612f83..36831874bde6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs @@ -154,9 +154,24 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" VarName: ").Append(VarName).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" Var123Number: ").Append(Var123Number).Append("\n"); + sb.Append(" SnakeCase: "); + if (SnakeCase.IsSet) + { + sb.Append(SnakeCase.Value); + } + sb.Append("\n"); + sb.Append(" Property: "); + if (Property.IsSet) + { + sb.Append(Property.Value); + } + sb.Append("\n"); + sb.Append(" Var123Number: "); + if (Var123Number.IsSet) + { + sb.Append(Var123Number.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs index 43e30f5f2a21..aa6582c1dff3 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs @@ -426,18 +426,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); - sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); - sb.Append(" DateProp: ").Append(DateProp).Append("\n"); - sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); - sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" IntegerProp: "); + if (IntegerProp.IsSet) + { + sb.Append(IntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NumberProp: "); + if (NumberProp.IsSet) + { + sb.Append(NumberProp.Value); + } + sb.Append("\n"); + sb.Append(" BooleanProp: "); + if (BooleanProp.IsSet) + { + sb.Append(BooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" StringProp: "); + if (StringProp.IsSet) + { + sb.Append(StringProp.Value); + } + sb.Append("\n"); + sb.Append(" DateProp: "); + if (DateProp.IsSet) + { + sb.Append(DateProp.Value); + } + sb.Append("\n"); + sb.Append(" DatetimeProp: "); + if (DatetimeProp.IsSet) + { + sb.Append(DatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayNullableProp: "); + if (ArrayNullableProp.IsSet) + { + sb.Append(ArrayNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: "); + if (ArrayAndItemsNullableProp.IsSet) + { + sb.Append(ArrayAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayItemsNullable: "); + if (ArrayItemsNullable.IsSet) + { + sb.Append(ArrayItemsNullable.Value); + } + sb.Append("\n"); + sb.Append(" ObjectNullableProp: "); + if (ObjectNullableProp.IsSet) + { + sb.Append(ObjectNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectAndItemsNullableProp: "); + if (ObjectAndItemsNullableProp.IsSet) + { + sb.Append(ObjectAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectItemsNullable: "); + if (ObjectItemsNullable.IsSet) + { + sb.Append(ObjectItemsNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs index db4146d531a4..496b76056caa 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -86,7 +86,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableGuidClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs index 8531c7abf3c8..eb46ca0772b5 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -88,7 +88,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); + sb.Append(" JustNumber: "); + if (JustNumber.IsSet) + { + sb.Append(JustNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 344d857a3f05..9c09ec2eae8a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -193,10 +193,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); - sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" DeprecatedRef: "); + if (DeprecatedRef.IsSet) + { + sb.Append(DeprecatedRef.Value); + } + sb.Append("\n"); + sb.Append(" Bars: "); + if (Bars.IsSet) + { + sb.Append(Bars.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs index 07e791268f58..10675f162a4c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs @@ -266,12 +266,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" PetId: "); + if (PetId.IsSet) + { + sb.Append(PetId.Value); + } + sb.Append("\n"); + sb.Append(" Quantity: "); + if (Quantity.IsSet) + { + sb.Append(Quantity.Value); + } + sb.Append("\n"); + sb.Append(" ShipDate: "); + if (ShipDate.IsSet) + { + sb.Append(ShipDate.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); + sb.Append(" Complete: "); + if (Complete.IsSet) + { + sb.Append(Complete.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs index de925cdfc802..b90d9b16dd5c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -150,9 +150,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append(" MyNumber: "); + if (MyNumber.IsSet) + { + sb.Append(MyNumber.Value); + } + sb.Append("\n"); + sb.Append(" MyString: "); + if (MyString.IsSet) + { + sb.Append(MyString.Value); + } + sb.Append("\n"); + sb.Append(" MyBoolean: "); + if (MyBoolean.IsSet) + { + sb.Append(MyBoolean.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs index 37efdedd0aaf..0e3b64b8f7eb 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs @@ -287,12 +287,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 8070cd9ccb61..d37d0535740f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -104,8 +104,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Baz: "); + if (Baz.IsSet) + { + sb.Append(Baz.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs index 47e8fd0df10c..2cde05cd3542 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -1757,48 +1757,158 @@ public override string ToString() sb.Append("class RequiredClass {\n"); sb.Append(" RequiredNullableIntegerProp: ").Append(RequiredNullableIntegerProp).Append("\n"); sb.Append(" RequiredNotnullableintegerProp: ").Append(RequiredNotnullableintegerProp).Append("\n"); - sb.Append(" NotRequiredNullableIntegerProp: ").Append(NotRequiredNullableIntegerProp).Append("\n"); - sb.Append(" NotRequiredNotnullableintegerProp: ").Append(NotRequiredNotnullableintegerProp).Append("\n"); + sb.Append(" NotRequiredNullableIntegerProp: "); + if (NotRequiredNullableIntegerProp.IsSet) + { + sb.Append(NotRequiredNullableIntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableintegerProp: "); + if (NotRequiredNotnullableintegerProp.IsSet) + { + sb.Append(NotRequiredNotnullableintegerProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableStringProp: ").Append(RequiredNullableStringProp).Append("\n"); sb.Append(" RequiredNotnullableStringProp: ").Append(RequiredNotnullableStringProp).Append("\n"); - sb.Append(" NotrequiredNullableStringProp: ").Append(NotrequiredNullableStringProp).Append("\n"); - sb.Append(" NotrequiredNotnullableStringProp: ").Append(NotrequiredNotnullableStringProp).Append("\n"); + sb.Append(" NotrequiredNullableStringProp: "); + if (NotrequiredNullableStringProp.IsSet) + { + sb.Append(NotrequiredNullableStringProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableStringProp: "); + if (NotrequiredNotnullableStringProp.IsSet) + { + sb.Append(NotrequiredNotnullableStringProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableBooleanProp: ").Append(RequiredNullableBooleanProp).Append("\n"); sb.Append(" RequiredNotnullableBooleanProp: ").Append(RequiredNotnullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNullableBooleanProp: ").Append(NotrequiredNullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNotnullableBooleanProp: ").Append(NotrequiredNotnullableBooleanProp).Append("\n"); + sb.Append(" NotrequiredNullableBooleanProp: "); + if (NotrequiredNullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNullableBooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableBooleanProp: "); + if (NotrequiredNotnullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNotnullableBooleanProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableDateProp: ").Append(RequiredNullableDateProp).Append("\n"); sb.Append(" RequiredNotNullableDateProp: ").Append(RequiredNotNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNullableDateProp: ").Append(NotRequiredNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNotnullableDateProp: ").Append(NotRequiredNotnullableDateProp).Append("\n"); + sb.Append(" NotRequiredNullableDateProp: "); + if (NotRequiredNullableDateProp.IsSet) + { + sb.Append(NotRequiredNullableDateProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableDateProp: "); + if (NotRequiredNotnullableDateProp.IsSet) + { + sb.Append(NotRequiredNotnullableDateProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableDatetimeProp: ").Append(RequiredNotnullableDatetimeProp).Append("\n"); sb.Append(" RequiredNullableDatetimeProp: ").Append(RequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNullableDatetimeProp: ").Append(NotrequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNotnullableDatetimeProp: ").Append(NotrequiredNotnullableDatetimeProp).Append("\n"); + sb.Append(" NotrequiredNullableDatetimeProp: "); + if (NotrequiredNullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNullableDatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableDatetimeProp: "); + if (NotrequiredNotnullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNotnullableDatetimeProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumInteger: ").Append(RequiredNullableEnumInteger).Append("\n"); sb.Append(" RequiredNotnullableEnumInteger: ").Append(RequiredNotnullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNullableEnumInteger: ").Append(NotrequiredNullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumInteger: ").Append(NotrequiredNotnullableEnumInteger).Append("\n"); + sb.Append(" NotrequiredNullableEnumInteger: "); + if (NotrequiredNullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNullableEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumInteger: "); + if (NotrequiredNotnullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNotnullableEnumInteger.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumIntegerOnly: ").Append(RequiredNullableEnumIntegerOnly).Append("\n"); sb.Append(" RequiredNotnullableEnumIntegerOnly: ").Append(RequiredNotnullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNullableEnumIntegerOnly: ").Append(NotrequiredNullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumIntegerOnly: ").Append(NotrequiredNotnullableEnumIntegerOnly).Append("\n"); + sb.Append(" NotrequiredNullableEnumIntegerOnly: "); + if (NotrequiredNullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNullableEnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumIntegerOnly: "); + if (NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNotnullableEnumIntegerOnly.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableEnumString: ").Append(RequiredNotnullableEnumString).Append("\n"); sb.Append(" RequiredNullableEnumString: ").Append(RequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNullableEnumString: ").Append(NotrequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumString: ").Append(NotrequiredNotnullableEnumString).Append("\n"); + sb.Append(" NotrequiredNullableEnumString: "); + if (NotrequiredNullableEnumString.IsSet) + { + sb.Append(NotrequiredNullableEnumString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumString: "); + if (NotrequiredNotnullableEnumString.IsSet) + { + sb.Append(NotrequiredNotnullableEnumString.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableOuterEnumDefaultValue: ").Append(RequiredNullableOuterEnumDefaultValue).Append("\n"); sb.Append(" RequiredNotnullableOuterEnumDefaultValue: ").Append(RequiredNotnullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNullableOuterEnumDefaultValue: ").Append(NotrequiredNullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: ").Append(NotrequiredNotnullableOuterEnumDefaultValue).Append("\n"); + sb.Append(" NotrequiredNullableOuterEnumDefaultValue: "); + if (NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: "); + if (NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNotnullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableUuid: ").Append(RequiredNullableUuid).Append("\n"); sb.Append(" RequiredNotnullableUuid: ").Append(RequiredNotnullableUuid).Append("\n"); - sb.Append(" NotrequiredNullableUuid: ").Append(NotrequiredNullableUuid).Append("\n"); - sb.Append(" NotrequiredNotnullableUuid: ").Append(NotrequiredNotnullableUuid).Append("\n"); + sb.Append(" NotrequiredNullableUuid: "); + if (NotrequiredNullableUuid.IsSet) + { + sb.Append(NotrequiredNullableUuid.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableUuid: "); + if (NotrequiredNotnullableUuid.IsSet) + { + sb.Append(NotrequiredNotnullableUuid.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableArrayOfString: ").Append(RequiredNullableArrayOfString).Append("\n"); sb.Append(" RequiredNotnullableArrayOfString: ").Append(RequiredNotnullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNullableArrayOfString: ").Append(NotrequiredNullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNotnullableArrayOfString: ").Append(NotrequiredNotnullableArrayOfString).Append("\n"); + sb.Append(" NotrequiredNullableArrayOfString: "); + if (NotrequiredNullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNullableArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableArrayOfString: "); + if (NotrequiredNotnullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNotnullableArrayOfString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs index 08f442fec937..be98e9a60ef3 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs @@ -187,10 +187,20 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" VarReturn: ").Append(VarReturn).Append("\n"); + sb.Append(" VarReturn: "); + if (VarReturn.IsSet) + { + sb.Append(VarReturn.Value); + } + sb.Append("\n"); sb.Append(" Lock: ").Append(Lock).Append("\n"); sb.Append(" Abstract: ").Append(Abstract).Append("\n"); - sb.Append(" Unsafe: ").Append(Unsafe).Append("\n"); + sb.Append(" Unsafe: "); + if (Unsafe.IsSet) + { + sb.Append(Unsafe.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHash.cs index e0599726173d..d6a1c1954c91 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -125,8 +125,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHash {\n"); - sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" RoleUuid: "); + if (RoleUuid.IsSet) + { + sb.Append(RoleUuid.Value); + } + sb.Append("\n"); + sb.Append(" Role: "); + if (Role.IsSet) + { + sb.Append(Role.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 43b9b2ea0156..0536039d9a3d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHashRole {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs index f886925d6ebb..72fe04e45585 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -120,8 +120,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" VarSpecialModelName: ").Append(VarSpecialModelName).Append("\n"); + sb.Append(" SpecialPropertyName: "); + if (SpecialPropertyName.IsSet) + { + sb.Append(SpecialPropertyName.Value); + } + sb.Append("\n"); + sb.Append(" VarSpecialModelName: "); + if (VarSpecialModelName.IsSet) + { + sb.Append(VarSpecialModelName.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs index 97085564b6a3..e9cbb14ac3ec 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs @@ -120,8 +120,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 52906ed913ed..c200038c0875 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordList {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Value: "); + if (Value.IsSet) + { + sb.Append(Value.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 42e2abf6377e..db83b0db0324 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordListObject {\n"); - sb.Append(" TestCollectionEndingWithWordList: ").Append(TestCollectionEndingWithWordList).Append("\n"); + sb.Append(" TestCollectionEndingWithWordList: "); + if (TestCollectionEndingWithWordList.IsSet) + { + sb.Append(TestCollectionEndingWithWordList.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 94bf6c7e0e47..767d8332be4a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -90,7 +90,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n"); - sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n"); + sb.Append(" SomeProperty: "); + if (SomeProperty.IsSet) + { + sb.Append(SomeProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs index 44725e31a3c4..c52638273f2e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs @@ -455,18 +455,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); - sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); - sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Username: "); + if (Username.IsSet) + { + sb.Append(Username.Value); + } + sb.Append("\n"); + sb.Append(" FirstName: "); + if (FirstName.IsSet) + { + sb.Append(FirstName.Value); + } + sb.Append("\n"); + sb.Append(" LastName: "); + if (LastName.IsSet) + { + sb.Append(LastName.Value); + } + sb.Append("\n"); + sb.Append(" Email: "); + if (Email.IsSet) + { + sb.Append(Email.Value); + } + sb.Append("\n"); + sb.Append(" Password: "); + if (Password.IsSet) + { + sb.Append(Password.Value); + } + sb.Append("\n"); + sb.Append(" Phone: "); + if (Phone.IsSet) + { + sb.Append(Phone.Value); + } + sb.Append("\n"); + sb.Append(" UserStatus: "); + if (UserStatus.IsSet) + { + sb.Append(UserStatus.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: "); + if (ObjectWithNoDeclaredProps.IsSet) + { + sb.Append(ObjectWithNoDeclaredProps.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: "); + if (ObjectWithNoDeclaredPropsNullable.IsSet) + { + sb.Append(ObjectWithNoDeclaredPropsNullable.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypeProp: "); + if (AnyTypeProp.IsSet) + { + sb.Append(AnyTypeProp.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypePropNullable: "); + if (AnyTypePropNullable.IsSet) + { + sb.Append(AnyTypePropNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs index 96850518213a..13f0cbc3f4f3 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs @@ -155,8 +155,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Whale {\n"); - sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n"); - sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n"); + sb.Append(" HasBaleen: "); + if (HasBaleen.IsSet) + { + sb.Append(HasBaleen.Value); + } + sb.Append("\n"); + sb.Append(" HasTeeth: "); + if (HasTeeth.IsSet) + { + sb.Append(HasTeeth.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs index 826d0b396189..e6ec0d0502a0 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs @@ -152,7 +152,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Zebra {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 322cb23d49f9..5d0ad7307192 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -106,7 +106,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ZeroBasedEnumClass {\n"); - sb.Append(" ZeroBasedEnum: ").Append(ZeroBasedEnum).Append("\n"); + sb.Append(" ZeroBasedEnum: "); + if (ZeroBasedEnum.IsSet) + { + sb.Append(ZeroBasedEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 64ec72ede072..968324fe7c7e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Activity {\n"); - sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" ActivityOutputs: "); + if (ActivityOutputs.IsSet) + { + sb.Append(ActivityOutputs.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 1b186a8771ed..3bd8c654d0b3 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ActivityOutputElementRepresentation {\n"); - sb.Append(" Prop1: ").Append(Prop1).Append("\n"); - sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" Prop1: "); + if (Prop1.IsSet) + { + sb.Append(Prop1.Value); + } + sb.Append("\n"); + sb.Append(" Prop2: "); + if (Prop2.IsSet) + { + sb.Append(Prop2.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index c84fba57b967..19fbc48f7f26 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -155,14 +155,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); - sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" MapProperty: "); + if (MapProperty.IsSet) + { + sb.Append(MapProperty.Value); + } + sb.Append("\n"); + sb.Append(" MapOfMapProperty: "); + if (MapOfMapProperty.IsSet) + { + sb.Append(MapOfMapProperty.Value); + } + sb.Append("\n"); + sb.Append(" Anytype1: "); + if (Anytype1.IsSet) + { + sb.Append(Anytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype1: "); + if (MapWithUndeclaredPropertiesAnytype1.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype2: "); + if (MapWithUndeclaredPropertiesAnytype2.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype2.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype3: "); + if (MapWithUndeclaredPropertiesAnytype3.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype3.Value); + } + sb.Append("\n"); + sb.Append(" EmptyMap: "); + if (EmptyMap.IsSet) + { + sb.Append(EmptyMap.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesString: "); + if (MapWithUndeclaredPropertiesString.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs index a9332678ea77..e594f5727d8d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -94,7 +94,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Animal {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 72fba0eefb19..2c4287a5d287 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -89,9 +89,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Code: "); + if (Code.IsSet) + { + sb.Append(Code.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" Message: "); + if (Message.IsSet) + { + sb.Append(Message.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs index f085a6b77f31..0eb05dfaa9c8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -94,9 +94,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Apple {\n"); - sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" ColorCode: ").Append(ColorCode).Append("\n"); + sb.Append(" Cultivar: "); + if (Cultivar.IsSet) + { + sb.Append(Cultivar.Value); + } + sb.Append("\n"); + sb.Append(" Origin: "); + if (Origin.IsSet) + { + sb.Append(Origin.Value); + } + sb.Append("\n"); + sb.Append(" ColorCode: "); + if (ColorCode.IsSet) + { + sb.Append(ColorCode.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index f2a1e63e3787..ff277fb9035d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -75,7 +75,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class AppleReq {\n"); sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Mealy: ").Append(Mealy).Append("\n"); + sb.Append(" Mealy: "); + if (Mealy.IsSet) + { + sb.Append(Mealy.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 7cc2ebed0e24..ad4969ed5a65 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); + sb.Append(" ArrayArrayNumber: "); + if (ArrayArrayNumber.IsSet) + { + sb.Append(ArrayArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 7d85fc169003..a0155ed89aa2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); + sb.Append(" ArrayNumber: "); + if (ArrayNumber.IsSet) + { + sb.Append(ArrayNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 119862eca2e8..c13d67627c4e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -94,9 +94,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: "); + if (ArrayOfString.IsSet) + { + sb.Append(ArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfInteger: "); + if (ArrayArrayOfInteger.IsSet) + { + sb.Append(ArrayArrayOfInteger.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfModel: "); + if (ArrayArrayOfModel.IsSet) + { + sb.Append(ArrayArrayOfModel.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 3d6f908c4487..8dc5fbd16dfd 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Banana {\n"); - sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" LengthCm: "); + if (LengthCm.IsSet) + { + sb.Append(LengthCm.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index 02703e4025a9..fc7c797ede4f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -70,7 +70,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class BananaReq {\n"); sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); - sb.Append(" Sweet: ").Append(Sweet).Append("\n"); + sb.Append(" Sweet: "); + if (Sweet.IsSet) + { + sb.Append(Sweet.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 46478517456c..1f918a975bed 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -134,12 +134,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: "); + if (SmallCamel.IsSet) + { + sb.Append(SmallCamel.Value); + } + sb.Append("\n"); + sb.Append(" CapitalCamel: "); + if (CapitalCamel.IsSet) + { + sb.Append(CapitalCamel.Value); + } + sb.Append("\n"); + sb.Append(" SmallSnake: "); + if (SmallSnake.IsSet) + { + sb.Append(SmallSnake.Value); + } + sb.Append("\n"); + sb.Append(" CapitalSnake: "); + if (CapitalSnake.IsSet) + { + sb.Append(CapitalSnake.Value); + } + sb.Append("\n"); + sb.Append(" SCAETHFlowPoints: "); + if (SCAETHFlowPoints.IsSet) + { + sb.Append(SCAETHFlowPoints.Value); + } + sb.Append("\n"); + sb.Append(" ATT_NAME: "); + if (ATT_NAME.IsSet) + { + sb.Append(ATT_NAME.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs index c2e163db6026..106c21bf8373 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -76,7 +76,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" Declawed: "); + if (Declawed.IsSet) + { + sb.Append(Declawed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs index fa5cfbd9a2d5..2542a088011d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -84,7 +84,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index fd54f56a6ea9..1d3035ff4c33 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -100,7 +100,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" PetType: ").Append(PetType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index c7e10769716c..7e5c313abacc 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 3b5f665905e4..4cedebb8687a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -70,7 +70,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DateOnlyClass {\n"); - sb.Append(" DateOnlyProperty: ").Append(DateOnlyProperty).Append("\n"); + sb.Append(" DateOnlyProperty: "); + if (DateOnlyProperty.IsSet) + { + sb.Append(DateOnlyProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index d323606d4072..0deddca5eb3b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DeprecatedObject {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs index d638ec7f4551..4971b148db15 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -81,7 +81,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" Breed: "); + if (Breed.IsSet) + { + sb.Append(Breed.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index bcb1878282cf..f1b2857a8c8c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -97,10 +97,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Drawing {\n"); - sb.Append(" MainShape: ").Append(MainShape).Append("\n"); - sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); - sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" MainShape: "); + if (MainShape.IsSet) + { + sb.Append(MainShape.Value); + } + sb.Append("\n"); + sb.Append(" ShapeOrNull: "); + if (ShapeOrNull.IsSet) + { + sb.Append(ShapeOrNull.Value); + } + sb.Append("\n"); + sb.Append(" NullableShape: "); + if (NullableShape.IsSet) + { + sb.Append(NullableShape.Value); + } + sb.Append("\n"); + sb.Append(" Shapes: "); + if (Shapes.IsSet) + { + sb.Append(Shapes.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 569a1bbf1ea4..6f4cfcc81422 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -114,8 +114,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: "); + if (JustSymbol.IsSet) + { + sb.Append(JustSymbol.Value); + } + sb.Append("\n"); + sb.Append(" ArrayEnum: "); + if (ArrayEnum.IsSet) + { + sb.Append(ArrayEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 20e394af4bc2..d68a80401400 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -296,15 +296,55 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumString: "); + if (EnumString.IsSet) + { + sb.Append(EnumString.Value); + } + sb.Append("\n"); sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); - sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); - sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" EnumInteger: "); + if (EnumInteger.IsSet) + { + sb.Append(EnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" EnumIntegerOnly: "); + if (EnumIntegerOnly.IsSet) + { + sb.Append(EnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" EnumNumber: "); + if (EnumNumber.IsSet) + { + sb.Append(EnumNumber.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnum: "); + if (OuterEnum.IsSet) + { + sb.Append(OuterEnum.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumInteger: "); + if (OuterEnumInteger.IsSet) + { + sb.Append(OuterEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumDefaultValue: "); + if (OuterEnumDefaultValue.IsSet) + { + sb.Append(OuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumIntegerDefaultValue: "); + if (OuterEnumIntegerDefaultValue.IsSet) + { + sb.Append(OuterEnumIntegerDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs index 3073d9ce4919..087edb6767da 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -69,7 +69,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); + sb.Append(" SourceURI: "); + if (SourceURI.IsSet) + { + sb.Append(SourceURI.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index bdd81d64aace..1d10ee837aad 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" File: "); + if (File.IsSet) + { + sb.Append(File.Value); + } + sb.Append("\n"); + sb.Append(" Files: "); + if (Files.IsSet) + { + sb.Append(Files.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs index d899e3f91fa0..81e2be3f56c7 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Foo {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 3465ee4146ea..08f3751f9093 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 63345fa27a20..b378e6dd5e67 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -272,25 +272,100 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); - sb.Append(" Int32: ").Append(Int32).Append("\n"); - sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n"); - sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n"); + sb.Append(" Integer: "); + if (Integer.IsSet) + { + sb.Append(Integer.Value); + } + sb.Append("\n"); + sb.Append(" Int32: "); + if (Int32.IsSet) + { + sb.Append(Int32.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedInteger: "); + if (UnsignedInteger.IsSet) + { + sb.Append(UnsignedInteger.Value); + } + sb.Append("\n"); + sb.Append(" Int64: "); + if (Int64.IsSet) + { + sb.Append(Int64.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedLong: "); + if (UnsignedLong.IsSet) + { + sb.Append(UnsignedLong.Value); + } + sb.Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" Float: "); + if (Float.IsSet) + { + sb.Append(Float.Value); + } + sb.Append("\n"); + sb.Append(" Double: "); + if (Double.IsSet) + { + sb.Append(Double.Value); + } + sb.Append("\n"); + sb.Append(" Decimal: "); + if (Decimal.IsSet) + { + sb.Append(Decimal.Value); + } + sb.Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Binary: "); + if (Binary.IsSet) + { + sb.Append(Binary.Value); + } + sb.Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); - sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); - sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n"); + sb.Append(" PatternWithDigits: "); + if (PatternWithDigits.IsSet) + { + sb.Append(PatternWithDigits.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithDigitsAndDelimiter: "); + if (PatternWithDigitsAndDelimiter.IsSet) + { + sb.Append(PatternWithDigitsAndDelimiter.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithBackslash: "); + if (PatternWithBackslash.IsSet) + { + sb.Append(PatternWithBackslash.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 96d854d60872..b8197df20437 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -84,8 +84,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Foo: "); + if (Foo.IsSet) + { + sb.Append(Foo.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index cced5965aa84..e4a388da0740 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HealthCheckResult {\n"); - sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); + sb.Append(" NullableMessage: "); + if (NullableMessage.IsSet) + { + sb.Append(NullableMessage.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs index 358846cdd689..1d1185fd7171 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class List {\n"); - sb.Append(" Var123List: ").Append(Var123List).Append("\n"); + sb.Append(" Var123List: "); + if (Var123List.IsSet) + { + sb.Append(Var123List.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 63e1726e5f79..baa3fe2f8612 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LiteralStringClass {\n"); - sb.Append(" EscapedLiteralString: ").Append(EscapedLiteralString).Append("\n"); - sb.Append(" UnescapedLiteralString: ").Append(UnescapedLiteralString).Append("\n"); + sb.Append(" EscapedLiteralString: "); + if (EscapedLiteralString.IsSet) + { + sb.Append(EscapedLiteralString.Value); + } + sb.Append("\n"); + sb.Append(" UnescapedLiteralString: "); + if (UnescapedLiteralString.IsSet) + { + sb.Append(UnescapedLiteralString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index 004bf942c034..7e85200b5921 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -126,10 +126,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: "); + if (MapMapOfString.IsSet) + { + sb.Append(MapMapOfString.Value); + } + sb.Append("\n"); + sb.Append(" MapOfEnumString: "); + if (MapOfEnumString.IsSet) + { + sb.Append(MapOfEnumString.Value); + } + sb.Append("\n"); + sb.Append(" DirectMap: "); + if (DirectMap.IsSet) + { + sb.Append(DirectMap.Value); + } + sb.Append("\n"); + sb.Append(" IndirectMap: "); + if (IndirectMap.IsSet) + { + sb.Append(IndirectMap.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 5dbb7d0ef732..68c2208b6031 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedAnyOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index f18b4793a139..eb425e933a16 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedOneOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index fc342925735f..562d233f37af 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -107,10 +107,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" UuidWithPattern: ").Append(UuidWithPattern).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" UuidWithPattern: "); + if (UuidWithPattern.IsSet) + { + sb.Append(UuidWithPattern.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Map: "); + if (Map.IsSet) + { + sb.Append(Map.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 9d5c0bc35f6f..4dd8bfeb529d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedSubId {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index d22b1c824ceb..cfb54939d213 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 4c8ff7320d98..b85005404154 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" VarClient: "); + if (VarClient.IsSet) + { + sb.Append(VarClient.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs index 10b22f09b12a..e23701fe32f5 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -113,9 +113,24 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" VarName: ").Append(VarName).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" Var123Number: ").Append(Var123Number).Append("\n"); + sb.Append(" SnakeCase: "); + if (SnakeCase.IsSet) + { + sb.Append(SnakeCase.Value); + } + sb.Append("\n"); + sb.Append(" Property: "); + if (Property.IsSet) + { + sb.Append(Property.Value); + } + sb.Append("\n"); + sb.Append(" Var123Number: "); + if (Var123Number.IsSet) + { + sb.Append(Var123Number.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index c384e5bfa54f..104f0658e300 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -162,18 +162,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); - sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); - sb.Append(" DateProp: ").Append(DateProp).Append("\n"); - sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); - sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" IntegerProp: "); + if (IntegerProp.IsSet) + { + sb.Append(IntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NumberProp: "); + if (NumberProp.IsSet) + { + sb.Append(NumberProp.Value); + } + sb.Append("\n"); + sb.Append(" BooleanProp: "); + if (BooleanProp.IsSet) + { + sb.Append(BooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" StringProp: "); + if (StringProp.IsSet) + { + sb.Append(StringProp.Value); + } + sb.Append("\n"); + sb.Append(" DateProp: "); + if (DateProp.IsSet) + { + sb.Append(DateProp.Value); + } + sb.Append("\n"); + sb.Append(" DatetimeProp: "); + if (DatetimeProp.IsSet) + { + sb.Append(DatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayNullableProp: "); + if (ArrayNullableProp.IsSet) + { + sb.Append(ArrayNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: "); + if (ArrayAndItemsNullableProp.IsSet) + { + sb.Append(ArrayAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayItemsNullable: "); + if (ArrayItemsNullable.IsSet) + { + sb.Append(ArrayItemsNullable.Value); + } + sb.Append("\n"); + sb.Append(" ObjectNullableProp: "); + if (ObjectNullableProp.IsSet) + { + sb.Append(ObjectNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectAndItemsNullableProp: "); + if (ObjectAndItemsNullableProp.IsSet) + { + sb.Append(ObjectAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectItemsNullable: "); + if (ObjectItemsNullable.IsSet) + { + sb.Append(ObjectItemsNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 059dd8c09a0b..7197ed45b2f7 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -64,7 +64,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableGuidClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index eabf9cccc135..45817d11a099 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -66,7 +66,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); + sb.Append(" JustNumber: "); + if (JustNumber.IsSet) + { + sb.Append(JustNumber.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index fe77912ea4be..f963841469a8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -105,10 +105,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); - sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" DeprecatedRef: "); + if (DeprecatedRef.IsSet) + { + sb.Append(DeprecatedRef.Value); + } + sb.Append("\n"); + sb.Append(" Bars: "); + if (Bars.IsSet) + { + sb.Append(Bars.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs index 22df3b5b7b01..82b776600fdf 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -136,12 +136,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" PetId: "); + if (PetId.IsSet) + { + sb.Append(PetId.Value); + } + sb.Append("\n"); + sb.Append(" Quantity: "); + if (Quantity.IsSet) + { + sb.Append(Quantity.Value); + } + sb.Append("\n"); + sb.Append(" ShipDate: "); + if (ShipDate.IsSet) + { + sb.Append(ShipDate.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); + sb.Append(" Complete: "); + if (Complete.IsSet) + { + sb.Append(Complete.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index f55b2f8c2454..360c09657f21 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -84,9 +84,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append(" MyNumber: "); + if (MyNumber.IsSet) + { + sb.Append(MyNumber.Value); + } + sb.Append("\n"); + sb.Append(" MyString: "); + if (MyString.IsSet) + { + sb.Append(MyString.Value); + } + sb.Append("\n"); + sb.Append(" MyBoolean: "); + if (MyBoolean.IsSet) + { + sb.Append(MyBoolean.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs index bbd65be3d7fd..38f3262281ca 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -159,12 +159,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index d6715914adc5..a348c6a0250b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -82,8 +82,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Baz: "); + if (Baz.IsSet) + { + sb.Append(Baz.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 7fbdfa344d3c..6b5ef301cfcd 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -823,48 +823,158 @@ public override string ToString() sb.Append("class RequiredClass {\n"); sb.Append(" RequiredNullableIntegerProp: ").Append(RequiredNullableIntegerProp).Append("\n"); sb.Append(" RequiredNotnullableintegerProp: ").Append(RequiredNotnullableintegerProp).Append("\n"); - sb.Append(" NotRequiredNullableIntegerProp: ").Append(NotRequiredNullableIntegerProp).Append("\n"); - sb.Append(" NotRequiredNotnullableintegerProp: ").Append(NotRequiredNotnullableintegerProp).Append("\n"); + sb.Append(" NotRequiredNullableIntegerProp: "); + if (NotRequiredNullableIntegerProp.IsSet) + { + sb.Append(NotRequiredNullableIntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableintegerProp: "); + if (NotRequiredNotnullableintegerProp.IsSet) + { + sb.Append(NotRequiredNotnullableintegerProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableStringProp: ").Append(RequiredNullableStringProp).Append("\n"); sb.Append(" RequiredNotnullableStringProp: ").Append(RequiredNotnullableStringProp).Append("\n"); - sb.Append(" NotrequiredNullableStringProp: ").Append(NotrequiredNullableStringProp).Append("\n"); - sb.Append(" NotrequiredNotnullableStringProp: ").Append(NotrequiredNotnullableStringProp).Append("\n"); + sb.Append(" NotrequiredNullableStringProp: "); + if (NotrequiredNullableStringProp.IsSet) + { + sb.Append(NotrequiredNullableStringProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableStringProp: "); + if (NotrequiredNotnullableStringProp.IsSet) + { + sb.Append(NotrequiredNotnullableStringProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableBooleanProp: ").Append(RequiredNullableBooleanProp).Append("\n"); sb.Append(" RequiredNotnullableBooleanProp: ").Append(RequiredNotnullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNullableBooleanProp: ").Append(NotrequiredNullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNotnullableBooleanProp: ").Append(NotrequiredNotnullableBooleanProp).Append("\n"); + sb.Append(" NotrequiredNullableBooleanProp: "); + if (NotrequiredNullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNullableBooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableBooleanProp: "); + if (NotrequiredNotnullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNotnullableBooleanProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableDateProp: ").Append(RequiredNullableDateProp).Append("\n"); sb.Append(" RequiredNotNullableDateProp: ").Append(RequiredNotNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNullableDateProp: ").Append(NotRequiredNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNotnullableDateProp: ").Append(NotRequiredNotnullableDateProp).Append("\n"); + sb.Append(" NotRequiredNullableDateProp: "); + if (NotRequiredNullableDateProp.IsSet) + { + sb.Append(NotRequiredNullableDateProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableDateProp: "); + if (NotRequiredNotnullableDateProp.IsSet) + { + sb.Append(NotRequiredNotnullableDateProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableDatetimeProp: ").Append(RequiredNotnullableDatetimeProp).Append("\n"); sb.Append(" RequiredNullableDatetimeProp: ").Append(RequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNullableDatetimeProp: ").Append(NotrequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNotnullableDatetimeProp: ").Append(NotrequiredNotnullableDatetimeProp).Append("\n"); + sb.Append(" NotrequiredNullableDatetimeProp: "); + if (NotrequiredNullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNullableDatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableDatetimeProp: "); + if (NotrequiredNotnullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNotnullableDatetimeProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumInteger: ").Append(RequiredNullableEnumInteger).Append("\n"); sb.Append(" RequiredNotnullableEnumInteger: ").Append(RequiredNotnullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNullableEnumInteger: ").Append(NotrequiredNullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumInteger: ").Append(NotrequiredNotnullableEnumInteger).Append("\n"); + sb.Append(" NotrequiredNullableEnumInteger: "); + if (NotrequiredNullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNullableEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumInteger: "); + if (NotrequiredNotnullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNotnullableEnumInteger.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumIntegerOnly: ").Append(RequiredNullableEnumIntegerOnly).Append("\n"); sb.Append(" RequiredNotnullableEnumIntegerOnly: ").Append(RequiredNotnullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNullableEnumIntegerOnly: ").Append(NotrequiredNullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumIntegerOnly: ").Append(NotrequiredNotnullableEnumIntegerOnly).Append("\n"); + sb.Append(" NotrequiredNullableEnumIntegerOnly: "); + if (NotrequiredNullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNullableEnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumIntegerOnly: "); + if (NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNotnullableEnumIntegerOnly.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableEnumString: ").Append(RequiredNotnullableEnumString).Append("\n"); sb.Append(" RequiredNullableEnumString: ").Append(RequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNullableEnumString: ").Append(NotrequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumString: ").Append(NotrequiredNotnullableEnumString).Append("\n"); + sb.Append(" NotrequiredNullableEnumString: "); + if (NotrequiredNullableEnumString.IsSet) + { + sb.Append(NotrequiredNullableEnumString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumString: "); + if (NotrequiredNotnullableEnumString.IsSet) + { + sb.Append(NotrequiredNotnullableEnumString.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableOuterEnumDefaultValue: ").Append(RequiredNullableOuterEnumDefaultValue).Append("\n"); sb.Append(" RequiredNotnullableOuterEnumDefaultValue: ").Append(RequiredNotnullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNullableOuterEnumDefaultValue: ").Append(NotrequiredNullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: ").Append(NotrequiredNotnullableOuterEnumDefaultValue).Append("\n"); + sb.Append(" NotrequiredNullableOuterEnumDefaultValue: "); + if (NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: "); + if (NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNotnullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableUuid: ").Append(RequiredNullableUuid).Append("\n"); sb.Append(" RequiredNotnullableUuid: ").Append(RequiredNotnullableUuid).Append("\n"); - sb.Append(" NotrequiredNullableUuid: ").Append(NotrequiredNullableUuid).Append("\n"); - sb.Append(" NotrequiredNotnullableUuid: ").Append(NotrequiredNotnullableUuid).Append("\n"); + sb.Append(" NotrequiredNullableUuid: "); + if (NotrequiredNullableUuid.IsSet) + { + sb.Append(NotrequiredNullableUuid.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableUuid: "); + if (NotrequiredNotnullableUuid.IsSet) + { + sb.Append(NotrequiredNotnullableUuid.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableArrayOfString: ").Append(RequiredNullableArrayOfString).Append("\n"); sb.Append(" RequiredNotnullableArrayOfString: ").Append(RequiredNotnullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNullableArrayOfString: ").Append(NotrequiredNullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNotnullableArrayOfString: ").Append(NotrequiredNotnullableArrayOfString).Append("\n"); + sb.Append(" NotrequiredNullableArrayOfString: "); + if (NotrequiredNullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNullableArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableArrayOfString: "); + if (NotrequiredNotnullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNotnullableArrayOfString.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs index 077005d6cc27..92d4864fc08d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -63,7 +63,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" VarReturn: ").Append(VarReturn).Append("\n"); + sb.Append(" VarReturn: "); + if (VarReturn.IsSet) + { + sb.Append(VarReturn.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 53d7053be15e..dfe3ccc106d2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -81,8 +81,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHash {\n"); - sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" RoleUuid: "); + if (RoleUuid.IsSet) + { + sb.Append(RoleUuid.Value); + } + sb.Append("\n"); + sb.Append(" Role: "); + if (Role.IsSet) + { + sb.Append(Role.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 177eddaba12d..a0a59f65eb4c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHashRole {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 8778d6b6381c..ecec83488e3b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" VarSpecialModelName: ").Append(VarSpecialModelName).Append("\n"); + sb.Append(" SpecialPropertyName: "); + if (SpecialPropertyName.IsSet) + { + sb.Append(SpecialPropertyName.Value); + } + sb.Append("\n"); + sb.Append(" VarSpecialModelName: "); + if (VarSpecialModelName.IsSet) + { + sb.Append(VarSpecialModelName.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 74c5d5104142..fda609b9c823 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -76,8 +76,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 72bd1b369aeb..56e0161283c7 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordList {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Value: "); + if (Value.IsSet) + { + sb.Append(Value.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 6e00826d7870..d8acb6ebf530 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordListObject {\n"); - sb.Append(" TestCollectionEndingWithWordList: ").Append(TestCollectionEndingWithWordList).Append("\n"); + sb.Append(" TestCollectionEndingWithWordList: "); + if (TestCollectionEndingWithWordList.IsSet) + { + sb.Append(TestCollectionEndingWithWordList.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index aca5c0652ab6..707fd66eca91 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -68,7 +68,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n"); - sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n"); + sb.Append(" SomeProperty: "); + if (SomeProperty.IsSet) + { + sb.Append(SomeProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs index 4c20f415c024..e8d7cc34f942 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -191,18 +191,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); - sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); - sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Username: "); + if (Username.IsSet) + { + sb.Append(Username.Value); + } + sb.Append("\n"); + sb.Append(" FirstName: "); + if (FirstName.IsSet) + { + sb.Append(FirstName.Value); + } + sb.Append("\n"); + sb.Append(" LastName: "); + if (LastName.IsSet) + { + sb.Append(LastName.Value); + } + sb.Append("\n"); + sb.Append(" Email: "); + if (Email.IsSet) + { + sb.Append(Email.Value); + } + sb.Append("\n"); + sb.Append(" Password: "); + if (Password.IsSet) + { + sb.Append(Password.Value); + } + sb.Append("\n"); + sb.Append(" Phone: "); + if (Phone.IsSet) + { + sb.Append(Phone.Value); + } + sb.Append("\n"); + sb.Append(" UserStatus: "); + if (UserStatus.IsSet) + { + sb.Append(UserStatus.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: "); + if (ObjectWithNoDeclaredProps.IsSet) + { + sb.Append(ObjectWithNoDeclaredProps.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: "); + if (ObjectWithNoDeclaredPropsNullable.IsSet) + { + sb.Append(ObjectWithNoDeclaredPropsNullable.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypeProp: "); + if (AnyTypeProp.IsSet) + { + sb.Append(AnyTypeProp.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypePropNullable: "); + if (AnyTypePropNullable.IsSet) + { + sb.Append(AnyTypePropNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 2038fc78e8db..f5e1221d3806 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -92,8 +92,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Whale {\n"); - sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n"); - sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n"); + sb.Append(" HasBaleen: "); + if (HasBaleen.IsSet) + { + sb.Append(HasBaleen.Value); + } + sb.Append("\n"); + sb.Append(" HasTeeth: "); + if (HasTeeth.IsSet) + { + sb.Append(HasTeeth.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 3bb224da1e43..6d906475d2e0 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -109,7 +109,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Zebra {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index daccbc984737..b98444329c5f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -82,7 +82,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ZeroBasedEnumClass {\n"); - sb.Append(" ZeroBasedEnum: ").Append(ZeroBasedEnum).Append("\n"); + sb.Append(" ZeroBasedEnum: "); + if (ZeroBasedEnum.IsSet) + { + sb.Append(ZeroBasedEnum.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs index eaa2d1162adc..1bb37464cfa2 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Activity {\n"); - sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" ActivityOutputs: "); + if (ActivityOutputs.IsSet) + { + sb.Append(ActivityOutputs.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index bd79468e0100..b027cd8a09ce 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -72,8 +72,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ActivityOutputElementRepresentation {\n"); - sb.Append(" Prop1: ").Append(Prop1).Append("\n"); - sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" Prop1: "); + if (Prop1.IsSet) + { + sb.Append(Prop1.Value); + } + sb.Append("\n"); + sb.Append(" Prop2: "); + if (Prop2.IsSet) + { + sb.Append(Prop2.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index cec2df8b4372..39f0e246dded 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -146,14 +146,54 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); - sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); - sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" MapProperty: "); + if (MapProperty.IsSet) + { + sb.Append(MapProperty.Value); + } + sb.Append("\n"); + sb.Append(" MapOfMapProperty: "); + if (MapOfMapProperty.IsSet) + { + sb.Append(MapOfMapProperty.Value); + } + sb.Append("\n"); + sb.Append(" Anytype1: "); + if (Anytype1.IsSet) + { + sb.Append(Anytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype1: "); + if (MapWithUndeclaredPropertiesAnytype1.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype1.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype2: "); + if (MapWithUndeclaredPropertiesAnytype2.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype2.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype3: "); + if (MapWithUndeclaredPropertiesAnytype3.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesAnytype3.Value); + } + sb.Append("\n"); + sb.Append(" EmptyMap: "); + if (EmptyMap.IsSet) + { + sb.Append(EmptyMap.Value); + } + sb.Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesString: "); + if (MapWithUndeclaredPropertiesString.IsSet) + { + sb.Append(MapWithUndeclaredPropertiesString.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 53001fc373be..9d820ad07bdc 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -78,7 +78,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Animal {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 0a676d40603b..bad65b92b265 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -80,9 +80,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Code: "); + if (Code.IsSet) + { + sb.Append(Code.Value); + } + sb.Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); + sb.Append(" Message: "); + if (Message.IsSet) + { + sb.Append(Message.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 78e7e40f5f81..2c80b7370fb5 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -85,9 +85,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Apple {\n"); - sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" ColorCode: ").Append(ColorCode).Append("\n"); + sb.Append(" Cultivar: "); + if (Cultivar.IsSet) + { + sb.Append(Cultivar.Value); + } + sb.Append("\n"); + sb.Append(" Origin: "); + if (Origin.IsSet) + { + sb.Append(Origin.Value); + } + sb.Append("\n"); + sb.Append(" ColorCode: "); + if (ColorCode.IsSet) + { + sb.Append(ColorCode.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index 7cb63b990ae6..028ad036f5de 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -73,7 +73,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class AppleReq {\n"); sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); - sb.Append(" Mealy: ").Append(Mealy).Append("\n"); + sb.Append(" Mealy: "); + if (Mealy.IsSet) + { + sb.Append(Mealy.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 55e27c772a6a..50e325aa9a8c 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); + sb.Append(" ArrayArrayNumber: "); + if (ArrayArrayNumber.IsSet) + { + sb.Append(ArrayArrayNumber.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index e39a83a3291a..ad05ab406584 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); + sb.Append(" ArrayNumber: "); + if (ArrayNumber.IsSet) + { + sb.Append(ArrayNumber.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index a4725bad0e07..abd24bb20d73 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -85,9 +85,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: "); + if (ArrayOfString.IsSet) + { + sb.Append(ArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfInteger: "); + if (ArrayArrayOfInteger.IsSet) + { + sb.Append(ArrayArrayOfInteger.Value); + } + sb.Append("\n"); + sb.Append(" ArrayArrayOfModel: "); + if (ArrayArrayOfModel.IsSet) + { + sb.Append(ArrayArrayOfModel.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs index edd5b2de6928..a31f1660b1da 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -54,7 +54,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Banana {\n"); - sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" LengthCm: "); + if (LengthCm.IsSet) + { + sb.Append(LengthCm.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index cc12527ec7f6..bc8effb00316 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -68,7 +68,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class BananaReq {\n"); sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); - sb.Append(" Sweet: ").Append(Sweet).Append("\n"); + sb.Append(" Sweet: "); + if (Sweet.IsSet) + { + sb.Append(Sweet.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 254cc3779e91..576a2aadabac 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -125,12 +125,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: "); + if (SmallCamel.IsSet) + { + sb.Append(SmallCamel.Value); + } + sb.Append("\n"); + sb.Append(" CapitalCamel: "); + if (CapitalCamel.IsSet) + { + sb.Append(CapitalCamel.Value); + } + sb.Append("\n"); + sb.Append(" SmallSnake: "); + if (SmallSnake.IsSet) + { + sb.Append(SmallSnake.Value); + } + sb.Append("\n"); + sb.Append(" CapitalSnake: "); + if (CapitalSnake.IsSet) + { + sb.Append(CapitalSnake.Value); + } + sb.Append("\n"); + sb.Append(" SCAETHFlowPoints: "); + if (SCAETHFlowPoints.IsSet) + { + sb.Append(SCAETHFlowPoints.Value); + } + sb.Append("\n"); + sb.Append(" ATT_NAME: "); + if (ATT_NAME.IsSet) + { + sb.Append(ATT_NAME.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs index 7ecee6001f90..0c68dd31392e 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -62,7 +62,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" Declawed: "); + if (Declawed.IsSet) + { + sb.Append(Declawed.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs index 17972b137462..5a435fd70435 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -72,7 +72,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index 211c7b41ae67..698fa378219e 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -86,7 +86,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append(" PetType: ").Append(PetType).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 56c0e3ea8178..0ff829297f6e 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index d5c6000b4e2a..9a13f3390236 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -61,7 +61,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DateOnlyClass {\n"); - sb.Append(" DateOnlyProperty: ").Append(DateOnlyProperty).Append("\n"); + sb.Append(" DateOnlyProperty: "); + if (DateOnlyProperty.IsSet) + { + sb.Append(DateOnlyProperty.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index b71e07183a34..5ab722157846 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DeprecatedObject {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 2e060449a6c3..1e91e033935a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -67,7 +67,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" Breed: "); + if (Breed.IsSet) + { + sb.Append(Breed.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index b9a3ee772396..e9dac937caf3 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -95,10 +95,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Drawing {\n"); - sb.Append(" MainShape: ").Append(MainShape).Append("\n"); - sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); - sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" MainShape: "); + if (MainShape.IsSet) + { + sb.Append(MainShape.Value); + } + sb.Append("\n"); + sb.Append(" ShapeOrNull: "); + if (ShapeOrNull.IsSet) + { + sb.Append(ShapeOrNull.Value); + } + sb.Append("\n"); + sb.Append(" NullableShape: "); + if (NullableShape.IsSet) + { + sb.Append(NullableShape.Value); + } + sb.Append("\n"); + sb.Append(" Shapes: "); + if (Shapes.IsSet) + { + sb.Append(Shapes.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index d14ae14ea148..fbd9c87504c9 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -105,8 +105,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: "); + if (JustSymbol.IsSet) + { + sb.Append(JustSymbol.Value); + } + sb.Append("\n"); + sb.Append(" ArrayEnum: "); + if (ArrayEnum.IsSet) + { + sb.Append(ArrayEnum.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 5b2bd9e83187..c50944da65d1 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -284,15 +284,55 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumString: "); + if (EnumString.IsSet) + { + sb.Append(EnumString.Value); + } + sb.Append("\n"); sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); - sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); - sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" EnumInteger: "); + if (EnumInteger.IsSet) + { + sb.Append(EnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" EnumIntegerOnly: "); + if (EnumIntegerOnly.IsSet) + { + sb.Append(EnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" EnumNumber: "); + if (EnumNumber.IsSet) + { + sb.Append(EnumNumber.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnum: "); + if (OuterEnum.IsSet) + { + sb.Append(OuterEnum.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumInteger: "); + if (OuterEnumInteger.IsSet) + { + sb.Append(OuterEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumDefaultValue: "); + if (OuterEnumDefaultValue.IsSet) + { + sb.Append(OuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" OuterEnumIntegerDefaultValue: "); + if (OuterEnumIntegerDefaultValue.IsSet) + { + sb.Append(OuterEnumIntegerDefaultValue.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs index 5eba6f1a9b7d..31558457435e 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -60,7 +60,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); + sb.Append(" SourceURI: "); + if (SourceURI.IsSet) + { + sb.Append(SourceURI.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 328918597ea4..0168c78e1607 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -72,8 +72,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" File: "); + if (File.IsSet) + { + sb.Append(File.Value); + } + sb.Append("\n"); + sb.Append(" Files: "); + if (Files.IsSet) + { + sb.Append(Files.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 6c6616fde411..b7d333983958 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Foo {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 9530801bb315..2cc419d7c886 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 9c013a5413b9..0c4836930471 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -260,25 +260,100 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); - sb.Append(" Int32: ").Append(Int32).Append("\n"); - sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n"); - sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n"); + sb.Append(" Integer: "); + if (Integer.IsSet) + { + sb.Append(Integer.Value); + } + sb.Append("\n"); + sb.Append(" Int32: "); + if (Int32.IsSet) + { + sb.Append(Int32.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedInteger: "); + if (UnsignedInteger.IsSet) + { + sb.Append(UnsignedInteger.Value); + } + sb.Append("\n"); + sb.Append(" Int64: "); + if (Int64.IsSet) + { + sb.Append(Int64.Value); + } + sb.Append("\n"); + sb.Append(" UnsignedLong: "); + if (UnsignedLong.IsSet) + { + sb.Append(UnsignedLong.Value); + } + sb.Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" Float: "); + if (Float.IsSet) + { + sb.Append(Float.Value); + } + sb.Append("\n"); + sb.Append(" Double: "); + if (Double.IsSet) + { + sb.Append(Double.Value); + } + sb.Append("\n"); + sb.Append(" Decimal: "); + if (Decimal.IsSet) + { + sb.Append(Decimal.Value); + } + sb.Append("\n"); + sb.Append(" String: "); + if (String.IsSet) + { + sb.Append(String.Value); + } + sb.Append("\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Binary: "); + if (Binary.IsSet) + { + sb.Append(Binary.Value); + } + sb.Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); - sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); - sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n"); + sb.Append(" PatternWithDigits: "); + if (PatternWithDigits.IsSet) + { + sb.Append(PatternWithDigits.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithDigitsAndDelimiter: "); + if (PatternWithDigitsAndDelimiter.IsSet) + { + sb.Append(PatternWithDigitsAndDelimiter.Value); + } + sb.Append("\n"); + sb.Append(" PatternWithBackslash: "); + if (PatternWithBackslash.IsSet) + { + sb.Append(PatternWithBackslash.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 7eb55b8a1664..d748392bb4a7 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -75,8 +75,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Foo: "); + if (Foo.IsSet) + { + sb.Append(Foo.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 1ed1c2a45c81..ec783764ed0a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -54,7 +54,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HealthCheckResult {\n"); - sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); + sb.Append(" NullableMessage: "); + if (NullableMessage.IsSet) + { + sb.Append(NullableMessage.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs index 2b23003966a3..bddb4d71910a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class List {\n"); - sb.Append(" Var123List: ").Append(Var123List).Append("\n"); + sb.Append(" Var123List: "); + if (Var123List.IsSet) + { + sb.Append(Var123List.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 9a15c8a66079..b6bd469479f1 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -72,8 +72,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LiteralStringClass {\n"); - sb.Append(" EscapedLiteralString: ").Append(EscapedLiteralString).Append("\n"); - sb.Append(" UnescapedLiteralString: ").Append(UnescapedLiteralString).Append("\n"); + sb.Append(" EscapedLiteralString: "); + if (EscapedLiteralString.IsSet) + { + sb.Append(EscapedLiteralString.Value); + } + sb.Append("\n"); + sb.Append(" UnescapedLiteralString: "); + if (UnescapedLiteralString.IsSet) + { + sb.Append(UnescapedLiteralString.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index f00bcc5d3a5d..a8b92d487e7a 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -117,10 +117,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: "); + if (MapMapOfString.IsSet) + { + sb.Append(MapMapOfString.Value); + } + sb.Append("\n"); + sb.Append(" MapOfEnumString: "); + if (MapOfEnumString.IsSet) + { + sb.Append(MapOfEnumString.Value); + } + sb.Append("\n"); + sb.Append(" DirectMap: "); + if (DirectMap.IsSet) + { + sb.Append(DirectMap.Value); + } + sb.Append("\n"); + sb.Append(" IndirectMap: "); + if (IndirectMap.IsSet) + { + sb.Append(IndirectMap.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs index c525fea244cf..c5745bf1cd62 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs @@ -439,35 +439,155 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); + sb.Append(" ShopId: "); + if (ShopId.IsSet) + { + sb.Append(ShopId.Value); + } + sb.Append("\n"); + sb.Append(" TotalPrice: "); + if (TotalPrice.IsSet) + { + sb.Append(TotalPrice.Value); + } + sb.Append("\n"); sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); + sb.Append(" SomeCode: "); + if (SomeCode.IsSet) + { + sb.Append(SomeCode.Value); + } + sb.Append("\n"); + sb.Append(" BatchNumber: "); + if (BatchNumber.IsSet) + { + sb.Append(BatchNumber.Value); + } + sb.Append("\n"); + sb.Append(" BrandCode: "); + if (BrandCode.IsSet) + { + sb.Append(BrandCode.Value); + } + sb.Append("\n"); + sb.Append(" BrandId: "); + if (BrandId.IsSet) + { + sb.Append(BrandId.Value); + } + sb.Append("\n"); + sb.Append(" BrandName: "); + if (BrandName.IsSet) + { + sb.Append(BrandName.Value); + } + sb.Append("\n"); + sb.Append(" CategoryCode: "); + if (CategoryCode.IsSet) + { + sb.Append(CategoryCode.Value); + } + sb.Append("\n"); + sb.Append(" Color: "); + if (Color.IsSet) + { + sb.Append(Color.Value); + } + sb.Append("\n"); + sb.Append(" ColorDescription: "); + if (ColorDescription.IsSet) + { + sb.Append(ColorDescription.Value); + } + sb.Append("\n"); + sb.Append(" Comment: "); + if (Comment.IsSet) + { + sb.Append(Comment.Value); + } + sb.Append("\n"); + sb.Append(" CommercialProductCode: "); + if (CommercialProductCode.IsSet) + { + sb.Append(CommercialProductCode.Value); + } + sb.Append("\n"); + sb.Append(" ProductLineCode: "); + if (ProductLineCode.IsSet) + { + sb.Append(ProductLineCode.Value); + } + sb.Append("\n"); + sb.Append(" Country: "); + if (Country.IsSet) + { + sb.Append(Country.Value); + } + sb.Append("\n"); + sb.Append(" CreatedBy: "); + if (CreatedBy.IsSet) + { + sb.Append(CreatedBy.Value); + } + sb.Append("\n"); + sb.Append(" CreatedByFirstName: "); + if (CreatedByFirstName.IsSet) + { + sb.Append(CreatedByFirstName.Value); + } + sb.Append("\n"); + sb.Append(" CreatedByLastName: "); + if (CreatedByLastName.IsSet) + { + sb.Append(CreatedByLastName.Value); + } + sb.Append("\n"); + sb.Append(" DeltaECalculationRepaired: "); + if (DeltaECalculationRepaired.IsSet) + { + sb.Append(DeltaECalculationRepaired.Value); + } + sb.Append("\n"); + sb.Append(" DeltaECalculationSprayout: "); + if (DeltaECalculationSprayout.IsSet) + { + sb.Append(DeltaECalculationSprayout.Value); + } + sb.Append("\n"); + sb.Append(" OwnColorVariantNumber: "); + if (OwnColorVariantNumber.IsSet) + { + sb.Append(OwnColorVariantNumber.Value); + } + sb.Append("\n"); + sb.Append(" PrimerProductId: "); + if (PrimerProductId.IsSet) + { + sb.Append(PrimerProductId.Value); + } + sb.Append("\n"); + sb.Append(" ProductId: "); + if (ProductId.IsSet) + { + sb.Append(ProductId.Value); + } + sb.Append("\n"); + sb.Append(" ProductName: "); + if (ProductName.IsSet) + { + sb.Append(ProductName.Value); + } + sb.Append("\n"); + sb.Append(" SelectedVersionIndex: "); + if (SelectedVersionIndex.IsSet) + { + sb.Append(SelectedVersionIndex.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index b43e4efd8996..6c53830fa357 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedAnyOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index 15ac8a1e916c..ca80e54819ac 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedOneOf {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Content: "); + if (Content.IsSet) + { + sb.Append(Content.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 368e42264537..1e96bfa4a8b5 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -98,10 +98,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" UuidWithPattern: ").Append(UuidWithPattern).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" UuidWithPattern: "); + if (UuidWithPattern.IsSet) + { + sb.Append(UuidWithPattern.Value); + } + sb.Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" DateTime: "); + if (DateTime.IsSet) + { + sb.Append(DateTime.Value); + } + sb.Append("\n"); + sb.Append(" Map: "); + if (Map.IsSet) + { + sb.Append(Map.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 52eaa61d304f..f04a27359679 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MixedSubId {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index 3d792ce6dfb2..358f7b618bcb 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -67,8 +67,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); + sb.Append(" Class: "); + if (Class.IsSet) + { + sb.Append(Class.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 886afad37b2b..c1678b723dc7 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" VarClient: "); + if (VarClient.IsSet) + { + sb.Append(VarClient.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs index de6bab58bf98..fbf1c658c51e 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -101,9 +101,24 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" VarName: ").Append(VarName).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" Var123Number: ").Append(Var123Number).Append("\n"); + sb.Append(" SnakeCase: "); + if (SnakeCase.IsSet) + { + sb.Append(SnakeCase.Value); + } + sb.Append("\n"); + sb.Append(" Property: "); + if (Property.IsSet) + { + sb.Append(Property.Value); + } + sb.Append("\n"); + sb.Append(" Var123Number: "); + if (Var123Number.IsSet) + { + sb.Append(Var123Number.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 7d36d0e45b24..dbf314a6b265 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -160,18 +160,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); - sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); - sb.Append(" DateProp: ").Append(DateProp).Append("\n"); - sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); - sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" IntegerProp: "); + if (IntegerProp.IsSet) + { + sb.Append(IntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NumberProp: "); + if (NumberProp.IsSet) + { + sb.Append(NumberProp.Value); + } + sb.Append("\n"); + sb.Append(" BooleanProp: "); + if (BooleanProp.IsSet) + { + sb.Append(BooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" StringProp: "); + if (StringProp.IsSet) + { + sb.Append(StringProp.Value); + } + sb.Append("\n"); + sb.Append(" DateProp: "); + if (DateProp.IsSet) + { + sb.Append(DateProp.Value); + } + sb.Append("\n"); + sb.Append(" DatetimeProp: "); + if (DatetimeProp.IsSet) + { + sb.Append(DatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayNullableProp: "); + if (ArrayNullableProp.IsSet) + { + sb.Append(ArrayNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: "); + if (ArrayAndItemsNullableProp.IsSet) + { + sb.Append(ArrayAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ArrayItemsNullable: "); + if (ArrayItemsNullable.IsSet) + { + sb.Append(ArrayItemsNullable.Value); + } + sb.Append("\n"); + sb.Append(" ObjectNullableProp: "); + if (ObjectNullableProp.IsSet) + { + sb.Append(ObjectNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectAndItemsNullableProp: "); + if (ObjectAndItemsNullableProp.IsSet) + { + sb.Append(ObjectAndItemsNullableProp.Value); + } + sb.Append("\n"); + sb.Append(" ObjectItemsNullable: "); + if (ObjectItemsNullable.IsSet) + { + sb.Append(ObjectItemsNullable.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs index 074829f84e1d..fca71d010b99 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -55,7 +55,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NullableGuidClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 779002654b86..31367f0e7fa7 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -57,7 +57,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); + sb.Append(" JustNumber: "); + if (JustNumber.IsSet) + { + sb.Append(JustNumber.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 14f63201b432..6c2a57379426 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -96,10 +96,30 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); - sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" Uuid: "); + if (Uuid.IsSet) + { + sb.Append(Uuid.Value); + } + sb.Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" DeprecatedRef: "); + if (DeprecatedRef.IsSet) + { + sb.Append(DeprecatedRef.Value); + } + sb.Append("\n"); + sb.Append(" Bars: "); + if (Bars.IsSet) + { + sb.Append(Bars.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs index 2794c6cdebb8..8a76c24419de 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -127,12 +127,42 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" PetId: "); + if (PetId.IsSet) + { + sb.Append(PetId.Value); + } + sb.Append("\n"); + sb.Append(" Quantity: "); + if (Quantity.IsSet) + { + sb.Append(Quantity.Value); + } + sb.Append("\n"); + sb.Append(" ShipDate: "); + if (ShipDate.IsSet) + { + sb.Append(ShipDate.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); + sb.Append(" Complete: "); + if (Complete.IsSet) + { + sb.Append(Complete.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index d2a36e0c4e14..2ce39a784b42 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -75,9 +75,24 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append(" MyNumber: "); + if (MyNumber.IsSet) + { + sb.Append(MyNumber.Value); + } + sb.Append("\n"); + sb.Append(" MyString: "); + if (MyString.IsSet) + { + sb.Append(MyString.Value); + } + sb.Append("\n"); + sb.Append(" MyBoolean: "); + if (MyBoolean.IsSet) + { + sb.Append(MyBoolean.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs index 37b991a381f7..62171bf29103 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -147,12 +147,32 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Category: "); + if (Category.IsSet) + { + sb.Append(Category.Value); + } + sb.Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: "); + if (Tags.IsSet) + { + sb.Append(Tags.Value); + } + sb.Append("\n"); + sb.Append(" Status: "); + if (Status.IsSet) + { + sb.Append(Status.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index b88eec27ce78..6dafef19a15e 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -73,8 +73,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); + sb.Append(" Bar: "); + if (Bar.IsSet) + { + sb.Append(Bar.Value); + } + sb.Append("\n"); + sb.Append(" Baz: "); + if (Baz.IsSet) + { + sb.Append(Baz.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index e757b34fed38..303b45d9703d 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -811,48 +811,158 @@ public override string ToString() sb.Append("class RequiredClass {\n"); sb.Append(" RequiredNullableIntegerProp: ").Append(RequiredNullableIntegerProp).Append("\n"); sb.Append(" RequiredNotnullableintegerProp: ").Append(RequiredNotnullableintegerProp).Append("\n"); - sb.Append(" NotRequiredNullableIntegerProp: ").Append(NotRequiredNullableIntegerProp).Append("\n"); - sb.Append(" NotRequiredNotnullableintegerProp: ").Append(NotRequiredNotnullableintegerProp).Append("\n"); + sb.Append(" NotRequiredNullableIntegerProp: "); + if (NotRequiredNullableIntegerProp.IsSet) + { + sb.Append(NotRequiredNullableIntegerProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableintegerProp: "); + if (NotRequiredNotnullableintegerProp.IsSet) + { + sb.Append(NotRequiredNotnullableintegerProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableStringProp: ").Append(RequiredNullableStringProp).Append("\n"); sb.Append(" RequiredNotnullableStringProp: ").Append(RequiredNotnullableStringProp).Append("\n"); - sb.Append(" NotrequiredNullableStringProp: ").Append(NotrequiredNullableStringProp).Append("\n"); - sb.Append(" NotrequiredNotnullableStringProp: ").Append(NotrequiredNotnullableStringProp).Append("\n"); + sb.Append(" NotrequiredNullableStringProp: "); + if (NotrequiredNullableStringProp.IsSet) + { + sb.Append(NotrequiredNullableStringProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableStringProp: "); + if (NotrequiredNotnullableStringProp.IsSet) + { + sb.Append(NotrequiredNotnullableStringProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableBooleanProp: ").Append(RequiredNullableBooleanProp).Append("\n"); sb.Append(" RequiredNotnullableBooleanProp: ").Append(RequiredNotnullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNullableBooleanProp: ").Append(NotrequiredNullableBooleanProp).Append("\n"); - sb.Append(" NotrequiredNotnullableBooleanProp: ").Append(NotrequiredNotnullableBooleanProp).Append("\n"); + sb.Append(" NotrequiredNullableBooleanProp: "); + if (NotrequiredNullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNullableBooleanProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableBooleanProp: "); + if (NotrequiredNotnullableBooleanProp.IsSet) + { + sb.Append(NotrequiredNotnullableBooleanProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableDateProp: ").Append(RequiredNullableDateProp).Append("\n"); sb.Append(" RequiredNotNullableDateProp: ").Append(RequiredNotNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNullableDateProp: ").Append(NotRequiredNullableDateProp).Append("\n"); - sb.Append(" NotRequiredNotnullableDateProp: ").Append(NotRequiredNotnullableDateProp).Append("\n"); + sb.Append(" NotRequiredNullableDateProp: "); + if (NotRequiredNullableDateProp.IsSet) + { + sb.Append(NotRequiredNullableDateProp.Value); + } + sb.Append("\n"); + sb.Append(" NotRequiredNotnullableDateProp: "); + if (NotRequiredNotnullableDateProp.IsSet) + { + sb.Append(NotRequiredNotnullableDateProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableDatetimeProp: ").Append(RequiredNotnullableDatetimeProp).Append("\n"); sb.Append(" RequiredNullableDatetimeProp: ").Append(RequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNullableDatetimeProp: ").Append(NotrequiredNullableDatetimeProp).Append("\n"); - sb.Append(" NotrequiredNotnullableDatetimeProp: ").Append(NotrequiredNotnullableDatetimeProp).Append("\n"); + sb.Append(" NotrequiredNullableDatetimeProp: "); + if (NotrequiredNullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNullableDatetimeProp.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableDatetimeProp: "); + if (NotrequiredNotnullableDatetimeProp.IsSet) + { + sb.Append(NotrequiredNotnullableDatetimeProp.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumInteger: ").Append(RequiredNullableEnumInteger).Append("\n"); sb.Append(" RequiredNotnullableEnumInteger: ").Append(RequiredNotnullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNullableEnumInteger: ").Append(NotrequiredNullableEnumInteger).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumInteger: ").Append(NotrequiredNotnullableEnumInteger).Append("\n"); + sb.Append(" NotrequiredNullableEnumInteger: "); + if (NotrequiredNullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNullableEnumInteger.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumInteger: "); + if (NotrequiredNotnullableEnumInteger.IsSet) + { + sb.Append(NotrequiredNotnullableEnumInteger.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableEnumIntegerOnly: ").Append(RequiredNullableEnumIntegerOnly).Append("\n"); sb.Append(" RequiredNotnullableEnumIntegerOnly: ").Append(RequiredNotnullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNullableEnumIntegerOnly: ").Append(NotrequiredNullableEnumIntegerOnly).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumIntegerOnly: ").Append(NotrequiredNotnullableEnumIntegerOnly).Append("\n"); + sb.Append(" NotrequiredNullableEnumIntegerOnly: "); + if (NotrequiredNullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNullableEnumIntegerOnly.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumIntegerOnly: "); + if (NotrequiredNotnullableEnumIntegerOnly.IsSet) + { + sb.Append(NotrequiredNotnullableEnumIntegerOnly.Value); + } + sb.Append("\n"); sb.Append(" RequiredNotnullableEnumString: ").Append(RequiredNotnullableEnumString).Append("\n"); sb.Append(" RequiredNullableEnumString: ").Append(RequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNullableEnumString: ").Append(NotrequiredNullableEnumString).Append("\n"); - sb.Append(" NotrequiredNotnullableEnumString: ").Append(NotrequiredNotnullableEnumString).Append("\n"); + sb.Append(" NotrequiredNullableEnumString: "); + if (NotrequiredNullableEnumString.IsSet) + { + sb.Append(NotrequiredNullableEnumString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableEnumString: "); + if (NotrequiredNotnullableEnumString.IsSet) + { + sb.Append(NotrequiredNotnullableEnumString.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableOuterEnumDefaultValue: ").Append(RequiredNullableOuterEnumDefaultValue).Append("\n"); sb.Append(" RequiredNotnullableOuterEnumDefaultValue: ").Append(RequiredNotnullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNullableOuterEnumDefaultValue: ").Append(NotrequiredNullableOuterEnumDefaultValue).Append("\n"); - sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: ").Append(NotrequiredNotnullableOuterEnumDefaultValue).Append("\n"); + sb.Append(" NotrequiredNullableOuterEnumDefaultValue: "); + if (NotrequiredNullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableOuterEnumDefaultValue: "); + if (NotrequiredNotnullableOuterEnumDefaultValue.IsSet) + { + sb.Append(NotrequiredNotnullableOuterEnumDefaultValue.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableUuid: ").Append(RequiredNullableUuid).Append("\n"); sb.Append(" RequiredNotnullableUuid: ").Append(RequiredNotnullableUuid).Append("\n"); - sb.Append(" NotrequiredNullableUuid: ").Append(NotrequiredNullableUuid).Append("\n"); - sb.Append(" NotrequiredNotnullableUuid: ").Append(NotrequiredNotnullableUuid).Append("\n"); + sb.Append(" NotrequiredNullableUuid: "); + if (NotrequiredNullableUuid.IsSet) + { + sb.Append(NotrequiredNullableUuid.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableUuid: "); + if (NotrequiredNotnullableUuid.IsSet) + { + sb.Append(NotrequiredNotnullableUuid.Value); + } + sb.Append("\n"); sb.Append(" RequiredNullableArrayOfString: ").Append(RequiredNullableArrayOfString).Append("\n"); sb.Append(" RequiredNotnullableArrayOfString: ").Append(RequiredNotnullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNullableArrayOfString: ").Append(NotrequiredNullableArrayOfString).Append("\n"); - sb.Append(" NotrequiredNotnullableArrayOfString: ").Append(NotrequiredNotnullableArrayOfString).Append("\n"); + sb.Append(" NotrequiredNullableArrayOfString: "); + if (NotrequiredNullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNullableArrayOfString.Value); + } + sb.Append("\n"); + sb.Append(" NotrequiredNotnullableArrayOfString: "); + if (NotrequiredNotnullableArrayOfString.IsSet) + { + sb.Append(NotrequiredNotnullableArrayOfString.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs index 2c54aa6d0f94..475cd5784baa 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -93,10 +93,20 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" VarReturn: ").Append(VarReturn).Append("\n"); + sb.Append(" VarReturn: "); + if (VarReturn.IsSet) + { + sb.Append(VarReturn.Value); + } + sb.Append("\n"); sb.Append(" Lock: ").Append(Lock).Append("\n"); sb.Append(" Abstract: ").Append(Abstract).Append("\n"); - sb.Append(" Unsafe: ").Append(Unsafe).Append("\n"); + sb.Append(" Unsafe: "); + if (Unsafe.IsSet) + { + sb.Append(Unsafe.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 0dfc2f79b282..013a25063bbd 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -72,8 +72,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHash {\n"); - sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" RoleUuid: "); + if (RoleUuid.IsSet) + { + sb.Append(RoleUuid.Value); + } + sb.Append("\n"); + sb.Append(" Role: "); + if (Role.IsSet) + { + sb.Append(Role.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 4419232281d0..b701342db5b7 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RolesReportsHashRole {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 0fda9845e694..5505f1893d80 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -67,8 +67,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" VarSpecialModelName: ").Append(VarSpecialModelName).Append("\n"); + sb.Append(" SpecialPropertyName: "); + if (SpecialPropertyName.IsSet) + { + sb.Append(SpecialPropertyName.Value); + } + sb.Append("\n"); + sb.Append(" VarSpecialModelName: "); + if (VarSpecialModelName.IsSet) + { + sb.Append(VarSpecialModelName.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs index b9352a9bb413..08a9b31e1819 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -67,8 +67,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Name: "); + if (Name.IsSet) + { + sb.Append(Name.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 6976c91fa72b..d2196b76a454 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordList {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Value: "); + if (Value.IsSet) + { + sb.Append(Value.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index a64e3bdc9257..3b75b24a37e6 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -59,7 +59,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestCollectionEndingWithWordListObject {\n"); - sb.Append(" TestCollectionEndingWithWordList: ").Append(TestCollectionEndingWithWordList).Append("\n"); + sb.Append(" TestCollectionEndingWithWordList: "); + if (TestCollectionEndingWithWordList.IsSet) + { + sb.Append(TestCollectionEndingWithWordList.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 0558ae173f90..2dce5a796d44 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -66,7 +66,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n"); - sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n"); + sb.Append(" SomeProperty: "); + if (SomeProperty.IsSet) + { + sb.Append(SomeProperty.Value); + } + sb.Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs index 7530720a4be1..9cc3d00f2d57 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -182,18 +182,78 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); - sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); - sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" Id: "); + if (Id.IsSet) + { + sb.Append(Id.Value); + } + sb.Append("\n"); + sb.Append(" Username: "); + if (Username.IsSet) + { + sb.Append(Username.Value); + } + sb.Append("\n"); + sb.Append(" FirstName: "); + if (FirstName.IsSet) + { + sb.Append(FirstName.Value); + } + sb.Append("\n"); + sb.Append(" LastName: "); + if (LastName.IsSet) + { + sb.Append(LastName.Value); + } + sb.Append("\n"); + sb.Append(" Email: "); + if (Email.IsSet) + { + sb.Append(Email.Value); + } + sb.Append("\n"); + sb.Append(" Password: "); + if (Password.IsSet) + { + sb.Append(Password.Value); + } + sb.Append("\n"); + sb.Append(" Phone: "); + if (Phone.IsSet) + { + sb.Append(Phone.Value); + } + sb.Append("\n"); + sb.Append(" UserStatus: "); + if (UserStatus.IsSet) + { + sb.Append(UserStatus.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: "); + if (ObjectWithNoDeclaredProps.IsSet) + { + sb.Append(ObjectWithNoDeclaredProps.Value); + } + sb.Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: "); + if (ObjectWithNoDeclaredPropsNullable.IsSet) + { + sb.Append(ObjectWithNoDeclaredPropsNullable.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypeProp: "); + if (AnyTypeProp.IsSet) + { + sb.Append(AnyTypeProp.Value); + } + sb.Append("\n"); + sb.Append(" AnyTypePropNullable: "); + if (AnyTypePropNullable.IsSet) + { + sb.Append(AnyTypePropNullable.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs index ad91a4843711..4e14ed548a53 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -80,8 +80,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Whale {\n"); - sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n"); - sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n"); + sb.Append(" HasBaleen: "); + if (HasBaleen.IsSet) + { + sb.Append(HasBaleen.Value); + } + sb.Append("\n"); + sb.Append(" HasTeeth: "); + if (HasTeeth.IsSet) + { + sb.Append(HasTeeth.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 5136a7f92fb6..d66f5e68beba 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -107,7 +107,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Zebra {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Type: "); + if (Type.IsSet) + { + sb.Append(Type.Value); + } + sb.Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 624f9bfeb849..fe8f08f1dc0f 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -73,7 +73,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ZeroBasedEnumClass {\n"); - sb.Append(" ZeroBasedEnum: ").Append(ZeroBasedEnum).Append("\n"); + sb.Append(" ZeroBasedEnum: "); + if (ZeroBasedEnum.IsSet) + { + sb.Append(ZeroBasedEnum.Value); + } + sb.Append("\n"); sb.Append("}\n"); return sb.ToString(); } From e4a4afb10a19b744538c3b52651d3919f8c221e0 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 3 Nov 2025 17:29:41 +0100 Subject: [PATCH 37/44] Fix csharp async api deep object management --- .../src/main/resources/csharp/api.mustache | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index 1dbc732928b7..18d09c36ed27 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -609,7 +609,15 @@ namespace {{packageName}}.{{apiPackage}} {{#required}} {{#isDeepObject}} {{#items.vars}} + {{#required}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + {{/required}} + {{^required}} + if ({{paramName}}.{{name}}.IsSet) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}}.Value)); + } + {{/required}} {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); @@ -624,10 +632,15 @@ namespace {{packageName}}.{{apiPackage}} { {{#isDeepObject}} {{#items.vars}} - if ({{paramName}}.Value.{{name}} != null) + {{#required}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.Value.{{name}})); + {{/required}} + {{^required}} + if ({{paramName}}.Value.{{name}}.IsSet) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.Value.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.Value.{{name}}.Value)); } + {{/required}} {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}}.Value)); From cf24a1a72bea693707b10adb07a07970a80796aa Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Mon, 3 Nov 2025 17:29:53 +0100 Subject: [PATCH 38/44] Fix tests --- .../src/Org.OpenAPITools.Test/CustomTest.cs | 2 +- .../src/Org.OpenAPITools/Api/QueryApi.cs | 26 +++++++------------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs index 9a5acbb58528..1f197f7625cd 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs @@ -26,7 +26,7 @@ public void TestEchoBodyPet() Assert.Equal(12345L, p.Id.Value); // response is empty body - Pet p2 = bodyApi.TestEchoBodyPet(null); + Pet p2 = bodyApi.TestEchoBodyPet(); Assert.Null(p2); } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs index 92ed6d51c805..a111c4620baf 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs @@ -1311,29 +1311,23 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory if (queryObject.IsSet) { - if (queryObject.Value.Id != null) - { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Value.Id)); - } - if (queryObject.Value.Name != null) - { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Value.Name)); - } - if (queryObject.Value.Category != null) + if (queryObject.Value.Id.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Value.Category)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Value.Id.Value)); } - if (queryObject.Value.PhotoUrls != null) + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Value.Name)); + if (queryObject.Value.Category.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.Value.PhotoUrls)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Value.Category.Value)); } - if (queryObject.Value.Tags != null) + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.Value.PhotoUrls)); + if (queryObject.Value.Tags.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Value.Tags)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Value.Tags.Value)); } - if (queryObject.Value.Status != null) + if (queryObject.Value.Status.IsSet) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Value.Status)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Value.Status.Value)); } } From 30ef0b5110cecac086b5cff1a4a1708975e5529d Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 4 Nov 2025 09:47:39 +0100 Subject: [PATCH 39/44] Extract getNullablePropertyType and getNullableSchemaType --- .../languages/AbstractCSharpCodegen.java | 23 ++++++++----------- .../languages/CSharpClientCodegen.java | 20 ++++++++++++++++ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index fd86835ee36d..5602d78cb933 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -44,7 +44,6 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; -import static org.openapitools.codegen.CodegenConstants.*; import static org.openapitools.codegen.languages.CSharpClientCodegen.GENERICHOST; import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -1164,12 +1163,7 @@ protected void processOperation(CodegenOperation operation) { } String[] nestedTypes = {"List", "Collection", "ICollection", "Dictionary"}; - String dataType = operation.returnProperty.items.dataType; - if (!GENERICHOST.equals(getLibrary())) { - if (operation.returnProperty.items.isNullable && (this.nullReferenceTypesFlag || operation.returnProperty.items.isEnum || getValueTypes().contains(dataType)) && !dataType.endsWith("?")) { - dataType += "?"; - } - } + String dataType = getNullablePropertyType(operation.returnProperty.items); for (String nestedType : nestedTypes) { if (operation.returnType.contains("<" + nestedType + ">")) { @@ -1442,18 +1436,21 @@ private String getArrayTypeDeclaration(Schema arr) { String arrayType = typeMapping.get("array"); StringBuilder instantiationType = new StringBuilder(arrayType); Schema items = ModelUtils.getSchemaItems(arr); - String nestedType = getTypeDeclaration(items); + String nestedType = getNullableSchemaType(items); - if (!GENERICHOST.equals(getLibrary())) { - if (ModelUtils.isNullable(items) && (this.nullReferenceTypesFlag || ModelUtils.isEnumSchema(items) || getValueTypes().contains(nestedType)) && !nestedType.endsWith("?")) { - nestedType += "?"; - } - } // TODO: We may want to differentiate here between generics and primitive arrays. instantiationType.append("<").append(nestedType).append(">"); return instantiationType.toString(); } + protected String getNullablePropertyType(CodegenProperty property) { + return property.dataType; + } + + protected String getNullableSchemaType(Schema items) { + return getTypeDeclaration(items); + } + @Override public String toInstantiationType(Schema p) { if (ModelUtils.isArraySchema(p)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 8bf3a05f0af3..703f3ea5c227 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -1704,4 +1704,24 @@ public Map postProcessSupportingFileData(Map obj generateYAMLSpecFile(objs); return objs; } + + protected String getNullablePropertyType(CodegenProperty property) { + String dataType = super.getNullablePropertyType(property); + if (!GENERICHOST.equals(getLibrary())) { + if (property.isNullable && (this.nullReferenceTypesFlag || property.isEnum || getValueTypes().contains(dataType)) && !dataType.endsWith("?")) { + dataType += "?"; + } + } + return dataType; + } + + protected String getNullableSchemaType(Schema items) { + String nestedType = super.getNullableSchemaType(items); + if (!GENERICHOST.equals(getLibrary())) { + if (ModelUtils.isNullable(items) && (this.nullReferenceTypesFlag || ModelUtils.isEnumSchema(items) || getValueTypes().contains(nestedType)) && !nestedType.endsWith("?")) { + nestedType += "?"; + } + } + return nestedType; + } } From 356ac914b386b47a85d7aaa94e2b6c7205d7550e Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 4 Nov 2025 11:03:47 +0100 Subject: [PATCH 40/44] Clean --- .mvn/.develocity/develocity-workspace-id | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .mvn/.develocity/develocity-workspace-id diff --git a/.mvn/.develocity/develocity-workspace-id b/.mvn/.develocity/develocity-workspace-id deleted file mode 100644 index 487f2bbfc511..000000000000 --- a/.mvn/.develocity/develocity-workspace-id +++ /dev/null @@ -1 +0,0 @@ -vry6ndrjebbgjatruxxl37vo3q \ No newline at end of file From 4bb52d7c3ac858027edd95c788aa2860122a6bb4 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 4 Nov 2025 12:03:01 +0100 Subject: [PATCH 41/44] Fix api_doc generation --- .../main/resources/csharp/api_doc.mustache | 7 ++++++- .../echo_api/csharp-restsharp/docs/BodyApi.md | 16 +++++++-------- .../echo_api/csharp-restsharp/docs/FormApi.md | 4 ++-- .../csharp-restsharp/docs/HeaderApi.md | 2 +- .../csharp-restsharp/docs/QueryApi.md | 20 +++++++++---------- .../csharp-complex-files/docs/MultipartApi.md | 6 +++--- .../standard2.0/Petstore/docs/FakeApi.md | 16 +++++++-------- .../standard2.0/Petstore/docs/PetApi.md | 8 ++++---- .../net4.7/MultipleFrameworks/docs/PetApi.md | 6 +++--- .../restsharp/net4.7/Petstore/docs/FakeApi.md | 16 +++++++-------- .../restsharp/net4.7/Petstore/docs/PetApi.md | 8 ++++---- .../restsharp/net4.8/Petstore/docs/FakeApi.md | 16 +++++++-------- .../restsharp/net4.8/Petstore/docs/PetApi.md | 8 ++++---- .../net7/EnumMappings/docs/FakeApi.md | 16 +++++++-------- .../net7/EnumMappings/docs/PetApi.md | 8 ++++---- .../restsharp/net7/Petstore/docs/FakeApi.md | 16 +++++++-------- .../restsharp/net7/Petstore/docs/PetApi.md | 8 ++++---- .../ConditionalSerialization/docs/FakeApi.md | 16 +++++++-------- .../ConditionalSerialization/docs/PetApi.md | 8 ++++---- .../standard2.0/Petstore/docs/FakeApi.md | 16 +++++++-------- .../standard2.0/Petstore/docs/PetApi.md | 8 ++++---- .../standard2.0/Petstore/docs/FakeApi.md | 16 +++++++-------- .../standard2.0/Petstore/docs/PetApi.md | 8 ++++---- 23 files changed, 129 insertions(+), 124 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache index ba2229afeb88..f4a22a497ba7 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache @@ -15,7 +15,12 @@ All URIs are relative to *{{{basePath}}}* {{#operation}} # **{{{operationId}}}** -> {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}}{{^useGenericHost}}{{>NullConditionalParameter}}{{/useGenericHost}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) +{{#useGenericHost}} +> {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) +{{/useGenericHost}} +{{^useGenericHost}} +> {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = {{>DefaultDataTypeParameter}}{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) +{{/useGenericHost}} {{{summary}}}{{#notes}} diff --git a/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md b/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md index aa757ab96397..53c9747dca5d 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md @@ -103,7 +103,7 @@ No authorization required # **TestBodyApplicationOctetstreamBinary** -> string TestBodyApplicationOctetstreamBinary (System.IO.Stream body = null) +> string TestBodyApplicationOctetstreamBinary (Option body = default(Option)) Test body parameter(s) @@ -285,7 +285,7 @@ No authorization required # **TestBodyMultipartFormdataSingleBinary** -> string TestBodyMultipartFormdataSingleBinary (System.IO.Stream myFile = null) +> string TestBodyMultipartFormdataSingleBinary (Option myFile = default(Option)) Test single binary in multipart mime @@ -376,7 +376,7 @@ No authorization required # **TestEchoBodyAllOfPet** -> Pet TestEchoBodyAllOfPet (Pet pet = null) +> Pet TestEchoBodyAllOfPet (Option pet = default(Option)) Test body parameter(s) @@ -467,7 +467,7 @@ No authorization required # **TestEchoBodyFreeFormObjectResponseString** -> string TestEchoBodyFreeFormObjectResponseString (Object body = null) +> string TestEchoBodyFreeFormObjectResponseString (Option body = default(Option)) Test free form object @@ -558,7 +558,7 @@ No authorization required # **TestEchoBodyPet** -> Pet TestEchoBodyPet (Pet pet = null) +> Pet TestEchoBodyPet (Option pet = default(Option)) Test body parameter(s) @@ -649,7 +649,7 @@ No authorization required # **TestEchoBodyPetResponseString** -> string TestEchoBodyPetResponseString (Pet pet = null) +> string TestEchoBodyPetResponseString (Option pet = default(Option)) Test empty response body @@ -740,7 +740,7 @@ No authorization required # **TestEchoBodyStringEnum** -> StringEnumRef TestEchoBodyStringEnum (string body = null) +> StringEnumRef TestEchoBodyStringEnum (Option body = default(Option)) Test string enum response body @@ -831,7 +831,7 @@ No authorization required # **TestEchoBodyTagResponseString** -> string TestEchoBodyTagResponseString (Tag tag = null) +> string TestEchoBodyTagResponseString (Option tag = default(Option)) Test empty json (request body) diff --git a/samples/client/echo_api/csharp-restsharp/docs/FormApi.md b/samples/client/echo_api/csharp-restsharp/docs/FormApi.md index a652ec70ae96..bcb12af1ca02 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/FormApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/FormApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://localhost:3000* # **TestFormIntegerBooleanString** -> string TestFormIntegerBooleanString (int integerForm = null, bool booleanForm = null, string stringForm = null) +> string TestFormIntegerBooleanString (Option integerForm = default(Option), Option booleanForm = default(Option), Option stringForm = default(Option)) Test form parameter(s) @@ -196,7 +196,7 @@ No authorization required # **TestFormOneof** -> string TestFormOneof (string form1 = null, int form2 = null, string form3 = null, bool form4 = null, long id = null, string name = null) +> string TestFormOneof (Option form1 = default(Option), Option form2 = default(Option), Option form3 = default(Option), Option form4 = default(Option), Option id = default(Option), Option name = default(Option)) Test form parameter(s) for oneOf schema diff --git a/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md b/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md index 470386948bf7..e28461ef9a32 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md @@ -8,7 +8,7 @@ All URIs are relative to *http://localhost:3000* # **TestHeaderIntegerBooleanStringEnums** -> string TestHeaderIntegerBooleanStringEnums (int integerHeader = null, bool booleanHeader = null, string stringHeader = null, string enumNonrefStringHeader = null, StringEnumRef enumRefStringHeader = null) +> string TestHeaderIntegerBooleanStringEnums (Option integerHeader = default(Option), Option booleanHeader = default(Option), Option stringHeader = default(Option), Option enumNonrefStringHeader = default(Option), Option enumRefStringHeader = default(Option)) Test header parameter(s) diff --git a/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md b/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md index 8dd2160afe18..a5e9c40b0652 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md @@ -17,7 +17,7 @@ All URIs are relative to *http://localhost:3000* # **TestEnumRefString** -> string TestEnumRefString (string enumNonrefStringQuery = null, StringEnumRef enumRefStringQuery = null) +> string TestEnumRefString (Option enumNonrefStringQuery = default(Option), Option enumRefStringQuery = default(Option)) Test query parameter(s) @@ -110,7 +110,7 @@ No authorization required # **TestQueryDatetimeDateString** -> string TestQueryDatetimeDateString (DateTime datetimeQuery = null, DateOnly dateQuery = null, string stringQuery = null) +> string TestQueryDatetimeDateString (Option datetimeQuery = default(Option), Option dateQuery = default(Option), Option stringQuery = default(Option)) Test query parameter(s) @@ -205,7 +205,7 @@ No authorization required # **TestQueryIntegerBooleanString** -> string TestQueryIntegerBooleanString (int integerQuery = null, bool booleanQuery = null, string stringQuery = null) +> string TestQueryIntegerBooleanString (Option integerQuery = default(Option), Option booleanQuery = default(Option), Option stringQuery = default(Option)) Test query parameter(s) @@ -300,7 +300,7 @@ No authorization required # **TestQueryStyleDeepObjectExplodeTrueObject** -> string TestQueryStyleDeepObjectExplodeTrueObject (Pet queryObject = null) +> string TestQueryStyleDeepObjectExplodeTrueObject (Option queryObject = default(Option)) Test query parameter(s) @@ -391,7 +391,7 @@ No authorization required # **TestQueryStyleDeepObjectExplodeTrueObjectAllOf** -> string TestQueryStyleDeepObjectExplodeTrueObjectAllOf (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = null) +> string TestQueryStyleDeepObjectExplodeTrueObjectAllOf (Option queryObject = default(Option)) Test query parameter(s) @@ -482,7 +482,7 @@ No authorization required # **TestQueryStyleFormExplodeFalseArrayInteger** -> string TestQueryStyleFormExplodeFalseArrayInteger (List queryObject = null) +> string TestQueryStyleFormExplodeFalseArrayInteger (Option> queryObject = default(Option>)) Test query parameter(s) @@ -573,7 +573,7 @@ No authorization required # **TestQueryStyleFormExplodeFalseArrayString** -> string TestQueryStyleFormExplodeFalseArrayString (List queryObject = null) +> string TestQueryStyleFormExplodeFalseArrayString (Option> queryObject = default(Option>)) Test query parameter(s) @@ -664,7 +664,7 @@ No authorization required # **TestQueryStyleFormExplodeTrueArrayString** -> string TestQueryStyleFormExplodeTrueArrayString (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = null) +> string TestQueryStyleFormExplodeTrueArrayString (Option queryObject = default(Option)) Test query parameter(s) @@ -755,7 +755,7 @@ No authorization required # **TestQueryStyleFormExplodeTrueObject** -> string TestQueryStyleFormExplodeTrueObject (Pet queryObject = null) +> string TestQueryStyleFormExplodeTrueObject (Option queryObject = default(Option)) Test query parameter(s) @@ -846,7 +846,7 @@ No authorization required # **TestQueryStyleFormExplodeTrueObjectAllOf** -> string TestQueryStyleFormExplodeTrueObjectAllOf (DataQuery queryObject = null) +> string TestQueryStyleFormExplodeTrueObjectAllOf (Option queryObject = default(Option)) Test query parameter(s) diff --git a/samples/client/others/csharp-complex-files/docs/MultipartApi.md b/samples/client/others/csharp-complex-files/docs/MultipartApi.md index 23628f526032..ba5774548432 100644 --- a/samples/client/others/csharp-complex-files/docs/MultipartApi.md +++ b/samples/client/others/csharp-complex-files/docs/MultipartApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://localhost* # **MultipartArray** -> void MultipartArray (List files = null) +> void MultipartArray (Option> files = default(Option>)) @@ -95,7 +95,7 @@ No authorization required # **MultipartMixed** -> void MultipartMixed (MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = null, List statusArray = null) +> void MultipartMixed (MultipartMixedStatus status, System.IO.Stream file, Option marker = default(Option), Option> statusArray = default(Option>)) @@ -186,7 +186,7 @@ No authorization required # **MultipartSingle** -> void MultipartSingle (System.IO.Stream file = null) +> void MultipartSingle (Option file = default(Option)) diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FakeApi.md index d0443f10572c..4084efa1013d 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FakeApi.md @@ -115,7 +115,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (Option body = default(Option)) @@ -208,7 +208,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (Option outerComposite = default(Option)) @@ -301,7 +301,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (Option body = default(Option)) @@ -394,7 +394,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, Option body = default(Option)) @@ -1115,7 +1115,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, FileParameter binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1237,7 +1237,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) To test enum parameters @@ -1343,7 +1343,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) Fake endpoint to test group parameters (optional) @@ -1716,7 +1716,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/PetApi.md index fbe6c1f5aa65..e524f0e13e7c 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/PetApi.md +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/PetApi.md @@ -108,7 +108,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, Option apiKey = default(Option)) Deletes a pet @@ -600,7 +600,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, Option name = default(Option), Option status = default(Option)) Updates a pet in the store with form data @@ -696,7 +696,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, FileParameter file = null) +> ApiResponse UploadFile (long petId, Option additionalMetadata = default(Option), Option file = default(Option)) uploads an image @@ -796,7 +796,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, FileParameter requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, FileParameter requiredFile, Option additionalMetadata = default(Option)) uploads an image (required) diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/docs/PetApi.md index e812ce5ff93a..fd8bbce1fb56 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/docs/PetApi.md +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/docs/PetApi.md @@ -108,7 +108,7 @@ catch (ApiException e) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, Option apiKey = default(Option)) Deletes a pet @@ -581,7 +581,7 @@ catch (ApiException e) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, Option name = default(Option), Option status = default(Option)) Updates a pet in the store with form data @@ -673,7 +673,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, Option additionalMetadata = default(Option), Option file = default(Option)) uploads an image diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FakeApi.md index b926dc908fd9..f336207bc965 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (Option body = default(Option)) @@ -200,7 +200,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (Option outerComposite = default(Option)) @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (Option body = default(Option)) @@ -378,7 +378,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, Option body = default(Option)) @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) To test enum parameters @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) Fake endpoint to test group parameters (optional) @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/PetApi.md index 220b1ae30105..00d969d075a8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/PetApi.md +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, Option apiKey = default(Option)) Deletes a pet @@ -576,7 +576,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, Option name = default(Option), Option status = default(Option)) Updates a pet in the store with form data @@ -668,7 +668,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, Option additionalMetadata = default(Option), Option file = default(Option)) uploads an image @@ -764,7 +764,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)) uploads an image (required) diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FakeApi.md index b926dc908fd9..f336207bc965 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (Option body = default(Option)) @@ -200,7 +200,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (Option outerComposite = default(Option)) @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (Option body = default(Option)) @@ -378,7 +378,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, Option body = default(Option)) @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) To test enum parameters @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) Fake endpoint to test group parameters (optional) @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/PetApi.md index 220b1ae30105..00d969d075a8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/PetApi.md +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, Option apiKey = default(Option)) Deletes a pet @@ -576,7 +576,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, Option name = default(Option), Option status = default(Option)) Updates a pet in the store with form data @@ -668,7 +668,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, Option additionalMetadata = default(Option), Option file = default(Option)) uploads an image @@ -764,7 +764,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)) uploads an image (required) diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/FakeApi.md index f45d0a14d397..34ebca57bf1f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (Option body = default(Option)) @@ -200,7 +200,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (Option outerComposite = default(Option)) @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (Option body = default(Option)) @@ -378,7 +378,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, Option body = default(Option)) @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateOnly date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) To test enum parameters @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) Fake endpoint to test group parameters (optional) @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/PetApi.md index 220b1ae30105..00d969d075a8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/PetApi.md +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, Option apiKey = default(Option)) Deletes a pet @@ -576,7 +576,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, Option name = default(Option), Option status = default(Option)) Updates a pet in the store with form data @@ -668,7 +668,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, Option additionalMetadata = default(Option), Option file = default(Option)) uploads an image @@ -764,7 +764,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)) uploads an image (required) diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/FakeApi.md index f45d0a14d397..34ebca57bf1f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (Option body = default(Option)) @@ -200,7 +200,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (Option outerComposite = default(Option)) @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (Option body = default(Option)) @@ -378,7 +378,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, Option body = default(Option)) @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateOnly date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) To test enum parameters @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) Fake endpoint to test group parameters (optional) @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md index 220b1ae30105..00d969d075a8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, Option apiKey = default(Option)) Deletes a pet @@ -576,7 +576,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, Option name = default(Option), Option status = default(Option)) Updates a pet in the store with form data @@ -668,7 +668,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, Option additionalMetadata = default(Option), Option file = default(Option)) uploads an image @@ -764,7 +764,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)) uploads an image (required) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FakeApi.md index b926dc908fd9..f336207bc965 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (Option body = default(Option)) @@ -200,7 +200,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (Option outerComposite = default(Option)) @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (Option body = default(Option)) @@ -378,7 +378,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, Option body = default(Option)) @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) To test enum parameters @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) Fake endpoint to test group parameters (optional) @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/PetApi.md index 220b1ae30105..00d969d075a8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/PetApi.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, Option apiKey = default(Option)) Deletes a pet @@ -576,7 +576,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, Option name = default(Option), Option status = default(Option)) Updates a pet in the store with form data @@ -668,7 +668,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, Option additionalMetadata = default(Option), Option file = default(Option)) uploads an image @@ -764,7 +764,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)) uploads an image (required) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FakeApi.md index b926dc908fd9..f336207bc965 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (Option body = default(Option)) @@ -200,7 +200,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (Option outerComposite = default(Option)) @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (Option body = default(Option)) @@ -378,7 +378,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, Option body = default(Option)) @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) To test enum parameters @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) Fake endpoint to test group parameters (optional) @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/PetApi.md index 220b1ae30105..00d969d075a8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/PetApi.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, Option apiKey = default(Option)) Deletes a pet @@ -576,7 +576,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, Option name = default(Option), Option status = default(Option)) Updates a pet in the store with form data @@ -668,7 +668,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, Option additionalMetadata = default(Option), Option file = default(Option)) uploads an image @@ -764,7 +764,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)) uploads an image (required) diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FakeApi.md index b926dc908fd9..f336207bc965 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FakeApi.md +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FakeApi.md @@ -111,7 +111,7 @@ No authorization required # **FakeOuterBooleanSerialize** -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (Option body = default(Option)) @@ -200,7 +200,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (Option outerComposite = default(Option)) @@ -289,7 +289,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (Option body = default(Option)) @@ -378,7 +378,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null) +> string FakeOuterStringSerialize (Guid requiredStringUuid, Option body = default(Option)) @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default(Option), Option int32 = default(Option), Option int64 = default(Option), Option varFloat = default(Option), Option varString = default(Option), Option binary = default(Option), Option date = default(Option), Option dateTime = default(Option), Option password = default(Option), Option callback = default(Option)) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (Option> enumHeaderStringArray = default(Option>), Option enumHeaderString = default(Option), Option> enumQueryStringArray = default(Option>), Option enumQueryString = default(Option), Option enumQueryInteger = default(Option), Option enumQueryDouble = default(Option), Option> enumFormStringArray = default(Option>), Option enumFormString = default(Option)) To test enum parameters @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default(Option), Option booleanGroup = default(Option), Option int64Group = default(Option)) Fake endpoint to test group parameters (optional) @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable = default(Option), Option notRequiredNullable = default(Option)) diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/PetApi.md index 220b1ae30105..00d969d075a8 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/PetApi.md +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, Option apiKey = default(Option)) Deletes a pet @@ -576,7 +576,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, Option name = default(Option), Option status = default(Option)) Updates a pet in the store with form data @@ -668,7 +668,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, Option additionalMetadata = default(Option), Option file = default(Option)) uploads an image @@ -764,7 +764,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, Option additionalMetadata = default(Option)) uploads an image (required) From e9590cdaacbf954f69b92ea88f3d9d0b15fa9dba Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 4 Nov 2025 12:40:25 +0100 Subject: [PATCH 42/44] Update api_doc.mustache --- .../src/main/resources/csharp/api_doc.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache index f4a22a497ba7..7469f7bf45c9 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache @@ -80,10 +80,10 @@ namespace Example {{/useHttpClient}} {{#allParams}} {{#isPrimitiveType}} - var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + var {{paramName}} = {{{example}}}; // {{{dataType}}}{{^useGenericHost}}{{>NullConditionalParameter}}{{/useGenericHost}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/isPrimitiveType}} {{^isPrimitiveType}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}}{{^useGenericHost}}{{>NullConditionalParameter}}{{/useGenericHost}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/isPrimitiveType}} {{/allParams}} From 84b3ef535bc48bab556afc5e5389527c822f95fe Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 4 Nov 2025 15:25:16 +0100 Subject: [PATCH 43/44] Refactor : use getNullableSchemaType in getTypeDeclaration - also, remove the last GENERICHOST reference remaining --- .../codegen/languages/AbstractCSharpCodegen.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 5602d78cb933..3ab51d107de0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -44,7 +44,6 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; -import static org.openapitools.codegen.languages.CSharpClientCodegen.GENERICHOST; import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -1466,12 +1465,7 @@ public String getTypeDeclaration(Schema p) { } else if (ModelUtils.isMapSchema(p)) { // Should we also support maps of maps? Schema inner = ModelUtils.getAdditionalProperties(p); - String typeDeclaration = getTypeDeclaration(inner); - if (!GENERICHOST.equals(getLibrary())) { - if (ModelUtils.isNullable(inner) && (this.nullReferenceTypesFlag || ModelUtils.isEnumSchema(inner) || getValueTypes().contains(typeDeclaration)) && !typeDeclaration.endsWith("?")) { - typeDeclaration += "?"; - } - } + String typeDeclaration = getNullableSchemaType(inner); return getSchemaType(p) + ""; } return super.getTypeDeclaration(p); From 1a11e8fbe1dfc2ced25e9d016976d6dd6c9ab3a4 Mon Sep 17 00:00:00 2001 From: Olivier Leonard Date: Tue, 4 Nov 2025 15:29:36 +0100 Subject: [PATCH 44/44] Refactor : rename getNullableSchemaType to getNullableTypeDeclaration getNullablePropertyType to getNullableTypeDeclaration --- .../codegen/languages/AbstractCSharpCodegen.java | 12 +++++------- .../codegen/languages/CSharpClientCodegen.java | 8 ++++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 3ab51d107de0..9fd3b750abf7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -1162,7 +1162,7 @@ protected void processOperation(CodegenOperation operation) { } String[] nestedTypes = {"List", "Collection", "ICollection", "Dictionary"}; - String dataType = getNullablePropertyType(operation.returnProperty.items); + String dataType = getNullableTypeDeclaration(operation.returnProperty.items); for (String nestedType : nestedTypes) { if (operation.returnType.contains("<" + nestedType + ">")) { @@ -1435,18 +1435,17 @@ private String getArrayTypeDeclaration(Schema arr) { String arrayType = typeMapping.get("array"); StringBuilder instantiationType = new StringBuilder(arrayType); Schema items = ModelUtils.getSchemaItems(arr); - String nestedType = getNullableSchemaType(items); // TODO: We may want to differentiate here between generics and primitive arrays. - instantiationType.append("<").append(nestedType).append(">"); + instantiationType.append("<").append(getNullableTypeDeclaration(items)).append(">"); return instantiationType.toString(); } - protected String getNullablePropertyType(CodegenProperty property) { + protected String getNullableTypeDeclaration(CodegenProperty property) { return property.dataType; } - protected String getNullableSchemaType(Schema items) { + protected String getNullableTypeDeclaration(Schema items) { return getTypeDeclaration(items); } @@ -1465,8 +1464,7 @@ public String getTypeDeclaration(Schema p) { } else if (ModelUtils.isMapSchema(p)) { // Should we also support maps of maps? Schema inner = ModelUtils.getAdditionalProperties(p); - String typeDeclaration = getNullableSchemaType(inner); - return getSchemaType(p) + ""; + return getSchemaType(p) + ""; } return super.getTypeDeclaration(p); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 703f3ea5c227..1fa342a13ea9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -1705,8 +1705,8 @@ public Map postProcessSupportingFileData(Map obj return objs; } - protected String getNullablePropertyType(CodegenProperty property) { - String dataType = super.getNullablePropertyType(property); + protected String getNullableTypeDeclaration(CodegenProperty property) { + String dataType = super.getNullableTypeDeclaration(property); if (!GENERICHOST.equals(getLibrary())) { if (property.isNullable && (this.nullReferenceTypesFlag || property.isEnum || getValueTypes().contains(dataType)) && !dataType.endsWith("?")) { dataType += "?"; @@ -1715,8 +1715,8 @@ protected String getNullablePropertyType(CodegenProperty property) { return dataType; } - protected String getNullableSchemaType(Schema items) { - String nestedType = super.getNullableSchemaType(items); + protected String getNullableTypeDeclaration(Schema items) { + String nestedType = super.getNullableTypeDeclaration(items); if (!GENERICHOST.equals(getLibrary())) { if (ModelUtils.isNullable(items) && (this.nullReferenceTypesFlag || ModelUtils.isEnumSchema(items) || getValueTypes().contains(nestedType)) && !nestedType.endsWith("?")) { nestedType += "?";