diff --git a/misc/BreCalApi.cs b/misc/BreCalApi.cs index e1c100f..a5d5b9a 100644 --- a/misc/BreCalApi.cs +++ b/misc/BreCalApi.cs @@ -1,7 +1,7 @@ //---------------------- // -// Generated REST API Client Code Generator v1.9.8.0 on 28.03.2024 07:39:45 +// Generated REST API Client Code Generator v1.9.8.0 on 28.03.2024 17:58:20 // Using the tool OpenAPI Generator v7.4.0 // //---------------------- @@ -1544,9 +1544,10 @@ namespace BreCalClient.misc.Api /// This endpoint returns a list of changes made to the specific shipcall /// /// Thrown when fails to make API call + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. /// List<History> - List HistoryGet(int operationIndex = 0); + List HistoryGet(int shipcallId, int operationIndex = 0); /// /// History data /// @@ -1554,9 +1555,10 @@ namespace BreCalClient.misc.Api /// This endpoint returns a list of changes made to the specific shipcall /// /// Thrown when fails to make API call + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. /// ApiResponse of List<History> - ApiResponse> HistoryGetWithHttpInfo(int operationIndex = 0); + ApiResponse> HistoryGetWithHttpInfo(int shipcallId, int operationIndex = 0); /// /// Gets a list of notifications pursuant to a specified participant and ship call /// @@ -1638,10 +1640,11 @@ namespace BreCalClient.misc.Api /// This endpoint returns a list of changes made to the specific shipcall /// /// Thrown when fails to make API call + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<History> - System.Threading.Tasks.Task> HistoryGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> HistoryGetAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// History data /// @@ -1649,10 +1652,11 @@ namespace BreCalClient.misc.Api /// This endpoint returns a list of changes made to the specific shipcall /// /// Thrown when fails to make API call + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<History>) - System.Threading.Tasks.Task>> HistoryGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> HistoryGetWithHttpInfoAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Gets a list of notifications pursuant to a specified participant and ship call /// @@ -1922,20 +1926,22 @@ namespace BreCalClient.misc.Api /// History data This endpoint returns a list of changes made to the specific shipcall /// /// Thrown when fails to make API call + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. /// List<History> - public List HistoryGet(int operationIndex = 0) + public List HistoryGet(int shipcallId, int operationIndex = 0) { - BreCalClient.misc.Client.ApiResponse> localVarResponse = HistoryGetWithHttpInfo(); + BreCalClient.misc.Client.ApiResponse> localVarResponse = HistoryGetWithHttpInfo(shipcallId); return localVarResponse.Data; } /// /// History data This endpoint returns a list of changes made to the specific shipcall /// /// Thrown when fails to make API call + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. /// ApiResponse of List<History> - public BreCalClient.misc.Client.ApiResponse> HistoryGetWithHttpInfo(int operationIndex = 0) + public BreCalClient.misc.Client.ApiResponse> HistoryGetWithHttpInfo(int shipcallId, int operationIndex = 0) { BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1954,6 +1960,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId)); localVarRequestOptions.Operation = "StaticApi.HistoryGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required @@ -1977,22 +1984,24 @@ namespace BreCalClient.misc.Api /// History data This endpoint returns a list of changes made to the specific shipcall /// /// Thrown when fails to make API call + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<History> - public async System.Threading.Tasks.Task> HistoryGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> HistoryGetAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BreCalClient.misc.Client.ApiResponse> localVarResponse = await HistoryGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + BreCalClient.misc.Client.ApiResponse> localVarResponse = await HistoryGetWithHttpInfoAsync(shipcallId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// History data This endpoint returns a list of changes made to the specific shipcall /// /// Thrown when fails to make API call + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<History>) - public async System.Threading.Tasks.Task>> HistoryGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> HistoryGetWithHttpInfoAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2011,6 +2020,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId)); localVarRequestOptions.Operation = "StaticApi.HistoryGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required @@ -4879,7 +4889,7 @@ namespace BreCalClient.misc.Client /// /// Gets or sets the base path for API access. /// - public virtual string BasePath + public virtual string BasePath { get { return _basePath; } set { _basePath = value; } @@ -6162,7 +6172,7 @@ namespace BreCalClient.misc.Model /// Ship berth used for a ship call /// [DataContract(Name = "berth")] - public partial class Berth : IValidatableObject + public partial class Berth : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -6257,6 +6267,104 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Berth); + } + /// + /// Returns true if Berth instances are equal + /// + /// Instance of Berth to be compared + /// Boolean + public bool Equals(Berth input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + this.Id.Equals(input.Id) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.OwnerId == input.OwnerId || + (this.OwnerId != null && + this.OwnerId.Equals(input.OwnerId)) + ) && + ( + this.AuthorityId == input.AuthorityId || + (this.AuthorityId != null && + this.AuthorityId.Equals(input.AuthorityId)) + ) && + ( + this.VarLock == input.VarLock || + (this.VarLock != null && + this.VarLock.Equals(input.VarLock)) + ) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.Modified == input.Modified || + (this.Modified != null && + this.Modified.Equals(input.Modified)) + ) && + ( + this.Deleted == input.Deleted || + this.Deleted.Equals(input.Deleted) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.OwnerId != null) + { + hashCode = (hashCode * 59) + this.OwnerId.GetHashCode(); + } + if (this.AuthorityId != null) + { + hashCode = (hashCode * 59) + this.AuthorityId.GetHashCode(); + } + if (this.VarLock != null) + { + hashCode = (hashCode * 59) + this.VarLock.GetHashCode(); + } + if (this.Created != null) + { + hashCode = (hashCode * 59) + this.Created.GetHashCode(); + } + if (this.Modified != null) + { + hashCode = (hashCode * 59) + this.Modified.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -6288,7 +6396,7 @@ namespace BreCalClient.misc.Model /// Credentials /// [DataContract(Name = "credentials")] - public partial class Credentials : IValidatableObject + public partial class Credentials : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -6347,6 +6455,58 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Credentials); + } + /// + /// Returns true if Credentials instances are equal + /// + /// Instance of Credentials to be compared + /// Boolean + public bool Equals(Credentials input) + { + if (input == null) + { + return false; + } + return + ( + this.Username == input.Username || + (this.Username != null && + this.Username.Equals(input.Username)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Username != null) + { + hashCode = (hashCode * 59) + this.Username.GetHashCode(); + } + if (this.Password != null) + { + hashCode = (hashCode * 59) + this.Password.GetHashCode(); + } + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -6373,7 +6533,7 @@ namespace BreCalClient.misc.Model /// Error /// [DataContract(Name = "Error")] - public partial class Error : IValidatableObject + public partial class Error : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -6420,6 +6580,49 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Error); + } + /// + /// Returns true if Error instances are equal + /// + /// Instance of Error to be compared + /// Boolean + public bool Equals(Error input) + { + if (input == null) + { + return false; + } + return + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -6486,7 +6689,7 @@ namespace BreCalClient.misc.Model /// Single history entry with references /// [DataContract(Name = "history")] - public partial class History : IValidatableObject + public partial class History : IEquatable, IValidatableObject { /// /// Gets or Sets Operation @@ -6570,6 +6773,83 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as History); + } + /// + /// Returns true if History instances are equal + /// + /// Instance of History to be compared + /// Boolean + public bool Equals(History input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + this.Id.Equals(input.Id) + ) && + ( + this.ParticipantId == input.ParticipantId || + this.ParticipantId.Equals(input.ParticipantId) + ) && + ( + this.ShipcallId == input.ShipcallId || + this.ShipcallId.Equals(input.ShipcallId) + ) && + ( + this.Timestamp == input.Timestamp || + (this.Timestamp != null && + this.Timestamp.Equals(input.Timestamp)) + ) && + ( + this.Eta == input.Eta || + (this.Eta != null && + this.Eta.Equals(input.Eta)) + ) && + ( + this.Operation == input.Operation || + this.Operation.Equals(input.Operation) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode(); + hashCode = (hashCode * 59) + this.ShipcallId.GetHashCode(); + if (this.Timestamp != null) + { + hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); + } + if (this.Eta != null) + { + hashCode = (hashCode * 59) + this.Eta.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Operation.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -6596,7 +6876,7 @@ namespace BreCalClient.misc.Model /// A unique identifier for an entity /// [DataContract(Name = "Id")] - public partial class Id : IValidatableObject + public partial class Id : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -6632,6 +6912,45 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Id); + } + /// + /// Returns true if Id instances are equal + /// + /// Instance of Id to be compared + /// Boolean + public bool Equals(Id input) + { + if (input == null) + { + return false; + } + return + ( + this.VarId == input.VarId || + this.VarId.Equals(input.VarId) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.VarId.GetHashCode(); + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -6658,7 +6977,7 @@ namespace BreCalClient.misc.Model /// result structure of a successful login attempt /// [DataContract(Name = "login_result")] - public partial class LoginResult : IValidatableObject + public partial class LoginResult : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -6758,6 +7077,109 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as LoginResult); + } + /// + /// Returns true if LoginResult instances are equal + /// + /// Instance of LoginResult to be compared + /// Boolean + public bool Equals(LoginResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + this.Id.Equals(input.Id) + ) && + ( + this.ParticipantId == input.ParticipantId || + this.ParticipantId.Equals(input.ParticipantId) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.UserName == input.UserName || + (this.UserName != null && + this.UserName.Equals(input.UserName)) + ) && + ( + this.UserPhone == input.UserPhone || + (this.UserPhone != null && + this.UserPhone.Equals(input.UserPhone)) + ) && + ( + this.UserEmail == input.UserEmail || + (this.UserEmail != null && + this.UserEmail.Equals(input.UserEmail)) + ) && + ( + this.Exp == input.Exp || + this.Exp.Equals(input.Exp) + ) && + ( + this.Token == input.Token || + (this.Token != null && + this.Token.Equals(input.Token)) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode(); + if (this.FirstName != null) + { + hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + } + if (this.LastName != null) + { + hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + } + if (this.UserName != null) + { + hashCode = (hashCode * 59) + this.UserName.GetHashCode(); + } + if (this.UserPhone != null) + { + hashCode = (hashCode * 59) + this.UserPhone.GetHashCode(); + } + if (this.UserEmail != null) + { + hashCode = (hashCode * 59) + this.UserEmail.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Exp.GetHashCode(); + if (this.Token != null) + { + hashCode = (hashCode * 59) + this.Token.GetHashCode(); + } + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -6784,7 +7206,7 @@ namespace BreCalClient.misc.Model /// a notification created by the engine if a times entry violates a rule /// [DataContract(Name = "notification")] - public partial class Notification : IValidatableObject + public partial class Notification : IEquatable, IValidatableObject { /// /// Gets or Sets NotificationType @@ -6862,6 +7284,82 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Notification); + } + /// + /// Returns true if Notification instances are equal + /// + /// Instance of Notification to be compared + /// Boolean + public bool Equals(Notification input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + this.Id.Equals(input.Id) + ) && + ( + this.ShipcallId == input.ShipcallId || + this.ShipcallId.Equals(input.ShipcallId) + ) && + ( + this.NotificationType == input.NotificationType || + this.NotificationType.Equals(input.NotificationType) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.Modified == input.Modified || + (this.Modified != null && + this.Modified.Equals(input.Modified)) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.ShipcallId.GetHashCode(); + hashCode = (hashCode * 59) + this.NotificationType.GetHashCode(); + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.Created != null) + { + hashCode = (hashCode * 59) + this.Created.GetHashCode(); + } + if (this.Modified != null) + { + hashCode = (hashCode * 59) + this.Modified.GetHashCode(); + } + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -6993,7 +7491,7 @@ namespace BreCalClient.misc.Model /// A organisational entity that participates in Bremen Calling /// [DataContract(Name = "participant")] - public partial class Participant : IValidatableObject + public partial class Participant : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -7104,6 +7602,118 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Participant); + } + /// + /// Returns true if Participant instances are equal + /// + /// Instance of Participant to be compared + /// Boolean + public bool Equals(Participant input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + this.Id.Equals(input.Id) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Street == input.Street || + (this.Street != null && + this.Street.Equals(input.Street)) + ) && + ( + this.PostalCode == input.PostalCode || + (this.PostalCode != null && + this.PostalCode.Equals(input.PostalCode)) + ) && + ( + this.City == input.City || + (this.City != null && + this.City.Equals(input.City)) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) && + ( + this.Flags == input.Flags || + (this.Flags != null && + this.Flags.Equals(input.Flags)) + ) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.Modified == input.Modified || + (this.Modified != null && + this.Modified.Equals(input.Modified)) + ) && + ( + this.Deleted == input.Deleted || + this.Deleted.Equals(input.Deleted) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Street != null) + { + hashCode = (hashCode * 59) + this.Street.GetHashCode(); + } + if (this.PostalCode != null) + { + hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); + } + if (this.City != null) + { + hashCode = (hashCode * 59) + this.City.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Flags != null) + { + hashCode = (hashCode * 59) + this.Flags.GetHashCode(); + } + if (this.Created != null) + { + hashCode = (hashCode * 59) + this.Created.GetHashCode(); + } + if (this.Modified != null) + { + hashCode = (hashCode * 59) + this.Modified.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -7150,7 +7760,7 @@ namespace BreCalClient.misc.Model /// Participant assigned to a shipcall with a given role (type) /// [DataContract(Name = "participant_assignment")] - public partial class ParticipantAssignment : IValidatableObject + public partial class ParticipantAssignment : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -7200,6 +7810,50 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParticipantAssignment); + } + /// + /// Returns true if ParticipantAssignment instances are equal + /// + /// Instance of ParticipantAssignment to be compared + /// Boolean + public bool Equals(ParticipantAssignment input) + { + if (input == null) + { + return false; + } + return + ( + this.ParticipantId == input.ParticipantId || + this.ParticipantId.Equals(input.ParticipantId) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -7226,7 +7880,7 @@ namespace BreCalClient.misc.Model /// a ship /// [DataContract(Name = "ship")] - public partial class Ship : IValidatableObject + public partial class Ship : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -7360,6 +8014,145 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Ship); + } + /// + /// Returns true if Ship instances are equal + /// + /// Instance of Ship to be compared + /// Boolean + public bool Equals(Ship input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + this.Id.Equals(input.Id) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Imo == input.Imo || + (this.Imo != null && + this.Imo.Equals(input.Imo)) + ) && + ( + this.Callsign == input.Callsign || + (this.Callsign != null && + this.Callsign.Equals(input.Callsign)) + ) && + ( + this.ParticipantId == input.ParticipantId || + (this.ParticipantId != null && + this.ParticipantId.Equals(input.ParticipantId)) + ) && + ( + this.Length == input.Length || + (this.Length != null && + this.Length.Equals(input.Length)) + ) && + ( + this.Width == input.Width || + (this.Width != null && + this.Width.Equals(input.Width)) + ) && + ( + this.IsTug == input.IsTug || + this.IsTug.Equals(input.IsTug) + ) && + ( + this.BollardPull == input.BollardPull || + (this.BollardPull != null && + this.BollardPull.Equals(input.BollardPull)) + ) && + ( + this.Eni == input.Eni || + (this.Eni != null && + this.Eni.Equals(input.Eni)) + ) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.Modified == input.Modified || + (this.Modified != null && + this.Modified.Equals(input.Modified)) + ) && + ( + this.Deleted == input.Deleted || + this.Deleted.Equals(input.Deleted) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Imo != null) + { + hashCode = (hashCode * 59) + this.Imo.GetHashCode(); + } + if (this.Callsign != null) + { + hashCode = (hashCode * 59) + this.Callsign.GetHashCode(); + } + if (this.ParticipantId != null) + { + hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode(); + } + if (this.Length != null) + { + hashCode = (hashCode * 59) + this.Length.GetHashCode(); + } + if (this.Width != null) + { + hashCode = (hashCode * 59) + this.Width.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsTug.GetHashCode(); + if (this.BollardPull != null) + { + hashCode = (hashCode * 59) + this.BollardPull.GetHashCode(); + } + if (this.Eni != null) + { + hashCode = (hashCode * 59) + this.Eni.GetHashCode(); + } + if (this.Created != null) + { + hashCode = (hashCode * 59) + this.Created.GetHashCode(); + } + if (this.Modified != null) + { + hashCode = (hashCode * 59) + this.Modified.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -7396,7 +8189,7 @@ namespace BreCalClient.misc.Model /// Shipcall /// [DataContract(Name = "shipcall")] - public partial class Shipcall : IValidatableObject + public partial class Shipcall : IEquatable, IValidatableObject { /// /// Gets or Sets Type @@ -7665,6 +8458,286 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Shipcall); + } + /// + /// Returns true if Shipcall instances are equal + /// + /// Instance of Shipcall to be compared + /// Boolean + public bool Equals(Shipcall input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + this.Id.Equals(input.Id) + ) && + ( + this.ShipId == input.ShipId || + this.ShipId.Equals(input.ShipId) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) && + ( + this.Eta == input.Eta || + (this.Eta != null && + this.Eta.Equals(input.Eta)) + ) && + ( + this.Voyage == input.Voyage || + (this.Voyage != null && + this.Voyage.Equals(input.Voyage)) + ) && + ( + this.Etd == input.Etd || + (this.Etd != null && + this.Etd.Equals(input.Etd)) + ) && + ( + this.ArrivalBerthId == input.ArrivalBerthId || + (this.ArrivalBerthId != null && + this.ArrivalBerthId.Equals(input.ArrivalBerthId)) + ) && + ( + this.DepartureBerthId == input.DepartureBerthId || + (this.DepartureBerthId != null && + this.DepartureBerthId.Equals(input.DepartureBerthId)) + ) && + ( + this.TugRequired == input.TugRequired || + (this.TugRequired != null && + this.TugRequired.Equals(input.TugRequired)) + ) && + ( + this.PilotRequired == input.PilotRequired || + (this.PilotRequired != null && + this.PilotRequired.Equals(input.PilotRequired)) + ) && + ( + this.Flags == input.Flags || + (this.Flags != null && + this.Flags.Equals(input.Flags)) + ) && + ( + this.PierSide == input.PierSide || + (this.PierSide != null && + this.PierSide.Equals(input.PierSide)) + ) && + ( + this.Bunkering == input.Bunkering || + (this.Bunkering != null && + this.Bunkering.Equals(input.Bunkering)) + ) && + ( + this.ReplenishingTerminal == input.ReplenishingTerminal || + (this.ReplenishingTerminal != null && + this.ReplenishingTerminal.Equals(input.ReplenishingTerminal)) + ) && + ( + this.ReplenishingLock == input.ReplenishingLock || + (this.ReplenishingLock != null && + this.ReplenishingLock.Equals(input.ReplenishingLock)) + ) && + ( + this.Draft == input.Draft || + (this.Draft != null && + this.Draft.Equals(input.Draft)) + ) && + ( + this.TidalWindowFrom == input.TidalWindowFrom || + (this.TidalWindowFrom != null && + this.TidalWindowFrom.Equals(input.TidalWindowFrom)) + ) && + ( + this.TidalWindowTo == input.TidalWindowTo || + (this.TidalWindowTo != null && + this.TidalWindowTo.Equals(input.TidalWindowTo)) + ) && + ( + this.RainSensitiveCargo == input.RainSensitiveCargo || + (this.RainSensitiveCargo != null && + this.RainSensitiveCargo.Equals(input.RainSensitiveCargo)) + ) && + ( + this.RecommendedTugs == input.RecommendedTugs || + (this.RecommendedTugs != null && + this.RecommendedTugs.Equals(input.RecommendedTugs)) + ) && + ( + this.Anchored == input.Anchored || + (this.Anchored != null && + this.Anchored.Equals(input.Anchored)) + ) && + ( + this.MooredLock == input.MooredLock || + (this.MooredLock != null && + this.MooredLock.Equals(input.MooredLock)) + ) && + ( + this.Canceled == input.Canceled || + (this.Canceled != null && + this.Canceled.Equals(input.Canceled)) + ) && + ( + this.Evaluation == input.Evaluation || + this.Evaluation.Equals(input.Evaluation) + ) && + ( + this.EvaluationMessage == input.EvaluationMessage || + (this.EvaluationMessage != null && + this.EvaluationMessage.Equals(input.EvaluationMessage)) + ) && + ( + this.TimeRefPoint == input.TimeRefPoint || + (this.TimeRefPoint != null && + this.TimeRefPoint.Equals(input.TimeRefPoint)) + ) && + ( + this.Participants == input.Participants || + this.Participants != null && + input.Participants != null && + this.Participants.SequenceEqual(input.Participants) + ) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.Modified == input.Modified || + (this.Modified != null && + this.Modified.Equals(input.Modified)) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.ShipId.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.Eta != null) + { + hashCode = (hashCode * 59) + this.Eta.GetHashCode(); + } + if (this.Voyage != null) + { + hashCode = (hashCode * 59) + this.Voyage.GetHashCode(); + } + if (this.Etd != null) + { + hashCode = (hashCode * 59) + this.Etd.GetHashCode(); + } + if (this.ArrivalBerthId != null) + { + hashCode = (hashCode * 59) + this.ArrivalBerthId.GetHashCode(); + } + if (this.DepartureBerthId != null) + { + hashCode = (hashCode * 59) + this.DepartureBerthId.GetHashCode(); + } + if (this.TugRequired != null) + { + hashCode = (hashCode * 59) + this.TugRequired.GetHashCode(); + } + if (this.PilotRequired != null) + { + hashCode = (hashCode * 59) + this.PilotRequired.GetHashCode(); + } + if (this.Flags != null) + { + hashCode = (hashCode * 59) + this.Flags.GetHashCode(); + } + if (this.PierSide != null) + { + hashCode = (hashCode * 59) + this.PierSide.GetHashCode(); + } + if (this.Bunkering != null) + { + hashCode = (hashCode * 59) + this.Bunkering.GetHashCode(); + } + if (this.ReplenishingTerminal != null) + { + hashCode = (hashCode * 59) + this.ReplenishingTerminal.GetHashCode(); + } + if (this.ReplenishingLock != null) + { + hashCode = (hashCode * 59) + this.ReplenishingLock.GetHashCode(); + } + if (this.Draft != null) + { + hashCode = (hashCode * 59) + this.Draft.GetHashCode(); + } + if (this.TidalWindowFrom != null) + { + hashCode = (hashCode * 59) + this.TidalWindowFrom.GetHashCode(); + } + if (this.TidalWindowTo != null) + { + hashCode = (hashCode * 59) + this.TidalWindowTo.GetHashCode(); + } + if (this.RainSensitiveCargo != null) + { + hashCode = (hashCode * 59) + this.RainSensitiveCargo.GetHashCode(); + } + if (this.RecommendedTugs != null) + { + hashCode = (hashCode * 59) + this.RecommendedTugs.GetHashCode(); + } + if (this.Anchored != null) + { + hashCode = (hashCode * 59) + this.Anchored.GetHashCode(); + } + if (this.MooredLock != null) + { + hashCode = (hashCode * 59) + this.MooredLock.GetHashCode(); + } + if (this.Canceled != null) + { + hashCode = (hashCode * 59) + this.Canceled.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Evaluation.GetHashCode(); + if (this.EvaluationMessage != null) + { + hashCode = (hashCode * 59) + this.EvaluationMessage.GetHashCode(); + } + if (this.TimeRefPoint != null) + { + hashCode = (hashCode * 59) + this.TimeRefPoint.GetHashCode(); + } + if (this.Participants != null) + { + hashCode = (hashCode * 59) + this.Participants.GetHashCode(); + } + if (this.Created != null) + { + hashCode = (hashCode * 59) + this.Created.GetHashCode(); + } + if (this.Modified != null) + { + hashCode = (hashCode * 59) + this.Modified.GetHashCode(); + } + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -7741,7 +8814,7 @@ namespace BreCalClient.misc.Model /// the id parameter needs to be missing on POST and to be present on PUT (Update) calls, otherwise a 400 response will be generated /// [DataContract(Name = "times")] - public partial class Times : IValidatableObject + public partial class Times : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -7969,6 +9042,222 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Times); + } + /// + /// Returns true if Times instances are equal + /// + /// Instance of Times to be compared + /// Boolean + public bool Equals(Times input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + this.Id.Equals(input.Id) + ) && + ( + this.EtaBerth == input.EtaBerth || + (this.EtaBerth != null && + this.EtaBerth.Equals(input.EtaBerth)) + ) && + ( + this.EtaBerthFixed == input.EtaBerthFixed || + (this.EtaBerthFixed != null && + this.EtaBerthFixed.Equals(input.EtaBerthFixed)) + ) && + ( + this.EtdBerth == input.EtdBerth || + (this.EtdBerth != null && + this.EtdBerth.Equals(input.EtdBerth)) + ) && + ( + this.EtdBerthFixed == input.EtdBerthFixed || + (this.EtdBerthFixed != null && + this.EtdBerthFixed.Equals(input.EtdBerthFixed)) + ) && + ( + this.LockTime == input.LockTime || + (this.LockTime != null && + this.LockTime.Equals(input.LockTime)) + ) && + ( + this.LockTimeFixed == input.LockTimeFixed || + (this.LockTimeFixed != null && + this.LockTimeFixed.Equals(input.LockTimeFixed)) + ) && + ( + this.ZoneEntry == input.ZoneEntry || + (this.ZoneEntry != null && + this.ZoneEntry.Equals(input.ZoneEntry)) + ) && + ( + this.ZoneEntryFixed == input.ZoneEntryFixed || + (this.ZoneEntryFixed != null && + this.ZoneEntryFixed.Equals(input.ZoneEntryFixed)) + ) && + ( + this.OperationsStart == input.OperationsStart || + (this.OperationsStart != null && + this.OperationsStart.Equals(input.OperationsStart)) + ) && + ( + this.OperationsEnd == input.OperationsEnd || + (this.OperationsEnd != null && + this.OperationsEnd.Equals(input.OperationsEnd)) + ) && + ( + this.Remarks == input.Remarks || + (this.Remarks != null && + this.Remarks.Equals(input.Remarks)) + ) && + ( + this.ShipcallId == input.ShipcallId || + this.ShipcallId.Equals(input.ShipcallId) + ) && + ( + this.ParticipantId == input.ParticipantId || + this.ParticipantId.Equals(input.ParticipantId) + ) && + ( + this.BerthId == input.BerthId || + (this.BerthId != null && + this.BerthId.Equals(input.BerthId)) + ) && + ( + this.BerthInfo == input.BerthInfo || + (this.BerthInfo != null && + this.BerthInfo.Equals(input.BerthInfo)) + ) && + ( + this.PierSide == input.PierSide || + (this.PierSide != null && + this.PierSide.Equals(input.PierSide)) + ) && + ( + this.ParticipantType == input.ParticipantType || + this.ParticipantType.Equals(input.ParticipantType) + ) && + ( + this.AtaAtd == input.AtaAtd || + (this.AtaAtd != null && + this.AtaAtd.Equals(input.AtaAtd)) + ) && + ( + this.IntervalEnd == input.IntervalEnd || + (this.IntervalEnd != null && + this.IntervalEnd.Equals(input.IntervalEnd)) + ) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.Modified == input.Modified || + (this.Modified != null && + this.Modified.Equals(input.Modified)) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.EtaBerth != null) + { + hashCode = (hashCode * 59) + this.EtaBerth.GetHashCode(); + } + if (this.EtaBerthFixed != null) + { + hashCode = (hashCode * 59) + this.EtaBerthFixed.GetHashCode(); + } + if (this.EtdBerth != null) + { + hashCode = (hashCode * 59) + this.EtdBerth.GetHashCode(); + } + if (this.EtdBerthFixed != null) + { + hashCode = (hashCode * 59) + this.EtdBerthFixed.GetHashCode(); + } + if (this.LockTime != null) + { + hashCode = (hashCode * 59) + this.LockTime.GetHashCode(); + } + if (this.LockTimeFixed != null) + { + hashCode = (hashCode * 59) + this.LockTimeFixed.GetHashCode(); + } + if (this.ZoneEntry != null) + { + hashCode = (hashCode * 59) + this.ZoneEntry.GetHashCode(); + } + if (this.ZoneEntryFixed != null) + { + hashCode = (hashCode * 59) + this.ZoneEntryFixed.GetHashCode(); + } + if (this.OperationsStart != null) + { + hashCode = (hashCode * 59) + this.OperationsStart.GetHashCode(); + } + if (this.OperationsEnd != null) + { + hashCode = (hashCode * 59) + this.OperationsEnd.GetHashCode(); + } + if (this.Remarks != null) + { + hashCode = (hashCode * 59) + this.Remarks.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ShipcallId.GetHashCode(); + hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode(); + if (this.BerthId != null) + { + hashCode = (hashCode * 59) + this.BerthId.GetHashCode(); + } + if (this.BerthInfo != null) + { + hashCode = (hashCode * 59) + this.BerthInfo.GetHashCode(); + } + if (this.PierSide != null) + { + hashCode = (hashCode * 59) + this.PierSide.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ParticipantType.GetHashCode(); + if (this.AtaAtd != null) + { + hashCode = (hashCode * 59) + this.AtaAtd.GetHashCode(); + } + if (this.IntervalEnd != null) + { + hashCode = (hashCode * 59) + this.IntervalEnd.GetHashCode(); + } + if (this.Created != null) + { + hashCode = (hashCode * 59) + this.Created.GetHashCode(); + } + if (this.Modified != null) + { + hashCode = (hashCode * 59) + this.Modified.GetHashCode(); + } + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context @@ -8005,7 +9294,7 @@ namespace BreCalClient.misc.Model /// fields that a user may change /// [DataContract(Name = "user_details")] - public partial class UserDetails : IValidatableObject + public partial class UserDetails : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -8089,6 +9378,99 @@ namespace BreCalClient.misc.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UserDetails); + } + /// + /// Returns true if UserDetails instances are equal + /// + /// Instance of UserDetails to be compared + /// Boolean + public bool Equals(UserDetails input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + this.Id.Equals(input.Id) + ) && + ( + this.OldPassword == input.OldPassword || + (this.OldPassword != null && + this.OldPassword.Equals(input.OldPassword)) + ) && + ( + this.NewPassword == input.NewPassword || + (this.NewPassword != null && + this.NewPassword.Equals(input.NewPassword)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.UserPhone == input.UserPhone || + (this.UserPhone != null && + this.UserPhone.Equals(input.UserPhone)) + ) && + ( + this.UserEmail == input.UserEmail || + (this.UserEmail != null && + this.UserEmail.Equals(input.UserEmail)) + ); + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + if (this.OldPassword != null) + { + hashCode = (hashCode * 59) + this.OldPassword.GetHashCode(); + } + if (this.NewPassword != null) + { + hashCode = (hashCode * 59) + this.NewPassword.GetHashCode(); + } + if (this.FirstName != null) + { + hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + } + if (this.LastName != null) + { + hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + } + if (this.UserPhone != null) + { + hashCode = (hashCode * 59) + this.UserPhone.GetHashCode(); + } + if (this.UserEmail != null) + { + hashCode = (hashCode * 59) + this.UserEmail.GetHashCode(); + } + return hashCode; + } + } + /// /// To validate all properties of the instance /// /// Validation context diff --git a/misc/BreCalApi.yaml b/misc/BreCalApi.yaml index fd767b0..a84d592 100644 --- a/misc/BreCalApi.yaml +++ b/misc/BreCalApi.yaml @@ -435,6 +435,13 @@ paths: tags: - static operationId: historyGet + parameters: + - name: shipcall_id + in: query + required: true + description: '**Id of ship call**. *Example: 52*. Id given in ship call list' + schema: + $ref: '#/components/schemas/shipcallId' responses: '200': description: list of history entries diff --git a/src/BreCalClient/HistoryDialog.xaml b/src/BreCalClient/HistoryDialog.xaml new file mode 100644 index 0000000..09166d5 --- /dev/null +++ b/src/BreCalClient/HistoryDialog.xaml @@ -0,0 +1,21 @@ + + + + + + + + + +