< Summary

Information
Class: /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/Person.cs
Assembly: Default
File(s): /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/Person.cs
Line coverage
13%
Covered lines: 7
Uncovered lines: 45
Coverable lines: 52
Total lines: 146
Line coverage: 13.4%
Branch coverage
0%
Covered branches: 0
Total branches: 16
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

File(s)

/home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/Person.cs

#LineLine coverage
 1/*
 2 * WeShare API
 3 *
 4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 5 *
 6 * The version of the OpenAPI document: 1.0
 7 * Generated by: https://github.com/openapitools/openapi-generator.git
 8 */
 9
 10
 11using System;
 12using System.Collections;
 13using System.Collections.Generic;
 14using System.Collections.ObjectModel;
 15using System.Linq;
 16using System.IO;
 17using System.Runtime.Serialization;
 18using System.Text;
 19using System.Text.RegularExpressions;
 20using Newtonsoft.Json;
 21using Newtonsoft.Json.Converters;
 22using Newtonsoft.Json.Linq;
 23using System.ComponentModel.DataAnnotations;
 24using OpenAPIDateConverter = Applications.WeShare.Swagger.Client.OpenAPIDateConverter;
 25
 26namespace Applications.WeShare.Swagger.Model
 27{
 28    /// <summary>
 29    /// Person
 30    /// </summary>
 31    [DataContract(Name = "Person")]
 32    public partial class Person : IEquatable<Person>, IValidatableObject
 33    {
 34        /// <summary>
 35        /// Initializes a new instance of the <see cref="Person" /> class.
 36        /// </summary>
 37        /// <param name="name">name.</param>
 38        /// <param name="email">email.</param>
 439        public Person(string name = default(string), string email = default(string))
 440        {
 441            this.Name = name;
 442            this.Email = email;
 443        }
 44
 45        /// <summary>
 46        /// Gets or Sets Name
 47        /// </summary>
 48        [DataMember(Name = "name", EmitDefaultValue = false)]
 449        public string Name { get; set; }
 50
 51        /// <summary>
 52        /// Gets or Sets Email
 53        /// </summary>
 54        [DataMember(Name = "email", EmitDefaultValue = false)]
 655        public string Email { get; set; }
 56
 57        /// <summary>
 58        /// Returns the string presentation of the object
 59        /// </summary>
 60        /// <returns>String presentation of the object</returns>
 61        public override string ToString()
 062        {
 063            StringBuilder sb = new StringBuilder();
 064            sb.Append("class Person {\n");
 065            sb.Append("  Name: ").Append(Name).Append("\n");
 066            sb.Append("  Email: ").Append(Email).Append("\n");
 067            sb.Append("}\n");
 068            return sb.ToString();
 069        }
 70
 71        /// <summary>
 72        /// Returns the JSON string presentation of the object
 73        /// </summary>
 74        /// <returns>JSON string presentation of the object</returns>
 75        public virtual string ToJson()
 076        {
 077            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
 078        }
 79
 80        /// <summary>
 81        /// Returns true if objects are equal
 82        /// </summary>
 83        /// <param name="input">Object to be compared</param>
 84        /// <returns>Boolean</returns>
 85        public override bool Equals(object input)
 086        {
 087            return this.Equals(input as Person);
 088        }
 89
 90        /// <summary>
 91        /// Returns true if Person instances are equal
 92        /// </summary>
 93        /// <param name="input">Instance of Person to be compared</param>
 94        /// <returns>Boolean</returns>
 95        public bool Equals(Person input)
 096        {
 097            if (input == null)
 098            {
 099                return false;
 100            }
 0101            return
 0102                (
 0103                    this.Name == input.Name ||
 0104                    (this.Name != null &&
 0105                    this.Name.Equals(input.Name))
 0106                ) &&
 0107                (
 0108                    this.Email == input.Email ||
 0109                    (this.Email != null &&
 0110                    this.Email.Equals(input.Email))
 0111                );
 0112        }
 113
 114        /// <summary>
 115        /// Gets the hash code
 116        /// </summary>
 117        /// <returns>Hash code</returns>
 118        public override int GetHashCode()
 0119        {
 120            unchecked // Overflow is fine, just wrap
 0121            {
 0122                int hashCode = 41;
 0123                if (this.Name != null)
 0124                {
 0125                    hashCode = (hashCode * 59) + this.Name.GetHashCode();
 0126                }
 0127                if (this.Email != null)
 0128                {
 0129                    hashCode = (hashCode * 59) + this.Email.GetHashCode();
 0130                }
 0131                return hashCode;
 132            }
 0133        }
 134
 135        /// <summary>
 136        /// To validate all properties of the instance
 137        /// </summary>
 138        /// <param name="validationContext">Validation context</param>
 139        /// <returns>Validation Result</returns>
 140        public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validation
 0141        {
 0142            yield break;
 143        }
 144    }
 145
 146}