-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
901 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
samples/Aliencube.AzureFunctions.FunctionApp.Models/ApiResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace Aliencube.AzureFunctions.FunctionApp.Models | ||
{ | ||
/// <summary> | ||
/// This represents the model entity for API response of Swagger Pet Store. | ||
/// </summary> | ||
public class ApiResponse | ||
{ | ||
/// <summary> | ||
/// Gets or sets the code. | ||
/// </summary> | ||
public int? Code { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the type. | ||
/// </summary> | ||
public string Type { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the message. | ||
/// </summary> | ||
public string Message { get; set; } | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
samples/Aliencube.AzureFunctions.FunctionApp.Models/Category.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Aliencube.AzureFunctions.FunctionApp.Models | ||
{ | ||
/// <summary> | ||
/// This represents the model entity for category of Swagger Pet Store. | ||
/// </summary> | ||
public class Category | ||
{ | ||
/// <summary> | ||
/// Gets or sets the category ID. | ||
/// </summary> | ||
public long? Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the name. | ||
/// </summary> | ||
public string Name { get; set; } | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
samples/Aliencube.AzureFunctions.FunctionApp.Models/Order.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
|
||
namespace Aliencube.AzureFunctions.FunctionApp.Models | ||
{ | ||
/// <summary> | ||
/// This represents the model entity for order of Swagger Pet Store. | ||
/// </summary> | ||
public class Order | ||
{ | ||
/// <summary> | ||
/// Gets or sets the order ID. | ||
/// </summary> | ||
public long? Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the pet ID. | ||
/// </summary> | ||
public long? PetId { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the quantity. | ||
/// </summary> | ||
public int? Quantity { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or seets the date/time shipped. | ||
/// </summary> | ||
public DateTime? ShipDate { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the <see cref="OrderStatus"/> value. | ||
/// </summary> | ||
public OrderStatus? Status { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the value indicating whether the order is complete or not. | ||
/// </summary> | ||
public bool? Complete { get; set; } | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
samples/Aliencube.AzureFunctions.FunctionApp.Models/OrderStatus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace Aliencube.AzureFunctions.FunctionApp.Models | ||
{ | ||
/// <summary> | ||
/// This specifies the order status. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum OrderStatus | ||
{ | ||
/// <summary> | ||
/// Identifies as "placed". | ||
/// </summary> | ||
Placed = 1, | ||
|
||
/// <summary> | ||
/// Identifies as "approved". | ||
/// </summary> | ||
Approved = 2, | ||
|
||
/// <summary> | ||
/// Identifies as "delivered". | ||
/// </summary> | ||
Delivered = 3 | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
samples/Aliencube.AzureFunctions.FunctionApp.Models/Pet.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System.Collections.Generic; | ||
|
||
using Newtonsoft.Json; | ||
|
||
namespace Aliencube.AzureFunctions.FunctionApp.Models | ||
{ | ||
/// <summary> | ||
/// This represents the model entity for pet of Swagger Pet Store. | ||
/// </summary> | ||
public class Pet | ||
{ | ||
/// <summary> | ||
/// Gets or sets the pet ID. | ||
/// </summary> | ||
public long? Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the category. | ||
/// </summary> | ||
public Category Category { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the name. | ||
/// </summary> | ||
[JsonRequired] | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the list of photo URLs. | ||
/// </summary> | ||
[JsonRequired] | ||
public List<string> PhotoUrls { get; set; } = new List<string>(); | ||
|
||
/// <summary> | ||
/// Gets or sets the list of tags. | ||
/// </summary> | ||
public List<Tag> Tags { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the <see cref="PetStatus"/> value. | ||
/// </summary> | ||
public PetStatus? Status { get; set; } | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
samples/Aliencube.AzureFunctions.FunctionApp.Models/PetStatus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace Aliencube.AzureFunctions.FunctionApp.Models | ||
{ | ||
/// <summary> | ||
/// This specifices the pet status. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum PetStatus | ||
{ | ||
/// <summary> | ||
/// Identifies as "available". | ||
/// </summary> | ||
Available = 1, | ||
|
||
/// <summary> | ||
/// Identifies as "pending". | ||
/// </summary> | ||
Pending = 2, | ||
|
||
/// <summary> | ||
/// Identifies as "sold". | ||
/// </summary> | ||
Sold = 3 | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
samples/Aliencube.AzureFunctions.FunctionApp.Models/Tag.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Aliencube.AzureFunctions.FunctionApp.Models | ||
{ | ||
/// <summary> | ||
/// This represents the model entity for tag of Swagger Pet Store. | ||
/// </summary> | ||
public class Tag | ||
{ | ||
/// <summary> | ||
/// Gets or sets the tag ID. | ||
/// </summary> | ||
public long? Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the name. | ||
/// </summary> | ||
public string Name { get; set; } | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
samples/Aliencube.AzureFunctions.FunctionApp.Models/User.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
namespace Aliencube.AzureFunctions.FunctionApp.Models | ||
{ | ||
/// <summary> | ||
/// This represents the model entity for user of Swagger Pet Store. | ||
/// </summary> | ||
public class User | ||
{ | ||
/// <summary> | ||
/// Gets or sets the user ID. | ||
/// </summary> | ||
public long? Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the username. | ||
/// </summary> | ||
public string Username { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the first name. | ||
/// </summary> | ||
public string FirstName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the last name. | ||
/// </summary> | ||
public string LastName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the email. | ||
/// </summary> | ||
public string Email { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the password. | ||
/// </summary> | ||
public string Password { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the phone number. | ||
/// </summary> | ||
public string Phone { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the user status value. | ||
/// </summary> | ||
public int? UserStatus { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.