fix csharp enum issue after rebase

This commit is contained in:
wing328 2016-04-27 22:06:47 +08:00
parent 4419e71d4b
commit 0310d95800
44 changed files with 690 additions and 915 deletions

View File

@ -1301,7 +1301,8 @@ public class DefaultCodegen {
} }
} }
if (p instanceof BaseIntegerProperty) { // type is integer and without format
if (p instanceof BaseIntegerProperty && !(p instanceof IntegerProperty) && !(p instanceof LongProperty)) {
BaseIntegerProperty sp = (BaseIntegerProperty) p; BaseIntegerProperty sp = (BaseIntegerProperty) p;
property.isInteger = true; property.isInteger = true;
/*if (sp.getEnum() != null) { /*if (sp.getEnum() != null) {
@ -1367,7 +1368,8 @@ public class DefaultCodegen {
property.isByteArray = true; property.isByteArray = true;
} }
if (p instanceof DecimalProperty) { // type is number and without format
if (p instanceof DecimalProperty && !(p instanceof DoubleProperty) && !(p instanceof FloatProperty)) {
DecimalProperty sp = (DecimalProperty) p; DecimalProperty sp = (DecimalProperty) p;
property.isFloat = true; property.isFloat = true;
/*if (sp.getEnum() != null) { /*if (sp.getEnum() != null) {

View File

@ -9,7 +9,7 @@
/// <summary> /// <summary>
/// Enum {{name}} for {{{value}}} /// Enum {{name}} for {{{value}}}
/// </summary> /// </summary>
[EnumMember(Value = {{{value}}})] [EnumMember(Value = {{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isFloat}}"{{/isFloat}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isFloat}}"{{/isFloat}})]
{{name}}{{^-last}}, {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^-last}},
{{/-last}}{{#-last}}{{/-last}}{{/enumVars}}{{/allowableValues}} {{/-last}}{{/enumVars}}{{/allowableValues}}
} }

View File

@ -13,145 +13,7 @@ using Newtonsoft.Json.Converters;
{{#model}} {{#model}}
namespace {{packageName}}.Model namespace {{packageName}}.Model
{ {
/// <summary> {{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>modelGeneric}}{{/isEnum}}
/// {{description}}
/// </summary>
[DataContract]
public partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}} IEquatable<{{classname}}>
{ {{#vars}}{{#isEnum}}
/// <summary>
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
/// </summary>{{#description}}
/// <value>{{{description}}}</value>{{/description}}
[JsonConverter(typeof(StringEnumConverter))]
{{>enumClass}}{{/isEnum}}{{#items.isEnum}}{{#items}}
{{>enumClass}}{{/items}}{{/items.isEnum}}{{/vars}}
{{#vars}}{{#isEnum}}
/// <summary>
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
/// </summary>{{#description}}
/// <value>{{{description}}}</value>{{/description}}
[DataMember(Name="{{baseName}}", EmitDefaultValue={{emitDefaultValue}})]
public {{{datatypeWithEnum}}} {{name}} { get; set; }
{{/isEnum}}{{/vars}}
/// <summary>
/// Initializes a new instance of the <see cref="{{classname}}" /> class.
/// Initializes a new instance of the <see cref="{{classname}}" />class.
/// </summary>
{{#vars}}{{^isReadOnly}} /// <param name="{{name}}">{{#description}}{{description}}{{/description}}{{^description}}{{name}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{defaultValue}}){{/defaultValue}}.</param>
{{/isReadOnly}}{{/vars}}
public {{classname}}({{#vars}}{{^isReadOnly}}{{{datatypeWithEnum}}} {{name}} = null{{/isReadOnly}}{{#hasMoreNonReadOnly}}, {{/hasMoreNonReadOnly}}{{/vars}})
{
{{#vars}}{{^isReadOnly}}{{#required}}// to ensure "{{name}}" is required (not null)
if ({{name}} == null)
{
throw new InvalidDataException("{{name}} is a required property for {{classname}} and cannot be null");
}
else
{
this.{{name}} = {{name}};
}
{{/required}}{{/isReadOnly}}{{/vars}}{{#vars}}{{^isReadOnly}}{{^required}}{{#defaultValue}}// use default value if no "{{name}}" provided
if ({{name}} == null)
{
this.{{name}} = {{{defaultValue}}};
}
else
{
this.{{name}} = {{name}};
}
{{/defaultValue}}{{^defaultValue}}this.{{name}} = {{name}};
{{/defaultValue}}{{/required}}{{/isReadOnly}}{{/vars}}
}
{{#vars}}{{^isEnum}}
/// <summary>
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
/// </summary>{{#description}}
/// <value>{{description}}</value>{{/description}}
[DataMember(Name="{{baseName}}", EmitDefaultValue={{emitDefaultValue}})]
public {{{datatype}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
{{/isEnum}}{{/vars}}
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class {{classname}} {\n");
{{#vars}}
sb.Append(" {{name}}: ").Append({{name}}).Append("\n");
{{/vars}}
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public {{#parent}} new {{/parent}}string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as {{classname}});
}
/// <summary>
/// Returns true if {{classname}} instances are equal
/// </summary>
/// <param name="other">Instance of {{classname}} to be compared</param>
/// <returns>Boolean</returns>
public bool Equals({{classname}} other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return {{#vars}}{{#isNotContainer}}
(
this.{{name}} == other.{{name}} ||
this.{{name}} != null &&
this.{{name}}.Equals(other.{{name}})
){{#hasMore}} && {{/hasMore}}{{/isNotContainer}}{{^isNotContainer}}
(
this.{{name}} == other.{{name}} ||
this.{{name}} != null &&
this.{{name}}.SequenceEqual(other.{{name}})
){{#hasMore}} && {{/hasMore}}{{/isNotContainer}}{{/vars}}{{^vars}}false{{/vars}};
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)
{{#vars}}
if (this.{{name}} != null)
hash = hash * 59 + this.{{name}}.GetHashCode();
{{/vars}}
return hash;
}
}
}
{{/model}} {{/model}}
{{/models}} {{/models}}
} }

View File

@ -3,23 +3,35 @@
/// </summary> /// </summary>
[DataContract] [DataContract]
public partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}} IEquatable<{{classname}}> public partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}} IEquatable<{{classname}}>
{ {{#vars}}{{#isEnum}} {
{{>modelInnerEnum}}{{/isEnum}}{{#items.isEnum}}{{#items}} {{#vars}}
{{>modelInnerEnum}}{{/items}}{{/items.isEnum}}{{/vars}} {{#isEnum}}
{{#vars}}{{#isEnum}} {{>modelInnerEnum}}
{{/isEnum}}
{{#items.isEnum}}
{{#items}}
{{>modelInnerEnum}}
{{/items}}
{{/items.isEnum}}
{{/vars}}
{{#vars}}
{{#isEnum}}
/// <summary> /// <summary>
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
/// </summary>{{#description}} /// </summary>{{#description}}
/// <value>{{{description}}}</value>{{/description}} /// <value>{{{description}}}</value>{{/description}}
[DataMember(Name="{{baseName}}", EmitDefaultValue={{emitDefaultValue}})] [DataMember(Name="{{baseName}}", EmitDefaultValue={{emitDefaultValue}})]
public {{{datatypeWithEnum}}}{{#isEnum}}?{{/isEnum}} {{name}} { get; set; } public {{{datatypeWithEnum}}}{{#isEnum}}?{{/isEnum}} {{name}} { get; set; }
{{/isEnum}}{{/vars}} {{/isEnum}}
{{/vars}}
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="{{classname}}" /> class. /// Initializes a new instance of the <see cref="{{classname}}" /> class.
/// Initializes a new instance of the <see cref="{{classname}}" />class.
/// </summary> /// </summary>
{{#vars}}{{^isReadOnly}} /// <param name="{{name}}">{{#description}}{{description}}{{/description}}{{^description}}{{name}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{defaultValue}}){{/defaultValue}}.</param> {{#vars}}
{{/isReadOnly}}{{/vars}} {{^isReadOnly}}
/// <param name="{{name}}">{{#description}}{{description}}{{/description}}{{^description}}{{name}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{defaultValue}}){{/defaultValue}}.</param>
{{/isReadOnly}}
{{/vars}}
public {{classname}}({{#vars}}{{^isReadOnly}}{{{datatypeWithEnum}}}{{#isEnum}}?{{/isEnum}} {{name}} = null{{#hasMore}}, {{/hasMore}}{{/isReadOnly}}{{/vars}}) public {{classname}}({{#vars}}{{^isReadOnly}}{{{datatypeWithEnum}}}{{#isEnum}}?{{/isEnum}} {{name}} = null{{#hasMore}}, {{/hasMore}}{{/isReadOnly}}{{/vars}})
{ {
{{#vars}}{{^isReadOnly}}{{#required}}// to ensure "{{name}}" is required (not null) {{#vars}}{{^isReadOnly}}{{#required}}// to ensure "{{name}}" is required (not null)
@ -31,7 +43,9 @@
{ {
this.{{name}} = {{name}}; this.{{name}} = {{name}};
} }
{{/required}}{{/isReadOnly}}{{/vars}}{{#vars}}{{^isReadOnly}}{{^required}}{{#defaultValue}}// use default value if no "{{name}}" provided {{/required}}{{/isReadOnly}}{{/vars}}
{{#vars}}{{^isReadOnly}}{{^required}}
{{#defaultValue}}// use default value if no "{{name}}" provided
if ({{name}} == null) if ({{name}} == null)
{ {
this.{{name}} = {{{defaultValue}}}; this.{{name}} = {{{defaultValue}}};
@ -40,18 +54,23 @@
{ {
this.{{name}} = {{name}}; this.{{name}} = {{name}};
} }
{{/defaultValue}}{{^defaultValue}}this.{{name}} = {{name}}; {{/defaultValue}}
{{/defaultValue}}{{/required}}{{/isReadOnly}}{{/vars}} {{^defaultValue}}
this.{{name}} = {{name}};
{{/defaultValue}}
{{/required}}{{/isReadOnly}}{{/vars}}
} }
{{#vars}}{{^isEnum}} {{#vars}}
{{^isEnum}}
/// <summary> /// <summary>
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
/// </summary>{{#description}} /// </summary>{{#description}}
/// <value>{{description}}</value>{{/description}} /// <value>{{description}}</value>{{/description}}
[DataMember(Name="{{baseName}}", EmitDefaultValue={{emitDefaultValue}})] [DataMember(Name="{{baseName}}", EmitDefaultValue={{emitDefaultValue}})]
public {{{datatype}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } public {{{datatype}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
{{/isEnum}}{{/vars}} {{/isEnum}}
{{/vars}}
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>

View File

@ -9,7 +9,7 @@
/// <summary> /// <summary>
/// Enum {{name}} for {{{value}}} /// Enum {{name}} for {{{value}}}
/// </summary> /// </summary>
[EnumMember(Value = {{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}})] [EnumMember(Value = {{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isFloat}}"{{/isFloat}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isFloat}}"{{/isFloat}})]
{{name}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^-last}}, {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^-last}},
{{/-last}}{{/enumVars}}{{/allowableValues}} {{/-last}}{{/enumVars}}{{/allowableValues}}
} }

View File

@ -106,7 +106,7 @@ class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}implements ArrayA
return {{#parent}}parent::getters() + {{/parent}}self::$getters; return {{#parent}}parent::getters() + {{/parent}}self::$getters;
} }
{{#vars}}{{#isEnum}}{{#allowableValues}}{{#enumVars}}const {{datatypeWithEnum}}_{{{name}}} = "{{{value}}}"; {{#vars}}{{#isEnum}}{{#allowableValues}}{{#enumVars}}const {{datatypeWithEnum}}_{{{name}}} = {{{value}}};
{{/enumVars}}{{/allowableValues}}{{/isEnum}}{{/vars}} {{/enumVars}}{{/allowableValues}}{{/isEnum}}{{/vars}}
{{#vars}}{{#isEnum}} {{#vars}}{{#isEnum}}

View File

@ -899,6 +899,33 @@ definitions:
format: password format: password
maxLength: 64 maxLength: 64
minLength: 10 minLength: 10
EnumClass:
type: string
default: '-efg'
enum:
- _abc
- '-efg'
- (xyz)
Enum_Test:
type: object
properties:
enum_string:
type: string
enum:
- UPPER
- lower
enum_integer:
type: integer
format: int32
enum:
- 1
- -1
enum_number:
type: number
format: double
enum:
- 1.1
- -1.2
externalDocs: externalDocs:
description: Find out more about Swagger description: Find out more about Swagger
url: 'http://swagger.io' url: 'http://swagger.io'

View File

@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- API version: 1.0.0 - API version: 1.0.0
- SDK version: 1.0.0 - SDK version: 1.0.0
- Build date: 2016-05-02T22:02:29.555+08:00 - Build date: 2016-04-27T22:04:12.906+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen - Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported ## Frameworks supported
@ -54,7 +54,7 @@ namespace Example
{ {
var apiInstance = new FakeApi(); var apiInstance = new FakeApi();
var number = 3.4; // double? | None var number = number_example; // string | None
var _double = 1.2; // double? | None var _double = 1.2; // double? | None
var _string = _string_example; // string | None var _string = _string_example; // string | None
var _byte = B; // byte[] | None var _byte = B; // byte[] | None
@ -117,6 +117,8 @@ Class | Method | HTTP request | Description
- [IO.Swagger.Model.Cat](docs/Cat.md) - [IO.Swagger.Model.Cat](docs/Cat.md)
- [IO.Swagger.Model.Category](docs/Category.md) - [IO.Swagger.Model.Category](docs/Category.md)
- [IO.Swagger.Model.Dog](docs/Dog.md) - [IO.Swagger.Model.Dog](docs/Dog.md)
- [IO.Swagger.Model.EnumClass](docs/EnumClass.md)
- [IO.Swagger.Model.EnumTest](docs/EnumTest.md)
- [IO.Swagger.Model.FormatTest](docs/FormatTest.md) - [IO.Swagger.Model.FormatTest](docs/FormatTest.md)
- [IO.Swagger.Model.Model200Response](docs/Model200Response.md) - [IO.Swagger.Model.Model200Response](docs/Model200Response.md)
- [IO.Swagger.Model.ModelReturn](docs/ModelReturn.md) - [IO.Swagger.Model.ModelReturn](docs/ModelReturn.md)

View File

@ -14,7 +14,6 @@ Name | Type | Description | Notes
**Binary** | **byte[]** | | [optional] **Binary** | **byte[]** | | [optional]
**Date** | **DateTime?** | | **Date** | **DateTime?** | |
**DateTime** | **DateTime?** | | [optional] **DateTime** | **DateTime?** | | [optional]
**Uuid** | **Guid?** | | [optional]
**Password** | **string** | | **Password** | **string** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -18,13 +17,10 @@ namespace IO.Swagger.Model
[DataContract] [DataContract]
public partial class Animal : IEquatable<Animal> public partial class Animal : IEquatable<Animal>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Animal" /> class. /// Initializes a new instance of the <see cref="Animal" /> class.
/// Initializes a new instance of the <see cref="Animal" />class.
/// </summary> /// </summary>
/// <param name="ClassName">ClassName (required).</param> /// <param name="ClassName">ClassName (required).</param>
public Animal(string ClassName = null) public Animal(string ClassName = null)
{ {
// to ensure "ClassName" is required (not null) // to ensure "ClassName" is required (not null)
@ -37,15 +33,14 @@ namespace IO.Swagger.Model
this.ClassName = ClassName; this.ClassName = ClassName;
} }
}
}
/// <summary> /// <summary>
/// Gets or Sets ClassName /// Gets or Sets ClassName
/// </summary> /// </summary>
[DataMember(Name="className", EmitDefaultValue=false)] [DataMember(Name="className", EmitDefaultValue=false)]
public string ClassName { get; set; } public string ClassName { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>

View File

@ -12,47 +12,44 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model namespace IO.Swagger.Model
{ {
/// <summary> /// <summary>
/// /// ApiResponse
/// </summary> /// </summary>
[DataContract] [DataContract]
public partial class ApiResponse : IEquatable<ApiResponse> public partial class ApiResponse : IEquatable<ApiResponse>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ApiResponse" /> class. /// Initializes a new instance of the <see cref="ApiResponse" /> class.
/// Initializes a new instance of the <see cref="ApiResponse" />class.
/// </summary> /// </summary>
/// <param name="Code">Code.</param> /// <param name="Code">Code.</param>
/// <param name="Type">Type.</param> /// <param name="Type">Type.</param>
/// <param name="Message">Message.</param> /// <param name="Message">Message.</param>
public ApiResponse(int? Code = null, string Type = null, string Message = null) public ApiResponse(int? Code = null, string Type = null, string Message = null)
{ {
this.Code = Code;
this.Type = Type;
this.Message = Message; this.Code = Code;
this.Type = Type;
this.Message = Message;
} }
/// <summary> /// <summary>
/// Gets or Sets Code /// Gets or Sets Code
/// </summary> /// </summary>
[DataMember(Name="code", EmitDefaultValue=false)] [DataMember(Name="code", EmitDefaultValue=false)]
public int? Code { get; set; } public int? Code { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Type /// Gets or Sets Type
/// </summary> /// </summary>
[DataMember(Name="type", EmitDefaultValue=false)] [DataMember(Name="type", EmitDefaultValue=false)]
public string Type { get; set; } public string Type { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Message /// Gets or Sets Message
/// </summary> /// </summary>
[DataMember(Name="message", EmitDefaultValue=false)] [DataMember(Name="message", EmitDefaultValue=false)]
public string Message { get; set; } public string Message { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -62,8 +59,8 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class ApiResponse {\n"); sb.Append("class ApiResponse {\n");
sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" Code: ").Append(Code).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }
@ -137,6 +134,6 @@ namespace IO.Swagger.Model
return hash; return hash;
} }
} }
} }
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -18,14 +17,11 @@ namespace IO.Swagger.Model
[DataContract] [DataContract]
public partial class Cat : Animal, IEquatable<Cat> public partial class Cat : Animal, IEquatable<Cat>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Cat" /> class. /// Initializes a new instance of the <see cref="Cat" /> class.
/// Initializes a new instance of the <see cref="Cat" />class.
/// </summary> /// </summary>
/// <param name="ClassName">ClassName (required).</param> /// <param name="ClassName">ClassName (required).</param>
/// <param name="Declawed">Declawed.</param> /// <param name="Declawed">Declawed.</param>
public Cat(string ClassName = null, bool? Declawed = null) public Cat(string ClassName = null, bool? Declawed = null)
{ {
// to ensure "ClassName" is required (not null) // to ensure "ClassName" is required (not null)
@ -37,23 +33,22 @@ namespace IO.Swagger.Model
{ {
this.ClassName = ClassName; this.ClassName = ClassName;
} }
this.Declawed = Declawed;
this.Declawed = Declawed;
} }
/// <summary> /// <summary>
/// Gets or Sets ClassName /// Gets or Sets ClassName
/// </summary> /// </summary>
[DataMember(Name="className", EmitDefaultValue=false)] [DataMember(Name="className", EmitDefaultValue=false)]
public string ClassName { get; set; } public string ClassName { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Declawed /// Gets or Sets Declawed
/// </summary> /// </summary>
[DataMember(Name="declawed", EmitDefaultValue=false)] [DataMember(Name="declawed", EmitDefaultValue=false)]
public bool? Declawed { get; set; } public bool? Declawed { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -63,7 +58,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Cat {\n"); sb.Append("class Cat {\n");
sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n");
sb.Append(" Declawed: ").Append(Declawed).Append("\n"); sb.Append(" Declawed: ").Append(Declawed).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -18,34 +17,31 @@ namespace IO.Swagger.Model
[DataContract] [DataContract]
public partial class Category : IEquatable<Category> public partial class Category : IEquatable<Category>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Category" /> class. /// Initializes a new instance of the <see cref="Category" /> class.
/// Initializes a new instance of the <see cref="Category" />class.
/// </summary> /// </summary>
/// <param name="Id">Id.</param> /// <param name="Id">Id.</param>
/// <param name="Name">Name.</param> /// <param name="Name">Name.</param>
public Category(long? Id = null, string Name = null) public Category(long? Id = null, string Name = null)
{ {
this.Id = Id;
this.Name = Name;
this.Id = Id;
this.Name = Name;
} }
/// <summary> /// <summary>
/// Gets or Sets Id /// Gets or Sets Id
/// </summary> /// </summary>
[DataMember(Name="id", EmitDefaultValue=false)] [DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; } public long? Id { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Name /// Gets or Sets Name
/// </summary> /// </summary>
[DataMember(Name="name", EmitDefaultValue=false)] [DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -55,7 +51,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Category {\n"); sb.Append("class Category {\n");
sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -18,14 +17,11 @@ namespace IO.Swagger.Model
[DataContract] [DataContract]
public partial class Dog : Animal, IEquatable<Dog> public partial class Dog : Animal, IEquatable<Dog>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Dog" /> class. /// Initializes a new instance of the <see cref="Dog" /> class.
/// Initializes a new instance of the <see cref="Dog" />class.
/// </summary> /// </summary>
/// <param name="ClassName">ClassName (required).</param> /// <param name="ClassName">ClassName (required).</param>
/// <param name="Breed">Breed.</param> /// <param name="Breed">Breed.</param>
public Dog(string ClassName = null, string Breed = null) public Dog(string ClassName = null, string Breed = null)
{ {
// to ensure "ClassName" is required (not null) // to ensure "ClassName" is required (not null)
@ -37,23 +33,22 @@ namespace IO.Swagger.Model
{ {
this.ClassName = ClassName; this.ClassName = ClassName;
} }
this.Breed = Breed;
this.Breed = Breed;
} }
/// <summary> /// <summary>
/// Gets or Sets ClassName /// Gets or Sets ClassName
/// </summary> /// </summary>
[DataMember(Name="className", EmitDefaultValue=false)] [DataMember(Name="className", EmitDefaultValue=false)]
public string ClassName { get; set; } public string ClassName { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Breed /// Gets or Sets Breed
/// </summary> /// </summary>
[DataMember(Name="breed", EmitDefaultValue=false)] [DataMember(Name="breed", EmitDefaultValue=false)]
public string Breed { get; set; } public string Breed { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -63,7 +58,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Dog {\n"); sb.Append("class Dog {\n");
sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n");
sb.Append(" Breed: ").Append(Breed).Append("\n"); sb.Append(" Breed: ").Append(Breed).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -78,42 +77,39 @@ namespace IO.Swagger.Model
NUMBER_MINUS_1_DOT_2 NUMBER_MINUS_1_DOT_2
} }
/// <summary> /// <summary>
/// Gets or Sets EnumString /// Gets or Sets EnumString
/// </summary> /// </summary>
[DataMember(Name="enum_string", EmitDefaultValue=false)] [DataMember(Name="enum_string", EmitDefaultValue=false)]
public EnumStringEnum? EnumString { get; set; } public EnumStringEnum? EnumString { get; set; }
/// <summary> /// <summary>
/// Gets or Sets EnumInteger /// Gets or Sets EnumInteger
/// </summary> /// </summary>
[DataMember(Name="enum_integer", EmitDefaultValue=false)] [DataMember(Name="enum_integer", EmitDefaultValue=false)]
public EnumIntegerEnum? EnumInteger { get; set; } public EnumIntegerEnum? EnumInteger { get; set; }
/// <summary> /// <summary>
/// Gets or Sets EnumNumber /// Gets or Sets EnumNumber
/// </summary> /// </summary>
[DataMember(Name="enum_number", EmitDefaultValue=false)] [DataMember(Name="enum_number", EmitDefaultValue=false)]
public EnumNumberEnum? EnumNumber { get; set; } public EnumNumberEnum? EnumNumber { get; set; }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="EnumTest" /> class. /// Initializes a new instance of the <see cref="EnumTest" /> class.
/// Initializes a new instance of the <see cref="EnumTest" />class.
/// </summary> /// </summary>
/// <param name="EnumString">EnumString.</param> /// <param name="EnumString">EnumString.</param>
/// <param name="EnumInteger">EnumInteger.</param> /// <param name="EnumInteger">EnumInteger.</param>
/// <param name="EnumNumber">EnumNumber.</param> /// <param name="EnumNumber">EnumNumber.</param>
public EnumTest(EnumStringEnum? EnumString = null, EnumIntegerEnum? EnumInteger = null, EnumNumberEnum? EnumNumber = null) public EnumTest(EnumStringEnum? EnumString = null, EnumIntegerEnum? EnumInteger = null, EnumNumberEnum? EnumNumber = null)
{ {
this.EnumString = EnumString;
this.EnumInteger = EnumInteger;
this.EnumNumber = EnumNumber; this.EnumString = EnumString;
this.EnumInteger = EnumInteger;
this.EnumNumber = EnumNumber;
} }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -123,9 +119,8 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class EnumTest {\n"); sb.Append("class EnumTest {\n");
sb.Append(" EnumString: ").Append(EnumString).Append("\n"); sb.Append(" EnumString: ").Append(EnumString).Append("\n");
sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n");
sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }
@ -190,16 +185,12 @@ namespace IO.Swagger.Model
{ {
int hash = 41; int hash = 41;
// Suitable nullity checks etc, of course :) // Suitable nullity checks etc, of course :)
if (this.EnumString != null) if (this.EnumString != null)
hash = hash * 59 + this.EnumString.GetHashCode(); hash = hash * 59 + this.EnumString.GetHashCode();
if (this.EnumInteger != null) if (this.EnumInteger != null)
hash = hash * 59 + this.EnumInteger.GetHashCode(); hash = hash * 59 + this.EnumInteger.GetHashCode();
if (this.EnumNumber != null) if (this.EnumNumber != null)
hash = hash * 59 + this.EnumNumber.GetHashCode(); hash = hash * 59 + this.EnumNumber.GetHashCode();
return hash; return hash;
} }
} }

View File

@ -12,15 +12,13 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model namespace IO.Swagger.Model
{ {
/// <summary> /// <summary>
/// /// FormatTest
/// </summary> /// </summary>
[DataContract] [DataContract]
public partial class FormatTest : IEquatable<FormatTest> public partial class FormatTest : IEquatable<FormatTest>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="FormatTest" /> class. /// Initializes a new instance of the <see cref="FormatTest" /> class.
/// Initializes a new instance of the <see cref="FormatTest" />class.
/// </summary> /// </summary>
/// <param name="Integer">Integer.</param> /// <param name="Integer">Integer.</param>
/// <param name="Int32">Int32.</param> /// <param name="Int32">Int32.</param>
@ -33,10 +31,8 @@ namespace IO.Swagger.Model
/// <param name="Binary">Binary.</param> /// <param name="Binary">Binary.</param>
/// <param name="Date">Date (required).</param> /// <param name="Date">Date (required).</param>
/// <param name="DateTime">DateTime.</param> /// <param name="DateTime">DateTime.</param>
/// <param name="Uuid">Uuid.</param>
/// <param name="Password">Password (required).</param> /// <param name="Password">Password (required).</param>
public FormatTest(int? Integer = null, int? Int32 = null, long? Int64 = null, double? Number = null, float? _Float = null, double? _Double = null, string _String = null, byte[] _Byte = null, byte[] Binary = null, DateTime? Date = null, DateTime? DateTime = null, string Password = null)
public FormatTest(int? Integer = null, int? Int32 = null, long? Int64 = null, double? Number = null, float? _Float = null, double? _Double = null, string _String = null, byte[] _Byte = null, byte[] Binary = null, DateTime? Date = null, DateTime? DateTime = null, Guid? Uuid = null, string Password = null)
{ {
// to ensure "Number" is required (not null) // to ensure "Number" is required (not null)
if (Number == null) if (Number == null)
@ -74,97 +70,86 @@ namespace IO.Swagger.Model
{ {
this.Password = Password; this.Password = Password;
} }
this.Integer = Integer;
this.Int32 = Int32;
this.Int64 = Int64; this.Integer = Integer;
this._Float = _Float;
this._Double = _Double; this.Int32 = Int32;
this._String = _String;
this.Binary = Binary; this.Int64 = Int64;
this.DateTime = DateTime;
this.Uuid = Uuid; this._Float = _Float;
this._Double = _Double;
this._String = _String;
this.Binary = Binary;
this.DateTime = DateTime;
} }
/// <summary> /// <summary>
/// Gets or Sets Integer /// Gets or Sets Integer
/// </summary> /// </summary>
[DataMember(Name="integer", EmitDefaultValue=false)] [DataMember(Name="integer", EmitDefaultValue=false)]
public int? Integer { get; set; } public int? Integer { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Int32 /// Gets or Sets Int32
/// </summary> /// </summary>
[DataMember(Name="int32", EmitDefaultValue=false)] [DataMember(Name="int32", EmitDefaultValue=false)]
public int? Int32 { get; set; } public int? Int32 { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Int64 /// Gets or Sets Int64
/// </summary> /// </summary>
[DataMember(Name="int64", EmitDefaultValue=false)] [DataMember(Name="int64", EmitDefaultValue=false)]
public long? Int64 { get; set; } public long? Int64 { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Number /// Gets or Sets Number
/// </summary> /// </summary>
[DataMember(Name="number", EmitDefaultValue=false)] [DataMember(Name="number", EmitDefaultValue=false)]
public double? Number { get; set; } public double? Number { get; set; }
/// <summary> /// <summary>
/// Gets or Sets _Float /// Gets or Sets _Float
/// </summary> /// </summary>
[DataMember(Name="float", EmitDefaultValue=false)] [DataMember(Name="float", EmitDefaultValue=false)]
public float? _Float { get; set; } public float? _Float { get; set; }
/// <summary> /// <summary>
/// Gets or Sets _Double /// Gets or Sets _Double
/// </summary> /// </summary>
[DataMember(Name="double", EmitDefaultValue=false)] [DataMember(Name="double", EmitDefaultValue=false)]
public double? _Double { get; set; } public double? _Double { get; set; }
/// <summary> /// <summary>
/// Gets or Sets _String /// Gets or Sets _String
/// </summary> /// </summary>
[DataMember(Name="string", EmitDefaultValue=false)] [DataMember(Name="string", EmitDefaultValue=false)]
public string _String { get; set; } public string _String { get; set; }
/// <summary> /// <summary>
/// Gets or Sets _Byte /// Gets or Sets _Byte
/// </summary> /// </summary>
[DataMember(Name="byte", EmitDefaultValue=false)] [DataMember(Name="byte", EmitDefaultValue=false)]
public byte[] _Byte { get; set; } public byte[] _Byte { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Binary /// Gets or Sets Binary
/// </summary> /// </summary>
[DataMember(Name="binary", EmitDefaultValue=false)] [DataMember(Name="binary", EmitDefaultValue=false)]
public byte[] Binary { get; set; } public byte[] Binary { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Date /// Gets or Sets Date
/// </summary> /// </summary>
[DataMember(Name="date", EmitDefaultValue=false)] [DataMember(Name="date", EmitDefaultValue=false)]
public DateTime? Date { get; set; } public DateTime? Date { get; set; }
/// <summary> /// <summary>
/// Gets or Sets DateTime /// Gets or Sets DateTime
/// </summary> /// </summary>
[DataMember(Name="dateTime", EmitDefaultValue=false)] [DataMember(Name="dateTime", EmitDefaultValue=false)]
public DateTime? DateTime { get; set; } public DateTime? DateTime { get; set; }
/// <summary>
/// Gets or Sets Uuid
/// </summary>
[DataMember(Name="uuid", EmitDefaultValue=false)]
public Guid? Uuid { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Password /// Gets or Sets Password
/// </summary> /// </summary>
[DataMember(Name="password", EmitDefaultValue=false)] [DataMember(Name="password", EmitDefaultValue=false)]
public string Password { get; set; } public string Password { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -174,18 +159,17 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class FormatTest {\n"); sb.Append("class FormatTest {\n");
sb.Append(" Integer: ").Append(Integer).Append("\n"); sb.Append(" Integer: ").Append(Integer).Append("\n");
sb.Append(" Int32: ").Append(Int32).Append("\n"); sb.Append(" Int32: ").Append(Int32).Append("\n");
sb.Append(" Int64: ").Append(Int64).Append("\n"); sb.Append(" Int64: ").Append(Int64).Append("\n");
sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" _Float: ").Append(_Float).Append("\n"); sb.Append(" _Float: ").Append(_Float).Append("\n");
sb.Append(" _Double: ").Append(_Double).Append("\n"); sb.Append(" _Double: ").Append(_Double).Append("\n");
sb.Append(" _String: ").Append(_String).Append("\n"); sb.Append(" _String: ").Append(_String).Append("\n");
sb.Append(" _Byte: ").Append(_Byte).Append("\n"); sb.Append(" _Byte: ").Append(_Byte).Append("\n");
sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n");
sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n");
sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }
@ -277,11 +261,6 @@ namespace IO.Swagger.Model
this.DateTime != null && this.DateTime != null &&
this.DateTime.Equals(other.DateTime) this.DateTime.Equals(other.DateTime)
) && ) &&
(
this.Uuid == other.Uuid ||
this.Uuid != null &&
this.Uuid.Equals(other.Uuid)
) &&
( (
this.Password == other.Password || this.Password == other.Password ||
this.Password != null && this.Password != null &&
@ -322,13 +301,11 @@ namespace IO.Swagger.Model
hash = hash * 59 + this.Date.GetHashCode(); hash = hash * 59 + this.Date.GetHashCode();
if (this.DateTime != null) if (this.DateTime != null)
hash = hash * 59 + this.DateTime.GetHashCode(); hash = hash * 59 + this.DateTime.GetHashCode();
if (this.Uuid != null)
hash = hash * 59 + this.Uuid.GetHashCode();
if (this.Password != null) if (this.Password != null)
hash = hash * 59 + this.Password.GetHashCode(); hash = hash * 59 + this.Password.GetHashCode();
return hash; return hash;
} }
} }
} }
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -13,31 +12,28 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model namespace IO.Swagger.Model
{ {
/// <summary> /// <summary>
/// Model200Response /// Model for testing model name starting with number
/// </summary> /// </summary>
[DataContract] [DataContract]
public partial class Model200Response : IEquatable<Model200Response> public partial class Model200Response : IEquatable<Model200Response>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Model200Response" /> class. /// Initializes a new instance of the <see cref="Model200Response" /> class.
/// Initializes a new instance of the <see cref="Model200Response" />class.
/// </summary> /// </summary>
/// <param name="Name">Name.</param> /// <param name="Name">Name.</param>
public Model200Response(int? Name = null) public Model200Response(int? Name = null)
{ {
this.Name = Name;
this.Name = Name;
} }
/// <summary> /// <summary>
/// Gets or Sets Name /// Gets or Sets Name
/// </summary> /// </summary>
[DataMember(Name="name", EmitDefaultValue=false)] [DataMember(Name="name", EmitDefaultValue=false)]
public int? Name { get; set; } public int? Name { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -47,7 +43,6 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Model200Response {\n"); sb.Append("class Model200Response {\n");
sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }
@ -102,10 +97,8 @@ namespace IO.Swagger.Model
{ {
int hash = 41; int hash = 41;
// Suitable nullity checks etc, of course :) // Suitable nullity checks etc, of course :)
if (this.Name != null) if (this.Name != null)
hash = hash * 59 + this.Name.GetHashCode(); hash = hash * 59 + this.Name.GetHashCode();
return hash; return hash;
} }
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -13,31 +12,28 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model namespace IO.Swagger.Model
{ {
/// <summary> /// <summary>
/// ModelReturn /// Model for testing reserved words
/// </summary> /// </summary>
[DataContract] [DataContract]
public partial class ModelReturn : IEquatable<ModelReturn> public partial class ModelReturn : IEquatable<ModelReturn>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ModelReturn" /> class. /// Initializes a new instance of the <see cref="ModelReturn" /> class.
/// Initializes a new instance of the <see cref="ModelReturn" />class.
/// </summary> /// </summary>
/// <param name="_Return">_Return.</param> /// <param name="_Return">_Return.</param>
public ModelReturn(int? _Return = null) public ModelReturn(int? _Return = null)
{ {
this._Return = _Return;
this._Return = _Return;
} }
/// <summary> /// <summary>
/// Gets or Sets _Return /// Gets or Sets _Return
/// </summary> /// </summary>
[DataMember(Name="return", EmitDefaultValue=false)] [DataMember(Name="return", EmitDefaultValue=false)]
public int? _Return { get; set; } public int? _Return { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -47,7 +43,6 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class ModelReturn {\n"); sb.Append("class ModelReturn {\n");
sb.Append(" _Return: ").Append(_Return).Append("\n"); sb.Append(" _Return: ").Append(_Return).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }
@ -102,10 +97,8 @@ namespace IO.Swagger.Model
{ {
int hash = 41; int hash = 41;
// Suitable nullity checks etc, of course :) // Suitable nullity checks etc, of course :)
if (this._Return != null) if (this._Return != null)
hash = hash * 59 + this._Return.GetHashCode(); hash = hash * 59 + this._Return.GetHashCode();
return hash; return hash;
} }
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -13,39 +12,48 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model namespace IO.Swagger.Model
{ {
/// <summary> /// <summary>
/// Name /// Model for testing model name same as property name
/// </summary> /// </summary>
[DataContract] [DataContract]
public partial class Name : IEquatable<Name> public partial class Name : IEquatable<Name>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Name" /> class. /// Initializes a new instance of the <see cref="Name" /> class.
/// Initializes a new instance of the <see cref="Name" />class.
/// </summary> /// </summary>
/// <param name="_Name">_Name.</param> /// <param name="_Name">_Name (required).</param>
/// <param name="SnakeCase">SnakeCase.</param> /// <param name="Property">Property.</param>
public Name(int? _Name = null, string Property = null)
public Name(int? _Name = null, int? SnakeCase = null)
{ {
this._Name = _Name; // to ensure "_Name" is required (not null)
this.SnakeCase = SnakeCase; if (_Name == null)
{
throw new InvalidDataException("_Name is a required property for Name and cannot be null");
}
else
{
this._Name = _Name;
}
this.Property = Property;
} }
/// <summary> /// <summary>
/// Gets or Sets _Name /// Gets or Sets _Name
/// </summary> /// </summary>
[DataMember(Name="name", EmitDefaultValue=false)] [DataMember(Name="name", EmitDefaultValue=false)]
public int? _Name { get; set; } public int? _Name { get; set; }
/// <summary> /// <summary>
/// Gets or Sets SnakeCase /// Gets or Sets SnakeCase
/// </summary> /// </summary>
[DataMember(Name="snake_case", EmitDefaultValue=false)] [DataMember(Name="snake_case", EmitDefaultValue=false)]
public int? SnakeCase { get; set; } public int? SnakeCase { get; private set; }
/// <summary>
/// Gets or Sets Property
/// </summary>
[DataMember(Name="property", EmitDefaultValue=false)]
public string Property { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -55,8 +63,8 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Name {\n"); sb.Append("class Name {\n");
sb.Append(" _Name: ").Append(_Name).Append("\n"); sb.Append(" _Name: ").Append(_Name).Append("\n");
sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n");
sb.Append(" Property: ").Append(Property).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }
@ -102,6 +110,11 @@ namespace IO.Swagger.Model
this.SnakeCase == other.SnakeCase || this.SnakeCase == other.SnakeCase ||
this.SnakeCase != null && this.SnakeCase != null &&
this.SnakeCase.Equals(other.SnakeCase) this.SnakeCase.Equals(other.SnakeCase)
) &&
(
this.Property == other.Property ||
this.Property != null &&
this.Property.Equals(other.Property)
); );
} }
@ -116,13 +129,12 @@ namespace IO.Swagger.Model
{ {
int hash = 41; int hash = 41;
// Suitable nullity checks etc, of course :) // Suitable nullity checks etc, of course :)
if (this._Name != null) if (this._Name != null)
hash = hash * 59 + this._Name.GetHashCode(); hash = hash * 59 + this._Name.GetHashCode();
if (this.SnakeCase != null) if (this.SnakeCase != null)
hash = hash * 59 + this.SnakeCase.GetHashCode(); hash = hash * 59 + this.SnakeCase.GetHashCode();
if (this.Property != null)
hash = hash * 59 + this.Property.GetHashCode();
return hash; return hash;
} }
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -45,73 +44,72 @@ namespace IO.Swagger.Model
Delivered Delivered
} }
/// <summary> /// <summary>
/// Order Status /// Order Status
/// </summary> /// </summary>
/// <value>Order Status</value> /// <value>Order Status</value>
[DataMember(Name="status", EmitDefaultValue=false)] [DataMember(Name="status", EmitDefaultValue=false)]
public StatusEnum? Status { get; set; } public StatusEnum? Status { get; set; }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Order" /> class. /// Initializes a new instance of the <see cref="Order" /> class.
/// Initializes a new instance of the <see cref="Order" />class.
/// </summary> /// </summary>
/// <param name="Id">Id.</param>
/// <param name="PetId">PetId.</param> /// <param name="PetId">PetId.</param>
/// <param name="Quantity">Quantity.</param> /// <param name="Quantity">Quantity.</param>
/// <param name="ShipDate">ShipDate.</param> /// <param name="ShipDate">ShipDate.</param>
/// <param name="Status">Order Status (default to StatusEnum.Placed).</param> /// <param name="Status">Order Status.</param>
/// <param name="Complete">Complete.</param> /// <param name="Complete">Complete (default to false).</param>
public Order(long? Id = null, long? PetId = null, int? Quantity = null, DateTime? ShipDate = null, StatusEnum? Status = null, bool? Complete = null)
public Order(long? PetId = null, int? Quantity = null, DateTime? ShipDate = null, StatusEnum? Status = null, bool? Complete = null)
{ {
this.PetId = PetId;
this.Quantity = Quantity;
this.ShipDate = ShipDate; this.Id = Id;
// use default value if no "Status" provided
if (Status == null) this.PetId = PetId;
this.Quantity = Quantity;
this.ShipDate = ShipDate;
this.Status = Status;
// use default value if no "Complete" provided
if (Complete == null)
{ {
this.Status = StatusEnum.Placed; this.Complete = false;
} }
else else
{ {
this.Status = Status; this.Complete = Complete;
} }
this.Complete = Complete;
} }
/// <summary> /// <summary>
/// Gets or Sets Id /// Gets or Sets Id
/// </summary> /// </summary>
[DataMember(Name="id", EmitDefaultValue=false)] [DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; private set; } public long? Id { get; set; }
/// <summary> /// <summary>
/// Gets or Sets PetId /// Gets or Sets PetId
/// </summary> /// </summary>
[DataMember(Name="petId", EmitDefaultValue=false)] [DataMember(Name="petId", EmitDefaultValue=false)]
public long? PetId { get; set; } public long? PetId { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Quantity /// Gets or Sets Quantity
/// </summary> /// </summary>
[DataMember(Name="quantity", EmitDefaultValue=false)] [DataMember(Name="quantity", EmitDefaultValue=false)]
public int? Quantity { get; set; } public int? Quantity { get; set; }
/// <summary> /// <summary>
/// Gets or Sets ShipDate /// Gets or Sets ShipDate
/// </summary> /// </summary>
[DataMember(Name="shipDate", EmitDefaultValue=false)] [DataMember(Name="shipDate", EmitDefaultValue=false)]
public DateTime? ShipDate { get; set; } public DateTime? ShipDate { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Complete /// Gets or Sets Complete
/// </summary> /// </summary>
[DataMember(Name="complete", EmitDefaultValue=false)] [DataMember(Name="complete", EmitDefaultValue=false)]
public bool? Complete { get; set; } public bool? Complete { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -121,12 +119,11 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Order {\n"); sb.Append("class Order {\n");
sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" PetId: ").Append(PetId).Append("\n"); sb.Append(" PetId: ").Append(PetId).Append("\n");
sb.Append(" Quantity: ").Append(Quantity).Append("\n"); sb.Append(" Quantity: ").Append(Quantity).Append("\n");
sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); sb.Append(" ShipDate: ").Append(ShipDate).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append(" Complete: ").Append(Complete).Append("\n"); sb.Append(" Complete: ").Append(Complete).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }
@ -206,25 +203,18 @@ namespace IO.Swagger.Model
{ {
int hash = 41; int hash = 41;
// Suitable nullity checks etc, of course :) // Suitable nullity checks etc, of course :)
if (this.Id != null) if (this.Id != null)
hash = hash * 59 + this.Id.GetHashCode(); hash = hash * 59 + this.Id.GetHashCode();
if (this.PetId != null) if (this.PetId != null)
hash = hash * 59 + this.PetId.GetHashCode(); hash = hash * 59 + this.PetId.GetHashCode();
if (this.Quantity != null) if (this.Quantity != null)
hash = hash * 59 + this.Quantity.GetHashCode(); hash = hash * 59 + this.Quantity.GetHashCode();
if (this.ShipDate != null) if (this.ShipDate != null)
hash = hash * 59 + this.ShipDate.GetHashCode(); hash = hash * 59 + this.ShipDate.GetHashCode();
if (this.Status != null) if (this.Status != null)
hash = hash * 59 + this.Status.GetHashCode(); hash = hash * 59 + this.Status.GetHashCode();
if (this.Complete != null) if (this.Complete != null)
hash = hash * 59 + this.Complete.GetHashCode(); hash = hash * 59 + this.Complete.GetHashCode();
return hash; return hash;
} }
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -45,17 +44,14 @@ namespace IO.Swagger.Model
Sold Sold
} }
/// <summary> /// <summary>
/// pet status in the store /// pet status in the store
/// </summary> /// </summary>
/// <value>pet status in the store</value> /// <value>pet status in the store</value>
[DataMember(Name="status", EmitDefaultValue=false)] [DataMember(Name="status", EmitDefaultValue=false)]
public StatusEnum? Status { get; set; } public StatusEnum? Status { get; set; }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Pet" /> class. /// Initializes a new instance of the <see cref="Pet" /> class.
/// Initializes a new instance of the <see cref="Pet" />class.
/// </summary> /// </summary>
/// <param name="Id">Id.</param> /// <param name="Id">Id.</param>
/// <param name="Category">Category.</param> /// <param name="Category">Category.</param>
@ -63,7 +59,6 @@ namespace IO.Swagger.Model
/// <param name="PhotoUrls">PhotoUrls (required).</param> /// <param name="PhotoUrls">PhotoUrls (required).</param>
/// <param name="Tags">Tags.</param> /// <param name="Tags">Tags.</param>
/// <param name="Status">pet status in the store.</param> /// <param name="Status">pet status in the store.</param>
public Pet(long? Id = null, Category Category = null, string Name = null, List<string> PhotoUrls = null, List<Tag> Tags = null, StatusEnum? Status = null) public Pet(long? Id = null, Category Category = null, string Name = null, List<string> PhotoUrls = null, List<Tag> Tags = null, StatusEnum? Status = null)
{ {
// to ensure "Name" is required (not null) // to ensure "Name" is required (not null)
@ -84,44 +79,43 @@ namespace IO.Swagger.Model
{ {
this.PhotoUrls = PhotoUrls; this.PhotoUrls = PhotoUrls;
} }
this.Id = Id;
this.Category = Category;
this.Tags = Tags; this.Id = Id;
this.Status = Status;
this.Category = Category;
this.Tags = Tags;
this.Status = Status;
} }
/// <summary> /// <summary>
/// Gets or Sets Id /// Gets or Sets Id
/// </summary> /// </summary>
[DataMember(Name="id", EmitDefaultValue=false)] [DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; } public long? Id { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Category /// Gets or Sets Category
/// </summary> /// </summary>
[DataMember(Name="category", EmitDefaultValue=false)] [DataMember(Name="category", EmitDefaultValue=false)]
public Category Category { get; set; } public Category Category { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Name /// Gets or Sets Name
/// </summary> /// </summary>
[DataMember(Name="name", EmitDefaultValue=false)] [DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// Gets or Sets PhotoUrls /// Gets or Sets PhotoUrls
/// </summary> /// </summary>
[DataMember(Name="photoUrls", EmitDefaultValue=false)] [DataMember(Name="photoUrls", EmitDefaultValue=false)]
public List<string> PhotoUrls { get; set; } public List<string> PhotoUrls { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Tags /// Gets or Sets Tags
/// </summary> /// </summary>
[DataMember(Name="tags", EmitDefaultValue=false)] [DataMember(Name="tags", EmitDefaultValue=false)]
public List<Tag> Tags { get; set; } public List<Tag> Tags { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -131,12 +125,11 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Pet {\n"); sb.Append("class Pet {\n");
sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Category: ").Append(Category).Append("\n"); sb.Append(" Category: ").Append(Category).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
sb.Append(" Tags: ").Append(Tags).Append("\n"); sb.Append(" Tags: ").Append(Tags).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }
@ -216,25 +209,18 @@ namespace IO.Swagger.Model
{ {
int hash = 41; int hash = 41;
// Suitable nullity checks etc, of course :) // Suitable nullity checks etc, of course :)
if (this.Id != null) if (this.Id != null)
hash = hash * 59 + this.Id.GetHashCode(); hash = hash * 59 + this.Id.GetHashCode();
if (this.Category != null) if (this.Category != null)
hash = hash * 59 + this.Category.GetHashCode(); hash = hash * 59 + this.Category.GetHashCode();
if (this.Name != null) if (this.Name != null)
hash = hash * 59 + this.Name.GetHashCode(); hash = hash * 59 + this.Name.GetHashCode();
if (this.PhotoUrls != null) if (this.PhotoUrls != null)
hash = hash * 59 + this.PhotoUrls.GetHashCode(); hash = hash * 59 + this.PhotoUrls.GetHashCode();
if (this.Tags != null) if (this.Tags != null)
hash = hash * 59 + this.Tags.GetHashCode(); hash = hash * 59 + this.Tags.GetHashCode();
if (this.Status != null) if (this.Status != null)
hash = hash * 59 + this.Status.GetHashCode(); hash = hash * 59 + this.Status.GetHashCode();
return hash; return hash;
} }
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -18,26 +17,23 @@ namespace IO.Swagger.Model
[DataContract] [DataContract]
public partial class SpecialModelName : IEquatable<SpecialModelName> public partial class SpecialModelName : IEquatable<SpecialModelName>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SpecialModelName" /> class. /// Initializes a new instance of the <see cref="SpecialModelName" /> class.
/// Initializes a new instance of the <see cref="SpecialModelName" />class.
/// </summary> /// </summary>
/// <param name="SpecialPropertyName">SpecialPropertyName.</param> /// <param name="SpecialPropertyName">SpecialPropertyName.</param>
public SpecialModelName(long? SpecialPropertyName = null) public SpecialModelName(long? SpecialPropertyName = null)
{ {
this.SpecialPropertyName = SpecialPropertyName;
this.SpecialPropertyName = SpecialPropertyName;
} }
/// <summary> /// <summary>
/// Gets or Sets SpecialPropertyName /// Gets or Sets SpecialPropertyName
/// </summary> /// </summary>
[DataMember(Name="$special[property.name]", EmitDefaultValue=false)] [DataMember(Name="$special[property.name]", EmitDefaultValue=false)]
public long? SpecialPropertyName { get; set; } public long? SpecialPropertyName { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -18,34 +17,31 @@ namespace IO.Swagger.Model
[DataContract] [DataContract]
public partial class Tag : IEquatable<Tag> public partial class Tag : IEquatable<Tag>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Tag" /> class. /// Initializes a new instance of the <see cref="Tag" /> class.
/// Initializes a new instance of the <see cref="Tag" />class.
/// </summary> /// </summary>
/// <param name="Id">Id.</param> /// <param name="Id">Id.</param>
/// <param name="Name">Name.</param> /// <param name="Name">Name.</param>
public Tag(long? Id = null, string Name = null) public Tag(long? Id = null, string Name = null)
{ {
this.Id = Id;
this.Name = Name;
this.Id = Id;
this.Name = Name;
} }
/// <summary> /// <summary>
/// Gets or Sets Id /// Gets or Sets Id
/// </summary> /// </summary>
[DataMember(Name="id", EmitDefaultValue=false)] [DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; } public long? Id { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Name /// Gets or Sets Name
/// </summary> /// </summary>
[DataMember(Name="name", EmitDefaultValue=false)] [DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -55,7 +51,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Tag {\n"); sb.Append("class Tag {\n");
sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -18,10 +17,8 @@ namespace IO.Swagger.Model
[DataContract] [DataContract]
public partial class User : IEquatable<User> public partial class User : IEquatable<User>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="User" /> class. /// Initializes a new instance of the <see cref="User" /> class.
/// Initializes a new instance of the <see cref="User" />class.
/// </summary> /// </summary>
/// <param name="Id">Id.</param> /// <param name="Id">Id.</param>
/// <param name="Username">Username.</param> /// <param name="Username">Username.</param>
@ -31,70 +28,69 @@ namespace IO.Swagger.Model
/// <param name="Password">Password.</param> /// <param name="Password">Password.</param>
/// <param name="Phone">Phone.</param> /// <param name="Phone">Phone.</param>
/// <param name="UserStatus">User Status.</param> /// <param name="UserStatus">User Status.</param>
public User(long? Id = null, string Username = null, string FirstName = null, string LastName = null, string Email = null, string Password = null, string Phone = null, int? UserStatus = null) public User(long? Id = null, string Username = null, string FirstName = null, string LastName = null, string Email = null, string Password = null, string Phone = null, int? UserStatus = null)
{ {
this.Id = Id;
this.Username = Username;
this.FirstName = FirstName; this.Id = Id;
this.LastName = LastName;
this.Email = Email; this.Username = Username;
this.Password = Password;
this.Phone = Phone; this.FirstName = FirstName;
this.UserStatus = UserStatus;
this.LastName = LastName;
this.Email = Email;
this.Password = Password;
this.Phone = Phone;
this.UserStatus = UserStatus;
} }
/// <summary> /// <summary>
/// Gets or Sets Id /// Gets or Sets Id
/// </summary> /// </summary>
[DataMember(Name="id", EmitDefaultValue=false)] [DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; } public long? Id { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Username /// Gets or Sets Username
/// </summary> /// </summary>
[DataMember(Name="username", EmitDefaultValue=false)] [DataMember(Name="username", EmitDefaultValue=false)]
public string Username { get; set; } public string Username { get; set; }
/// <summary> /// <summary>
/// Gets or Sets FirstName /// Gets or Sets FirstName
/// </summary> /// </summary>
[DataMember(Name="firstName", EmitDefaultValue=false)] [DataMember(Name="firstName", EmitDefaultValue=false)]
public string FirstName { get; set; } public string FirstName { get; set; }
/// <summary> /// <summary>
/// Gets or Sets LastName /// Gets or Sets LastName
/// </summary> /// </summary>
[DataMember(Name="lastName", EmitDefaultValue=false)] [DataMember(Name="lastName", EmitDefaultValue=false)]
public string LastName { get; set; } public string LastName { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Email /// Gets or Sets Email
/// </summary> /// </summary>
[DataMember(Name="email", EmitDefaultValue=false)] [DataMember(Name="email", EmitDefaultValue=false)]
public string Email { get; set; } public string Email { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Password /// Gets or Sets Password
/// </summary> /// </summary>
[DataMember(Name="password", EmitDefaultValue=false)] [DataMember(Name="password", EmitDefaultValue=false)]
public string Password { get; set; } public string Password { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Phone /// Gets or Sets Phone
/// </summary> /// </summary>
[DataMember(Name="phone", EmitDefaultValue=false)] [DataMember(Name="phone", EmitDefaultValue=false)]
public string Phone { get; set; } public string Phone { get; set; }
/// <summary> /// <summary>
/// User Status /// User Status
/// </summary> /// </summary>
/// <value>User Status</value> /// <value>User Status</value>
[DataMember(Name="userStatus", EmitDefaultValue=false)] [DataMember(Name="userStatus", EmitDefaultValue=false)]
public int? UserStatus { get; set; } public int? UserStatus { get; set; }
/// <summary> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -104,13 +100,13 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class User {\n"); sb.Append("class User {\n");
sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Username: ").Append(Username).Append("\n"); sb.Append(" Username: ").Append(Username).Append("\n");
sb.Append(" FirstName: ").Append(FirstName).Append("\n"); sb.Append(" FirstName: ").Append(FirstName).Append("\n");
sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" LastName: ").Append(LastName).Append("\n");
sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append(" Phone: ").Append(Phone).Append("\n"); sb.Append(" Phone: ").Append(Phone).Append("\n");
sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); sb.Append(" UserStatus: ").Append(UserStatus).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -72,6 +72,8 @@
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\EnumClass.cs" /> <Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\EnumClass.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\EnumTest.cs" /> <Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\EnumTest.cs" />
<Compile Include="TestEnum.cs" /> <Compile Include="TestEnum.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\ApiResponse.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\FormatTest.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup> <ItemGroup>

View File

@ -73,6 +73,9 @@ namespace SwaggerClientTest.TestOrder
} }
/*
* Skip the following test as the fake endpiont has been removed from the swagger spec
* We'll uncomment below after we update the Petstore server
/// <summary> /// <summary>
/// Test TestGetInventoryInObject /// Test TestGetInventoryInObject
/// </summary> /// </summary>
@ -93,6 +96,7 @@ namespace SwaggerClientTest.TestOrder
Assert.IsInstanceOf (typeof(int?), Int32.Parse(entry.Value)); Assert.IsInstanceOf (typeof(int?), Int32.Parse(entry.Value));
} }
} }
*/
/// <summary> /// <summary>
/// Test Enum /// Test Enum

View File

@ -1,9 +0,0 @@
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb

View File

@ -1,11 +1,11 @@
# SwaggerClient-php # SwaggerClient-php
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-04-06T21:53:32.791+08:00 - Build date: 2016-04-27T17:54:12.143+08:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen - Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements ## Requirements
@ -58,16 +58,24 @@ Please follow the [installation procedure](#installation--usage) and then run th
<?php <?php
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth $api_instance = new Swagger\Client\Api\FakeApi();
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $number = "number_example"; // string | None
$double = 1.2; // double | None
$api_instance = new Swagger\Client\Api\PetApi(); $string = "string_example"; // string | None
$body = new \Swagger\Client\Model\Pet(); // \Swagger\Client\Model\Pet | Pet object that needs to be added to the store $byte = "B"; // string | None
$integer = 56; // int | None
$int32 = 56; // int | None
$int64 = 789; // int | None
$float = 3.4; // float | None
$binary = "B"; // string | None
$date = new \DateTime(); // \DateTime | None
$date_time = new \DateTime(); // \DateTime | None
$password = "password_example"; // string | None
try { try {
$api_instance->addPet($body); $api_instance->testEndpointParameters($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password);
} catch (Exception $e) { } catch (Exception $e) {
echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), "\n"; echo 'Exception when calling FakeApi->testEndpointParameters: ', $e->getMessage(), "\n";
} }
?> ?>
@ -79,21 +87,17 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters
*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addpetusingbytearray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet *PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags *PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID *PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getpetbyidinobject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
*PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petpetidtestingbytearraytrueget) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image *PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID *StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**findOrdersByStatus**](docs/StoreApi.md#findordersbystatus) | **GET** /store/findByStatus | Finds orders by status
*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getinventoryinobject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID *StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet *StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user *UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user
@ -109,12 +113,13 @@ Class | Method | HTTP request | Description
## Documentation For Models ## Documentation For Models
- [Animal](docs/Animal.md) - [Animal](docs/Animal.md)
- [ApiResponse](docs/ApiResponse.md)
- [Cat](docs/Cat.md) - [Cat](docs/Cat.md)
- [Category](docs/Category.md) - [Category](docs/Category.md)
- [Dog](docs/Dog.md) - [Dog](docs/Dog.md)
- [EnumClass](docs/EnumClass.md) - [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md) - [EnumTest](docs/EnumTest.md)
- [InlineResponse200](docs/InlineResponse200.md) - [FormatTest](docs/FormatTest.md)
- [Model200Response](docs/Model200Response.md) - [Model200Response](docs/Model200Response.md)
- [ModelReturn](docs/ModelReturn.md) - [ModelReturn](docs/ModelReturn.md)
- [Name](docs/Name.md) - [Name](docs/Name.md)
@ -128,45 +133,17 @@ Class | Method | HTTP request | Description
## Documentation For Authorization ## Documentation For Authorization
## test_api_key_header
- **Type**: API key
- **API key parameter name**: test_api_key_header
- **Location**: HTTP header
## api_key ## api_key
- **Type**: API key - **Type**: API key
- **API key parameter name**: api_key - **API key parameter name**: api_key
- **Location**: HTTP header - **Location**: HTTP header
## test_http_basic
- **Type**: HTTP basic authentication
## test_api_client_secret
- **Type**: API key
- **API key parameter name**: x-test_api_client_secret
- **Location**: HTTP header
## test_api_client_id
- **Type**: API key
- **API key parameter name**: x-test_api_client_id
- **Location**: HTTP header
## test_api_key_query
- **Type**: API key
- **API key parameter name**: test_api_key_query
- **Location**: URL query string
## petstore_auth ## petstore_auth
- **Type**: OAuth - **Type**: OAuth
- **Flow**: implicit - **Flow**: implicit
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog - **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**: - **Scopes**:
- **write:pets**: modify pets in your account - **write:pets**: modify pets in your account
- **read:pets**: read your pets - **read:pets**: read your pets

View File

@ -7,8 +7,8 @@ Name | Type | Description | Notes
**pet_id** | **int** | | [optional] **pet_id** | **int** | | [optional]
**quantity** | **int** | | [optional] **quantity** | **int** | | [optional]
**ship_date** | [**\DateTime**](\DateTime.md) | | [optional] **ship_date** | [**\DateTime**](\DateTime.md) | | [optional]
**status** | **string** | Order Status | [optional] [default to STATUS_PLACED] **status** | **string** | Order Status | [optional]
**complete** | **bool** | | [optional] **complete** | **bool** | | [optional] [default to false]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -47,9 +47,15 @@ use \ArrayAccess;
class Animal implements ArrayAccess class Animal implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'Animal';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'class_name' => 'string' 'class_name' => 'string'
); );
@ -98,14 +104,12 @@ class Animal implements ArrayAccess
/** /**
* $class_name * $class_name
* @var string * @var string
*/ */
protected $class_name; protected $class_name;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -113,13 +117,16 @@ class Animal implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
// Initialize discriminator property with the model name.
$discrimintor = array_search('className', self::$attributeMap);
$this->{$discrimintor} = static::$swaggerModelName;
if ($data != null) { if ($data != null) {
$this->class_name = $data["class_name"]; $this->class_name = $data["class_name"];
} }
} }
/** /**
* Gets class_name. * Gets class_name
* @return string * @return string
*/ */
public function getClassName() public function getClassName()
@ -128,7 +135,7 @@ class Animal implements ArrayAccess
} }
/** /**
* Sets class_name. * Sets class_name
* @param string $class_name * @param string $class_name
* @return $this * @return $this
*/ */
@ -138,7 +145,6 @@ class Animal implements ArrayAccess
$this->class_name = $class_name; $this->class_name = $class_name;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -181,17 +187,15 @@ class Animal implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -67,9 +67,9 @@ class ApiResponse implements ArrayAccess
} }
/** /**
* Array of attributes where the key is the local name, and the value is the original name * Array of attributes where the key is the local name, and the value is the original name
* @var string[] * @var string[]
*/ */
static $attributeMap = array( static $attributeMap = array(
'code' => 'code', 'code' => 'code',
'type' => 'type', 'type' => 'type',
@ -81,9 +81,9 @@ class ApiResponse implements ArrayAccess
} }
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
* @var string[] * @var string[]
*/ */
static $setters = array( static $setters = array(
'code' => 'setCode', 'code' => 'setCode',
'type' => 'setType', 'type' => 'setType',
@ -95,9 +95,9 @@ class ApiResponse implements ArrayAccess
} }
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
* @var string[] * @var string[]
*/ */
static $getters = array( static $getters = array(
'code' => 'getCode', 'code' => 'getCode',
'type' => 'getType', 'type' => 'getType',
@ -108,20 +108,24 @@ class ApiResponse implements ArrayAccess
return self::$getters; return self::$getters;
} }
/** /**
* $code * $code
* @var int * @var int
*/ */
protected $code; protected $code;
/** /**
* $type * $type
* @var string * @var string
*/ */
protected $type; protected $type;
/** /**
* $message * $message
* @var string * @var string
*/ */
protected $message; protected $message;
/** /**

View File

@ -47,9 +47,15 @@ use \ArrayAccess;
class Cat extends Animal implements ArrayAccess class Cat extends Animal implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'Cat';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'declawed' => 'bool' 'declawed' => 'bool'
); );
@ -98,14 +104,12 @@ class Cat extends Animal implements ArrayAccess
/** /**
* $declawed * $declawed
* @var bool * @var bool
*/ */
protected $declawed; protected $declawed;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -113,13 +117,13 @@ class Cat extends Animal implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
parent::__construct($data); parent::__construct($data);
if ($data != null) { if ($data != null) {
$this->declawed = $data["declawed"]; $this->declawed = $data["declawed"];
} }
} }
/** /**
* Gets declawed. * Gets declawed
* @return bool * @return bool
*/ */
public function getDeclawed() public function getDeclawed()
@ -128,7 +132,7 @@ class Cat extends Animal implements ArrayAccess
} }
/** /**
* Sets declawed. * Sets declawed
* @param bool $declawed * @param bool $declawed
* @return $this * @return $this
*/ */
@ -138,7 +142,6 @@ class Cat extends Animal implements ArrayAccess
$this->declawed = $declawed; $this->declawed = $declawed;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -181,17 +184,15 @@ class Cat extends Animal implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -47,9 +47,15 @@ use \ArrayAccess;
class Category implements ArrayAccess class Category implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'Category';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'id' => 'int', 'id' => 'int',
'name' => 'string' 'name' => 'string'
@ -102,20 +108,17 @@ class Category implements ArrayAccess
/** /**
* $id * $id
* @var int * @var int
*/ */
protected $id; protected $id;
/** /**
* $name * $name
* @var string * @var string
*/ */
protected $name; protected $name;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -123,14 +126,14 @@ class Category implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
if ($data != null) { if ($data != null) {
$this->id = $data["id"]; $this->id = $data["id"];
$this->name = $data["name"]; $this->name = $data["name"];
} }
} }
/** /**
* Gets id. * Gets id
* @return int * @return int
*/ */
public function getId() public function getId()
@ -139,7 +142,7 @@ class Category implements ArrayAccess
} }
/** /**
* Sets id. * Sets id
* @param int $id * @param int $id
* @return $this * @return $this
*/ */
@ -149,9 +152,8 @@ class Category implements ArrayAccess
$this->id = $id; $this->id = $id;
return $this; return $this;
} }
/** /**
* Gets name. * Gets name
* @return string * @return string
*/ */
public function getName() public function getName()
@ -160,7 +162,7 @@ class Category implements ArrayAccess
} }
/** /**
* Sets name. * Sets name
* @param string $name * @param string $name
* @return $this * @return $this
*/ */
@ -170,7 +172,6 @@ class Category implements ArrayAccess
$this->name = $name; $this->name = $name;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -213,17 +214,15 @@ class Category implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -47,9 +47,15 @@ use \ArrayAccess;
class Dog extends Animal implements ArrayAccess class Dog extends Animal implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'Dog';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'breed' => 'string' 'breed' => 'string'
); );
@ -98,14 +104,12 @@ class Dog extends Animal implements ArrayAccess
/** /**
* $breed * $breed
* @var string * @var string
*/ */
protected $breed; protected $breed;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -113,13 +117,13 @@ class Dog extends Animal implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
parent::__construct($data); parent::__construct($data);
if ($data != null) { if ($data != null) {
$this->breed = $data["breed"]; $this->breed = $data["breed"];
} }
} }
/** /**
* Gets breed. * Gets breed
* @return string * @return string
*/ */
public function getBreed() public function getBreed()
@ -128,7 +132,7 @@ class Dog extends Animal implements ArrayAccess
} }
/** /**
* Sets breed. * Sets breed
* @param string $breed * @param string $breed
* @return $this * @return $this
*/ */
@ -138,7 +142,6 @@ class Dog extends Animal implements ArrayAccess
$this->breed = $breed; $this->breed = $breed;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -181,17 +184,15 @@ class Dog extends Animal implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -68,7 +68,6 @@ class FormatTest implements ArrayAccess
'binary' => 'string', 'binary' => 'string',
'date' => '\DateTime', 'date' => '\DateTime',
'date_time' => '\DateTime', 'date_time' => '\DateTime',
'uuid' => 'string',
'password' => 'string' 'password' => 'string'
); );
@ -77,9 +76,9 @@ class FormatTest implements ArrayAccess
} }
/** /**
* Array of attributes where the key is the local name, and the value is the original name * Array of attributes where the key is the local name, and the value is the original name
* @var string[] * @var string[]
*/ */
static $attributeMap = array( static $attributeMap = array(
'integer' => 'integer', 'integer' => 'integer',
'int32' => 'int32', 'int32' => 'int32',
@ -92,7 +91,6 @@ class FormatTest implements ArrayAccess
'binary' => 'binary', 'binary' => 'binary',
'date' => 'date', 'date' => 'date',
'date_time' => 'dateTime', 'date_time' => 'dateTime',
'uuid' => 'uuid',
'password' => 'password' 'password' => 'password'
); );
@ -101,9 +99,9 @@ class FormatTest implements ArrayAccess
} }
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
* @var string[] * @var string[]
*/ */
static $setters = array( static $setters = array(
'integer' => 'setInteger', 'integer' => 'setInteger',
'int32' => 'setInt32', 'int32' => 'setInt32',
@ -116,7 +114,6 @@ class FormatTest implements ArrayAccess
'binary' => 'setBinary', 'binary' => 'setBinary',
'date' => 'setDate', 'date' => 'setDate',
'date_time' => 'setDateTime', 'date_time' => 'setDateTime',
'uuid' => 'setUuid',
'password' => 'setPassword' 'password' => 'setPassword'
); );
@ -125,9 +122,9 @@ class FormatTest implements ArrayAccess
} }
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
* @var string[] * @var string[]
*/ */
static $getters = array( static $getters = array(
'integer' => 'getInteger', 'integer' => 'getInteger',
'int32' => 'getInt32', 'int32' => 'getInt32',
@ -140,7 +137,6 @@ class FormatTest implements ArrayAccess
'binary' => 'getBinary', 'binary' => 'getBinary',
'date' => 'getDate', 'date' => 'getDate',
'date_time' => 'getDateTime', 'date_time' => 'getDateTime',
'uuid' => 'getUuid',
'password' => 'getPassword' 'password' => 'getPassword'
); );
@ -148,70 +144,69 @@ class FormatTest implements ArrayAccess
return self::$getters; return self::$getters;
} }
/** /**
* $integer * $integer
* @var int * @var int
*/ */
protected $integer; protected $integer;
/** /**
* $int32 * $int32
* @var int * @var int
*/ */
protected $int32; protected $int32;
/** /**
* $int64 * $int64
* @var int * @var int
*/ */
protected $int64; protected $int64;
/** /**
* $number * $number
* @var float * @var float
*/ */
protected $number; protected $number;
/** /**
* $float * $float
* @var float * @var float
*/ */
protected $float; protected $float;
/** /**
* $double * $double
* @var double * @var double
*/ */
protected $double; protected $double;
/** /**
* $string * $string
* @var string * @var string
*/ */
protected $string; protected $string;
/** /**
* $byte * $byte
* @var string * @var string
*/ */
protected $byte; protected $byte;
/** /**
* $binary * $binary
* @var string * @var string
*/ */
protected $binary; protected $binary;
/** /**
* $date * $date
* @var \DateTime * @var \DateTime
*/ */
protected $date; protected $date;
/** /**
* $date_time * $date_time
* @var \DateTime * @var \DateTime
*/ */
protected $date_time; protected $date_time;
/** /**
* $uuid * $password
* @var string * @var string
*/ */
protected $uuid;
/**
* $password
* @var string
*/
protected $password; protected $password;
/** /**
@ -234,7 +229,6 @@ class FormatTest implements ArrayAccess
$this->binary = $data["binary"]; $this->binary = $data["binary"];
$this->date = $data["date"]; $this->date = $data["date"];
$this->date_time = $data["date_time"]; $this->date_time = $data["date_time"];
$this->uuid = $data["uuid"];
$this->password = $data["password"]; $this->password = $data["password"];
} }
} }
@ -458,26 +452,6 @@ class FormatTest implements ArrayAccess
$this->date_time = $date_time; $this->date_time = $date_time;
return $this; return $this;
} }
/**
* Gets uuid
* @return string
*/
public function getUuid()
{
return $this->uuid;
}
/**
* Sets uuid
* @param string $uuid
* @return $this
*/
public function setUuid($uuid)
{
$this->uuid = $uuid;
return $this;
}
/** /**
* Gets password * Gets password
* @return string * @return string

View File

@ -38,7 +38,7 @@ use \ArrayAccess;
* Model200Response Class Doc Comment * Model200Response Class Doc Comment
* *
* @category Class * @category Class
* @description * @description Model for testing model name starting with number
* @package Swagger\Client * @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen * @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
@ -47,9 +47,15 @@ use \ArrayAccess;
class Model200Response implements ArrayAccess class Model200Response implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = '200_response';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'name' => 'int' 'name' => 'int'
); );
@ -98,14 +104,12 @@ class Model200Response implements ArrayAccess
/** /**
* $name * $name
* @var int * @var int
*/ */
protected $name; protected $name;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -113,13 +117,13 @@ class Model200Response implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
if ($data != null) { if ($data != null) {
$this->name = $data["name"]; $this->name = $data["name"];
} }
} }
/** /**
* Gets name. * Gets name
* @return int * @return int
*/ */
public function getName() public function getName()
@ -128,7 +132,7 @@ class Model200Response implements ArrayAccess
} }
/** /**
* Sets name. * Sets name
* @param int $name * @param int $name
* @return $this * @return $this
*/ */
@ -138,7 +142,6 @@ class Model200Response implements ArrayAccess
$this->name = $name; $this->name = $name;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -181,17 +184,15 @@ class Model200Response implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -38,7 +38,7 @@ use \ArrayAccess;
* ModelReturn Class Doc Comment * ModelReturn Class Doc Comment
* *
* @category Class * @category Class
* @description * @description Model for testing reserved words
* @package Swagger\Client * @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen * @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
@ -47,9 +47,15 @@ use \ArrayAccess;
class ModelReturn implements ArrayAccess class ModelReturn implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'Return';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'return' => 'int' 'return' => 'int'
); );
@ -98,14 +104,12 @@ class ModelReturn implements ArrayAccess
/** /**
* $return * $return
* @var int * @var int
*/ */
protected $return; protected $return;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -113,13 +117,13 @@ class ModelReturn implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
if ($data != null) { if ($data != null) {
$this->return = $data["return"]; $this->return = $data["return"];
} }
} }
/** /**
* Gets return. * Gets return
* @return int * @return int
*/ */
public function getReturn() public function getReturn()
@ -128,7 +132,7 @@ class ModelReturn implements ArrayAccess
} }
/** /**
* Sets return. * Sets return
* @param int $return * @param int $return
* @return $this * @return $this
*/ */
@ -138,7 +142,6 @@ class ModelReturn implements ArrayAccess
$this->return = $return; $this->return = $return;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -181,17 +184,15 @@ class ModelReturn implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -38,7 +38,7 @@ use \ArrayAccess;
* Name Class Doc Comment * Name Class Doc Comment
* *
* @category Class * @category Class
* @description * @description Model for testing model name same as property name
* @package Swagger\Client * @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen * @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
@ -47,12 +47,19 @@ use \ArrayAccess;
class Name implements ArrayAccess class Name implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'Name';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'name' => 'int', 'name' => 'int',
'snake_case' => 'int' 'snake_case' => 'int',
'property' => 'string'
); );
static function swaggerTypes() { static function swaggerTypes() {
@ -65,7 +72,8 @@ class Name implements ArrayAccess
*/ */
static $attributeMap = array( static $attributeMap = array(
'name' => 'name', 'name' => 'name',
'snake_case' => 'snake_case' 'snake_case' => 'snake_case',
'property' => 'property'
); );
static function attributeMap() { static function attributeMap() {
@ -78,7 +86,8 @@ class Name implements ArrayAccess
*/ */
static $setters = array( static $setters = array(
'name' => 'setName', 'name' => 'setName',
'snake_case' => 'setSnakeCase' 'snake_case' => 'setSnakeCase',
'property' => 'setProperty'
); );
static function setters() { static function setters() {
@ -91,7 +100,8 @@ class Name implements ArrayAccess
*/ */
static $getters = array( static $getters = array(
'name' => 'getName', 'name' => 'getName',
'snake_case' => 'getSnakeCase' 'snake_case' => 'getSnakeCase',
'property' => 'getProperty'
); );
static function getters() { static function getters() {
@ -102,19 +112,21 @@ class Name implements ArrayAccess
/** /**
* $name * $name
* @var int * @var int
*/ */
protected $name; protected $name;
/** /**
* $snake_case * $snake_case
* @var int * @var int
*/ */
protected $snake_case; protected $snake_case;
/**
* $property
* @var string
*/
protected $property;
/** /**
* Constructor * Constructor
@ -123,14 +135,15 @@ class Name implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
if ($data != null) { if ($data != null) {
$this->name = $data["name"]; $this->name = $data["name"];
$this->snake_case = $data["snake_case"]; $this->snake_case = $data["snake_case"];
$this->property = $data["property"];
} }
} }
/** /**
* Gets name. * Gets name
* @return int * @return int
*/ */
public function getName() public function getName()
@ -139,7 +152,7 @@ class Name implements ArrayAccess
} }
/** /**
* Sets name. * Sets name
* @param int $name * @param int $name
* @return $this * @return $this
*/ */
@ -149,9 +162,8 @@ class Name implements ArrayAccess
$this->name = $name; $this->name = $name;
return $this; return $this;
} }
/** /**
* Gets snake_case. * Gets snake_case
* @return int * @return int
*/ */
public function getSnakeCase() public function getSnakeCase()
@ -160,7 +172,7 @@ class Name implements ArrayAccess
} }
/** /**
* Sets snake_case. * Sets snake_case
* @param int $snake_case * @param int $snake_case
* @return $this * @return $this
*/ */
@ -170,7 +182,26 @@ class Name implements ArrayAccess
$this->snake_case = $snake_case; $this->snake_case = $snake_case;
return $this; return $this;
} }
/**
* Gets property
* @return string
*/
public function getProperty()
{
return $this->property;
}
/**
* Sets property
* @param string $property
* @return $this
*/
public function setProperty($property)
{
$this->property = $property;
return $this;
}
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -213,17 +244,15 @@ class Name implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -47,9 +47,15 @@ use \ArrayAccess;
class Order implements ArrayAccess class Order implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'Order';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'id' => 'int', 'id' => 'int',
'pet_id' => 'int', 'pet_id' => 'int',
@ -133,43 +139,36 @@ class Order implements ArrayAccess
} }
/** /**
* $id * $id
* @var int * @var int
*/ */
protected $id; protected $id;
/** /**
* $pet_id * $pet_id
* @var int * @var int
*/ */
protected $pet_id; protected $pet_id;
/** /**
* $quantity * $quantity
* @var int * @var int
*/ */
protected $quantity; protected $quantity;
/** /**
* $ship_date * $ship_date
* @var \DateTime * @var \DateTime
*/ */
protected $ship_date; protected $ship_date;
/** /**
* $status Order Status * $status Order Status
* @var string * @var string
*/ */
protected $status = STATUS_PLACED; protected $status;
/** /**
* $complete * $complete
* @var bool * @var bool
*/ */
protected $complete; protected $complete = false;
/** /**
* Constructor * Constructor
@ -178,6 +177,7 @@ class Order implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
if ($data != null) { if ($data != null) {
$this->id = $data["id"]; $this->id = $data["id"];
$this->pet_id = $data["pet_id"]; $this->pet_id = $data["pet_id"];
@ -187,9 +187,8 @@ class Order implements ArrayAccess
$this->complete = $data["complete"]; $this->complete = $data["complete"];
} }
} }
/** /**
* Gets id. * Gets id
* @return int * @return int
*/ */
public function getId() public function getId()
@ -198,7 +197,7 @@ class Order implements ArrayAccess
} }
/** /**
* Sets id. * Sets id
* @param int $id * @param int $id
* @return $this * @return $this
*/ */
@ -208,9 +207,8 @@ class Order implements ArrayAccess
$this->id = $id; $this->id = $id;
return $this; return $this;
} }
/** /**
* Gets pet_id. * Gets pet_id
* @return int * @return int
*/ */
public function getPetId() public function getPetId()
@ -219,7 +217,7 @@ class Order implements ArrayAccess
} }
/** /**
* Sets pet_id. * Sets pet_id
* @param int $pet_id * @param int $pet_id
* @return $this * @return $this
*/ */
@ -229,9 +227,8 @@ class Order implements ArrayAccess
$this->pet_id = $pet_id; $this->pet_id = $pet_id;
return $this; return $this;
} }
/** /**
* Gets quantity. * Gets quantity
* @return int * @return int
*/ */
public function getQuantity() public function getQuantity()
@ -240,7 +237,7 @@ class Order implements ArrayAccess
} }
/** /**
* Sets quantity. * Sets quantity
* @param int $quantity * @param int $quantity
* @return $this * @return $this
*/ */
@ -250,9 +247,8 @@ class Order implements ArrayAccess
$this->quantity = $quantity; $this->quantity = $quantity;
return $this; return $this;
} }
/** /**
* Gets ship_date. * Gets ship_date
* @return \DateTime * @return \DateTime
*/ */
public function getShipDate() public function getShipDate()
@ -261,7 +257,7 @@ class Order implements ArrayAccess
} }
/** /**
* Sets ship_date. * Sets ship_date
* @param \DateTime $ship_date * @param \DateTime $ship_date
* @return $this * @return $this
*/ */
@ -271,9 +267,8 @@ class Order implements ArrayAccess
$this->ship_date = $ship_date; $this->ship_date = $ship_date;
return $this; return $this;
} }
/** /**
* Gets status. * Gets status
* @return string * @return string
*/ */
public function getStatus() public function getStatus()
@ -282,7 +277,7 @@ class Order implements ArrayAccess
} }
/** /**
* Sets status. * Sets status
* @param string $status Order Status * @param string $status Order Status
* @return $this * @return $this
*/ */
@ -295,9 +290,8 @@ class Order implements ArrayAccess
$this->status = $status; $this->status = $status;
return $this; return $this;
} }
/** /**
* Gets complete. * Gets complete
* @return bool * @return bool
*/ */
public function getComplete() public function getComplete()
@ -306,7 +300,7 @@ class Order implements ArrayAccess
} }
/** /**
* Sets complete. * Sets complete
* @param bool $complete * @param bool $complete
* @return $this * @return $this
*/ */
@ -316,7 +310,6 @@ class Order implements ArrayAccess
$this->complete = $complete; $this->complete = $complete;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -359,17 +352,15 @@ class Order implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -47,9 +47,15 @@ use \ArrayAccess;
class Pet implements ArrayAccess class Pet implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'Pet';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'id' => 'int', 'id' => 'int',
'category' => '\Swagger\Client\Model\Category', 'category' => '\Swagger\Client\Model\Category',
@ -133,44 +139,37 @@ class Pet implements ArrayAccess
} }
/** /**
* $id * $id
* @var int * @var int
*/ */
protected $id; protected $id;
/** /**
* $category * $category
* @var \Swagger\Client\Model\Category * @var \Swagger\Client\Model\Category
*/ */
protected $category; protected $category;
/** /**
* $name * $name
* @var string * @var string
*/ */
protected $name; protected $name;
/** /**
* $photo_urls * $photo_urls
* @var string[] * @var string[]
*/ */
protected $photo_urls; protected $photo_urls;
/** /**
* $tags * $tags
* @var \Swagger\Client\Model\Tag[] * @var \Swagger\Client\Model\Tag[]
*/ */
protected $tags; protected $tags;
/** /**
* $status pet status in the store * $status pet status in the store
* @var string * @var string
*/ */
protected $status; protected $status;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -178,6 +177,7 @@ class Pet implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
if ($data != null) { if ($data != null) {
$this->id = $data["id"]; $this->id = $data["id"];
$this->category = $data["category"]; $this->category = $data["category"];
@ -187,9 +187,8 @@ class Pet implements ArrayAccess
$this->status = $data["status"]; $this->status = $data["status"];
} }
} }
/** /**
* Gets id. * Gets id
* @return int * @return int
*/ */
public function getId() public function getId()
@ -198,7 +197,7 @@ class Pet implements ArrayAccess
} }
/** /**
* Sets id. * Sets id
* @param int $id * @param int $id
* @return $this * @return $this
*/ */
@ -208,9 +207,8 @@ class Pet implements ArrayAccess
$this->id = $id; $this->id = $id;
return $this; return $this;
} }
/** /**
* Gets category. * Gets category
* @return \Swagger\Client\Model\Category * @return \Swagger\Client\Model\Category
*/ */
public function getCategory() public function getCategory()
@ -219,7 +217,7 @@ class Pet implements ArrayAccess
} }
/** /**
* Sets category. * Sets category
* @param \Swagger\Client\Model\Category $category * @param \Swagger\Client\Model\Category $category
* @return $this * @return $this
*/ */
@ -229,9 +227,8 @@ class Pet implements ArrayAccess
$this->category = $category; $this->category = $category;
return $this; return $this;
} }
/** /**
* Gets name. * Gets name
* @return string * @return string
*/ */
public function getName() public function getName()
@ -240,7 +237,7 @@ class Pet implements ArrayAccess
} }
/** /**
* Sets name. * Sets name
* @param string $name * @param string $name
* @return $this * @return $this
*/ */
@ -250,9 +247,8 @@ class Pet implements ArrayAccess
$this->name = $name; $this->name = $name;
return $this; return $this;
} }
/** /**
* Gets photo_urls. * Gets photo_urls
* @return string[] * @return string[]
*/ */
public function getPhotoUrls() public function getPhotoUrls()
@ -261,7 +257,7 @@ class Pet implements ArrayAccess
} }
/** /**
* Sets photo_urls. * Sets photo_urls
* @param string[] $photo_urls * @param string[] $photo_urls
* @return $this * @return $this
*/ */
@ -271,9 +267,8 @@ class Pet implements ArrayAccess
$this->photo_urls = $photo_urls; $this->photo_urls = $photo_urls;
return $this; return $this;
} }
/** /**
* Gets tags. * Gets tags
* @return \Swagger\Client\Model\Tag[] * @return \Swagger\Client\Model\Tag[]
*/ */
public function getTags() public function getTags()
@ -282,7 +277,7 @@ class Pet implements ArrayAccess
} }
/** /**
* Sets tags. * Sets tags
* @param \Swagger\Client\Model\Tag[] $tags * @param \Swagger\Client\Model\Tag[] $tags
* @return $this * @return $this
*/ */
@ -292,9 +287,8 @@ class Pet implements ArrayAccess
$this->tags = $tags; $this->tags = $tags;
return $this; return $this;
} }
/** /**
* Gets status. * Gets status
* @return string * @return string
*/ */
public function getStatus() public function getStatus()
@ -303,7 +297,7 @@ class Pet implements ArrayAccess
} }
/** /**
* Sets status. * Sets status
* @param string $status pet status in the store * @param string $status pet status in the store
* @return $this * @return $this
*/ */
@ -316,7 +310,6 @@ class Pet implements ArrayAccess
$this->status = $status; $this->status = $status;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -359,17 +352,15 @@ class Pet implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -47,9 +47,15 @@ use \ArrayAccess;
class SpecialModelName implements ArrayAccess class SpecialModelName implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = '$special[model.name]';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'special_property_name' => 'int' 'special_property_name' => 'int'
); );
@ -98,14 +104,12 @@ class SpecialModelName implements ArrayAccess
/** /**
* $special_property_name * $special_property_name
* @var int * @var int
*/ */
protected $special_property_name; protected $special_property_name;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -113,13 +117,13 @@ class SpecialModelName implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
if ($data != null) { if ($data != null) {
$this->special_property_name = $data["special_property_name"]; $this->special_property_name = $data["special_property_name"];
} }
} }
/** /**
* Gets special_property_name. * Gets special_property_name
* @return int * @return int
*/ */
public function getSpecialPropertyName() public function getSpecialPropertyName()
@ -128,7 +132,7 @@ class SpecialModelName implements ArrayAccess
} }
/** /**
* Sets special_property_name. * Sets special_property_name
* @param int $special_property_name * @param int $special_property_name
* @return $this * @return $this
*/ */
@ -138,7 +142,6 @@ class SpecialModelName implements ArrayAccess
$this->special_property_name = $special_property_name; $this->special_property_name = $special_property_name;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -181,17 +184,15 @@ class SpecialModelName implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -47,9 +47,15 @@ use \ArrayAccess;
class Tag implements ArrayAccess class Tag implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'Tag';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'id' => 'int', 'id' => 'int',
'name' => 'string' 'name' => 'string'
@ -102,20 +108,17 @@ class Tag implements ArrayAccess
/** /**
* $id * $id
* @var int * @var int
*/ */
protected $id; protected $id;
/** /**
* $name * $name
* @var string * @var string
*/ */
protected $name; protected $name;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -123,14 +126,14 @@ class Tag implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
if ($data != null) { if ($data != null) {
$this->id = $data["id"]; $this->id = $data["id"];
$this->name = $data["name"]; $this->name = $data["name"];
} }
} }
/** /**
* Gets id. * Gets id
* @return int * @return int
*/ */
public function getId() public function getId()
@ -139,7 +142,7 @@ class Tag implements ArrayAccess
} }
/** /**
* Sets id. * Sets id
* @param int $id * @param int $id
* @return $this * @return $this
*/ */
@ -149,9 +152,8 @@ class Tag implements ArrayAccess
$this->id = $id; $this->id = $id;
return $this; return $this;
} }
/** /**
* Gets name. * Gets name
* @return string * @return string
*/ */
public function getName() public function getName()
@ -160,7 +162,7 @@ class Tag implements ArrayAccess
} }
/** /**
* Sets name. * Sets name
* @param string $name * @param string $name
* @return $this * @return $this
*/ */
@ -170,7 +172,6 @@ class Tag implements ArrayAccess
$this->name = $name; $this->name = $name;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -213,17 +214,15 @@ class Tag implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>

View File

@ -47,9 +47,15 @@ use \ArrayAccess;
class User implements ArrayAccess class User implements ArrayAccess
{ {
/** /**
* Array of property to type mappings. Used for (de)serialization * The original name of the model.
* @var string[] * @var string
*/ */
static $swaggerModelName = 'User';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array( static $swaggerTypes = array(
'id' => 'int', 'id' => 'int',
'username' => 'string', 'username' => 'string',
@ -126,56 +132,47 @@ class User implements ArrayAccess
/** /**
* $id * $id
* @var int * @var int
*/ */
protected $id; protected $id;
/** /**
* $username * $username
* @var string * @var string
*/ */
protected $username; protected $username;
/** /**
* $first_name * $first_name
* @var string * @var string
*/ */
protected $first_name; protected $first_name;
/** /**
* $last_name * $last_name
* @var string * @var string
*/ */
protected $last_name; protected $last_name;
/** /**
* $email * $email
* @var string * @var string
*/ */
protected $email; protected $email;
/** /**
* $password * $password
* @var string * @var string
*/ */
protected $password; protected $password;
/** /**
* $phone * $phone
* @var string * @var string
*/ */
protected $phone; protected $phone;
/** /**
* $user_status User Status * $user_status User Status
* @var int * @var int
*/ */
protected $user_status; protected $user_status;
/** /**
* Constructor * Constructor
* @param mixed[] $data Associated array of property value initalizing the model * @param mixed[] $data Associated array of property value initalizing the model
@ -183,6 +180,7 @@ class User implements ArrayAccess
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
if ($data != null) { if ($data != null) {
$this->id = $data["id"]; $this->id = $data["id"];
$this->username = $data["username"]; $this->username = $data["username"];
@ -194,9 +192,8 @@ class User implements ArrayAccess
$this->user_status = $data["user_status"]; $this->user_status = $data["user_status"];
} }
} }
/** /**
* Gets id. * Gets id
* @return int * @return int
*/ */
public function getId() public function getId()
@ -205,7 +202,7 @@ class User implements ArrayAccess
} }
/** /**
* Sets id. * Sets id
* @param int $id * @param int $id
* @return $this * @return $this
*/ */
@ -215,9 +212,8 @@ class User implements ArrayAccess
$this->id = $id; $this->id = $id;
return $this; return $this;
} }
/** /**
* Gets username. * Gets username
* @return string * @return string
*/ */
public function getUsername() public function getUsername()
@ -226,7 +222,7 @@ class User implements ArrayAccess
} }
/** /**
* Sets username. * Sets username
* @param string $username * @param string $username
* @return $this * @return $this
*/ */
@ -236,9 +232,8 @@ class User implements ArrayAccess
$this->username = $username; $this->username = $username;
return $this; return $this;
} }
/** /**
* Gets first_name. * Gets first_name
* @return string * @return string
*/ */
public function getFirstName() public function getFirstName()
@ -247,7 +242,7 @@ class User implements ArrayAccess
} }
/** /**
* Sets first_name. * Sets first_name
* @param string $first_name * @param string $first_name
* @return $this * @return $this
*/ */
@ -257,9 +252,8 @@ class User implements ArrayAccess
$this->first_name = $first_name; $this->first_name = $first_name;
return $this; return $this;
} }
/** /**
* Gets last_name. * Gets last_name
* @return string * @return string
*/ */
public function getLastName() public function getLastName()
@ -268,7 +262,7 @@ class User implements ArrayAccess
} }
/** /**
* Sets last_name. * Sets last_name
* @param string $last_name * @param string $last_name
* @return $this * @return $this
*/ */
@ -278,9 +272,8 @@ class User implements ArrayAccess
$this->last_name = $last_name; $this->last_name = $last_name;
return $this; return $this;
} }
/** /**
* Gets email. * Gets email
* @return string * @return string
*/ */
public function getEmail() public function getEmail()
@ -289,7 +282,7 @@ class User implements ArrayAccess
} }
/** /**
* Sets email. * Sets email
* @param string $email * @param string $email
* @return $this * @return $this
*/ */
@ -299,9 +292,8 @@ class User implements ArrayAccess
$this->email = $email; $this->email = $email;
return $this; return $this;
} }
/** /**
* Gets password. * Gets password
* @return string * @return string
*/ */
public function getPassword() public function getPassword()
@ -310,7 +302,7 @@ class User implements ArrayAccess
} }
/** /**
* Sets password. * Sets password
* @param string $password * @param string $password
* @return $this * @return $this
*/ */
@ -320,9 +312,8 @@ class User implements ArrayAccess
$this->password = $password; $this->password = $password;
return $this; return $this;
} }
/** /**
* Gets phone. * Gets phone
* @return string * @return string
*/ */
public function getPhone() public function getPhone()
@ -331,7 +322,7 @@ class User implements ArrayAccess
} }
/** /**
* Sets phone. * Sets phone
* @param string $phone * @param string $phone
* @return $this * @return $this
*/ */
@ -341,9 +332,8 @@ class User implements ArrayAccess
$this->phone = $phone; $this->phone = $phone;
return $this; return $this;
} }
/** /**
* Gets user_status. * Gets user_status
* @return int * @return int
*/ */
public function getUserStatus() public function getUserStatus()
@ -352,7 +342,7 @@ class User implements ArrayAccess
} }
/** /**
* Sets user_status. * Sets user_status
* @param int $user_status User Status * @param int $user_status User Status
* @return $this * @return $this
*/ */
@ -362,7 +352,6 @@ class User implements ArrayAccess
$this->user_status = $user_status; $this->user_status = $user_status;
return $this; return $this;
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset
@ -405,17 +394,15 @@ class User implements ArrayAccess
} }
/** /**
* Gets the string presentation of the object. * Gets the string presentation of the object
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
} }
} }
?>