diff --git a/misc/BreCalApi.cs b/misc/BreCalApi.cs
index 177692a..c56f9fc 100644
--- a/misc/BreCalApi.cs
+++ b/misc/BreCalApi.cs
@@ -1,7 +1,7 @@
//----------------------
//
-// Generated REST API Client Code Generator v1.11.0.0 on 10.09.2024 11:10:02
+// Generated REST API Client Code Generator v1.11.0.0 on 15.09.2024 15:38:00
// Using the tool OpenAPI Generator v7.8.0
//
//----------------------
@@ -46,7 +46,7 @@ using System.Threading.Tasks;
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -66,7 +66,7 @@ namespace BreCalClient.misc.Api
/// A ship can only be logically deleted, since it is possible to have been used in previous shipcalls. On logical delete, the ship can no longer be selected in a new ship call.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of ship**. *Example: 42*. Id of ship to be deleted.
/// Index associated with the operation.
/// Id
Id ShipDelete(int id, int operationIndex = 0);
@@ -77,7 +77,7 @@ namespace BreCalClient.misc.Api
/// A ship can only be logically deleted, since it is possible to have been used in previous shipcalls. On logical delete, the ship can no longer be selected in a new ship call.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of ship**. *Example: 42*. Id of ship to be deleted.
/// Index associated with the operation.
/// ApiResponse of Id
ApiResponse ShipDeleteWithHttpInfo(int id, int operationIndex = 0);
@@ -160,7 +160,7 @@ namespace BreCalClient.misc.Api
/// A ship can only be logically deleted, since it is possible to have been used in previous shipcalls. On logical delete, the ship can no longer be selected in a new ship call.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of ship**. *Example: 42*. Id of ship to be deleted.
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of Id
@@ -172,7 +172,7 @@ namespace BreCalClient.misc.Api
/// A ship can only be logically deleted, since it is possible to have been used in previous shipcalls. On logical delete, the ship can no longer be selected in a new ship call.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of ship**. *Example: 42*. Id of ship to be deleted.
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of ApiResponse (Id)
@@ -356,7 +356,7 @@ namespace BreCalClient.misc.Api
/// Delete a ship (logically). A ship can only be logically deleted, since it is possible to have been used in previous shipcalls. On logical delete, the ship can no longer be selected in a new ship call.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of ship**. *Example: 42*. Id of ship to be deleted.
/// Index associated with the operation.
/// Id
public Id ShipDelete(int id, int operationIndex = 0)
@@ -368,7 +368,7 @@ namespace BreCalClient.misc.Api
/// Delete a ship (logically). A ship can only be logically deleted, since it is possible to have been used in previous shipcalls. On logical delete, the ship can no longer be selected in a new ship call.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of ship**. *Example: 42*. Id of ship to be deleted.
/// Index associated with the operation.
/// ApiResponse of Id
public BreCalClient.misc.Client.ApiResponse ShipDeleteWithHttpInfo(int id, int operationIndex = 0)
@@ -414,7 +414,7 @@ namespace BreCalClient.misc.Api
/// Delete a ship (logically). A ship can only be logically deleted, since it is possible to have been used in previous shipcalls. On logical delete, the ship can no longer be selected in a new ship call.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of ship**. *Example: 42*. Id of ship to be deleted.
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of Id
@@ -427,7 +427,7 @@ namespace BreCalClient.misc.Api
/// Delete a ship (logically). A ship can only be logically deleted, since it is possible to have been used in previous shipcalls. On logical delete, the ship can no longer be selected in a new ship call.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of ship**. *Example: 42*. Id of ship to be deleted.
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of ApiResponse (Id)
@@ -850,7 +850,7 @@ namespace BreCalClient.misc.Api
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -1505,7 +1505,7 @@ namespace BreCalClient.misc.Api
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -1538,13 +1538,33 @@ namespace BreCalClient.misc.Api
/// ApiResponse of List<Berth>
ApiResponse> BerthsGetWithHttpInfo(int operationIndex = 0);
///
+ /// Your GET endpoint
+ ///
+ ///
+ /// Returns a list of ports
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// List<Port>
+ List GetPorts(int operationIndex = 0);
+ ///
+ /// Your GET endpoint
+ ///
+ ///
+ /// Returns a list of ports
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// ApiResponse of List<Port>
+ ApiResponse> GetPortsWithHttpInfo(int operationIndex = 0);
+ ///
/// 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
+ /// **Id of ship call**. *Example: 3*. Id given in ship call list
/// Index associated with the operation.
/// List<History>
List HistoryGet(int shipcallId, int operationIndex = 0);
@@ -1555,7 +1575,7 @@ 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
+ /// **Id of ship call**. *Example: 3*. Id given in ship call list
/// Index associated with the operation.
/// ApiResponse of List<History>
ApiResponse> HistoryGetWithHttpInfo(int shipcallId, int operationIndex = 0);
@@ -1568,8 +1588,8 @@ namespace BreCalClient.misc.Api
/// Thrown when fails to make API call
/// **Id of ship call**. *Example: 52*. Id given in ship call list
/// Index associated with the operation.
- /// Notification
- Notification NotificationsGet(int shipcallId, int operationIndex = 0);
+ /// List<Notification>
+ List NotificationsGet(int shipcallId, int operationIndex = 0);
///
/// Gets a list of notifications pursuant to a specified participant and ship call
///
@@ -1579,8 +1599,8 @@ namespace BreCalClient.misc.Api
/// 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 Notification
- ApiResponse NotificationsGetWithHttpInfo(int shipcallId, int operationIndex = 0);
+ /// ApiResponse of List<Notification>
+ ApiResponse> NotificationsGetWithHttpInfo(int shipcallId, int operationIndex = 0);
///
/// gets one or all participants
///
@@ -1634,13 +1654,35 @@ namespace BreCalClient.misc.Api
/// Task of ApiResponse (List<Berth>)
System.Threading.Tasks.Task>> BerthsGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
///
+ /// Your GET endpoint
+ ///
+ ///
+ /// Returns a list of ports
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of List<Port>
+ System.Threading.Tasks.Task> GetPortsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
+ ///
+ /// Your GET endpoint
+ ///
+ ///
+ /// Returns a list of ports
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (List<Port>)
+ System.Threading.Tasks.Task>> GetPortsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
+ ///
/// 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
+ /// **Id of ship call**. *Example: 3*. Id given in ship call list
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of List<History>
@@ -1652,7 +1694,7 @@ 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
+ /// **Id of ship call**. *Example: 3*. Id given in ship call list
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of ApiResponse (List<History>)
@@ -1667,8 +1709,8 @@ namespace BreCalClient.misc.Api
/// **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 Notification
- System.Threading.Tasks.Task NotificationsGetAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
+ /// Task of List<Notification>
+ System.Threading.Tasks.Task> NotificationsGetAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
///
/// Gets a list of notifications pursuant to a specified participant and ship call
///
@@ -1679,8 +1721,8 @@ namespace BreCalClient.misc.Api
/// **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 (Notification)
- System.Threading.Tasks.Task> NotificationsGetWithHttpInfoAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
+ /// Task of ApiResponse (List<Notification>)
+ System.Threading.Tasks.Task>> NotificationsGetWithHttpInfoAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
///
/// gets one or all participants
///
@@ -1923,10 +1965,122 @@ namespace BreCalClient.misc.Api
return localVarResponse;
}
///
+ /// Your GET endpoint Returns a list of ports
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// List<Port>
+ public List GetPorts(int operationIndex = 0)
+ {
+ BreCalClient.misc.Client.ApiResponse> localVarResponse = GetPortsWithHttpInfo();
+ return localVarResponse.Data;
+ }
+ ///
+ /// Your GET endpoint Returns a list of ports
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// ApiResponse of List<Port>
+ public BreCalClient.misc.Client.ApiResponse> GetPortsWithHttpInfo(int operationIndex = 0)
+ {
+ BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions();
+ string[] _contentTypes = new string[] {
+ };
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "application/json"
+ };
+ var localVarContentType = BreCalClient.misc.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+ var localVarAccept = BreCalClient.misc.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+ localVarRequestOptions.Operation = "StaticApi.GetPorts";
+ localVarRequestOptions.OperationIndex = operationIndex;
+ // authentication (ApiKey) required
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
+ }
+ // make the HTTP request
+ var localVarResponse = this.Client.Get>("/ports", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("GetPorts", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+ return localVarResponse;
+ }
+ ///
+ /// Your GET endpoint Returns a list of ports
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of List<Port>
+ public async System.Threading.Tasks.Task> GetPortsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
+ {
+ BreCalClient.misc.Client.ApiResponse> localVarResponse = await GetPortsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+ ///
+ /// Your GET endpoint Returns a list of ports
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (List<Port>)
+ public async System.Threading.Tasks.Task>> GetPortsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
+ {
+ BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions();
+ string[] _contentTypes = new string[] {
+ };
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "application/json"
+ };
+ var localVarContentType = BreCalClient.misc.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+ var localVarAccept = BreCalClient.misc.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+ localVarRequestOptions.Operation = "StaticApi.GetPorts";
+ localVarRequestOptions.OperationIndex = operationIndex;
+ // authentication (ApiKey) required
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
+ }
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync>("/ports", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("GetPorts", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+ return localVarResponse;
+ }
+ ///
/// 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
+ /// **Id of ship call**. *Example: 3*. Id given in ship call list
/// Index associated with the operation.
/// List<History>
public List HistoryGet(int shipcallId, int operationIndex = 0)
@@ -1938,7 +2092,7 @@ 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
+ /// **Id of ship call**. *Example: 3*. Id given in ship call list
/// Index associated with the operation.
/// ApiResponse of List<History>
public BreCalClient.misc.Client.ApiResponse> HistoryGetWithHttpInfo(int shipcallId, int operationIndex = 0)
@@ -1984,7 +2138,7 @@ 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
+ /// **Id of ship call**. *Example: 3*. Id given in ship call list
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of List<History>
@@ -1997,7 +2151,7 @@ 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
+ /// **Id of ship call**. *Example: 3*. Id given in ship call list
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of ApiResponse (List<History>)
@@ -2046,10 +2200,10 @@ namespace BreCalClient.misc.Api
/// Thrown when fails to make API call
/// **Id of ship call**. *Example: 52*. Id given in ship call list
/// Index associated with the operation.
- /// Notification
- public Notification NotificationsGet(int shipcallId, int operationIndex = 0)
+ /// List<Notification>
+ public List NotificationsGet(int shipcallId, int operationIndex = 0)
{
- BreCalClient.misc.Client.ApiResponse localVarResponse = NotificationsGetWithHttpInfo(shipcallId);
+ BreCalClient.misc.Client.ApiResponse> localVarResponse = NotificationsGetWithHttpInfo(shipcallId);
return localVarResponse.Data;
}
///
@@ -2058,8 +2212,8 @@ namespace BreCalClient.misc.Api
/// 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 Notification
- public BreCalClient.misc.Client.ApiResponse NotificationsGetWithHttpInfo(int shipcallId, int operationIndex = 0)
+ /// ApiResponse of List<Notification>
+ public BreCalClient.misc.Client.ApiResponse> NotificationsGetWithHttpInfo(int shipcallId, int operationIndex = 0)
{
BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions();
string[] _contentTypes = new string[] {
@@ -2087,7 +2241,7 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
- var localVarResponse = this.Client.Get("/notifications", localVarRequestOptions, this.Configuration);
+ var localVarResponse = this.Client.Get>("/notifications", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("NotificationsGet", localVarResponse);
@@ -2105,10 +2259,10 @@ namespace BreCalClient.misc.Api
/// **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 Notification
- public async System.Threading.Tasks.Task NotificationsGetAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
+ /// Task of List<Notification>
+ public async System.Threading.Tasks.Task> NotificationsGetAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
- BreCalClient.misc.Client.ApiResponse localVarResponse = await NotificationsGetWithHttpInfoAsync(shipcallId, operationIndex, cancellationToken).ConfigureAwait(false);
+ BreCalClient.misc.Client.ApiResponse> localVarResponse = await NotificationsGetWithHttpInfoAsync(shipcallId, operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
@@ -2118,8 +2272,8 @@ namespace BreCalClient.misc.Api
/// **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 (Notification)
- public async System.Threading.Tasks.Task> NotificationsGetWithHttpInfoAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
+ /// Task of ApiResponse (List<Notification>)
+ public async System.Threading.Tasks.Task>> NotificationsGetWithHttpInfoAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions();
string[] _contentTypes = new string[] {
@@ -2147,7 +2301,7 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
- var localVarResponse = await this.AsynchronousClient.GetAsync("/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+ var localVarResponse = await this.AsynchronousClient.GetAsync>("/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("NotificationsGet", localVarResponse);
@@ -2290,7 +2444,7 @@ namespace BreCalClient.misc.Api
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -2331,7 +2485,7 @@ namespace BreCalClient.misc.Api
/// A times entry is typically deleted if the agent for example changes or removes the participant assignment for a particular role.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of times**. *Example: 42*. Id of times entry to be deleted.
/// Index associated with the operation.
/// Id
Id TimesDelete(int id, int operationIndex = 0);
@@ -2342,7 +2496,7 @@ namespace BreCalClient.misc.Api
/// A times entry is typically deleted if the agent for example changes or removes the participant assignment for a particular role.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of times**. *Example: 42*. Id of times entry to be deleted.
/// Index associated with the operation.
/// ApiResponse of Id
ApiResponse TimesDeleteWithHttpInfo(int id, int operationIndex = 0);
@@ -2429,7 +2583,7 @@ namespace BreCalClient.misc.Api
/// A times entry is typically deleted if the agent for example changes or removes the participant assignment for a particular role.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of times**. *Example: 42*. Id of times entry to be deleted.
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of Id
@@ -2441,7 +2595,7 @@ namespace BreCalClient.misc.Api
/// A times entry is typically deleted if the agent for example changes or removes the participant assignment for a particular role.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of times**. *Example: 42*. Id of times entry to be deleted.
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of ApiResponse (Id)
@@ -2733,7 +2887,7 @@ namespace BreCalClient.misc.Api
/// Delete a times entry for a ship call. A times entry is typically deleted if the agent for example changes or removes the participant assignment for a particular role.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of times**. *Example: 42*. Id of times entry to be deleted.
/// Index associated with the operation.
/// Id
public Id TimesDelete(int id, int operationIndex = 0)
@@ -2745,7 +2899,7 @@ namespace BreCalClient.misc.Api
/// Delete a times entry for a ship call. A times entry is typically deleted if the agent for example changes or removes the participant assignment for a particular role.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of times**. *Example: 42*. Id of times entry to be deleted.
/// Index associated with the operation.
/// ApiResponse of Id
public BreCalClient.misc.Client.ApiResponse TimesDeleteWithHttpInfo(int id, int operationIndex = 0)
@@ -2791,7 +2945,7 @@ namespace BreCalClient.misc.Api
/// Delete a times entry for a ship call. A times entry is typically deleted if the agent for example changes or removes the participant assignment for a particular role.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of times**. *Example: 42*. Id of times entry to be deleted.
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of Id
@@ -2804,7 +2958,7 @@ namespace BreCalClient.misc.Api
/// Delete a times entry for a ship call. A times entry is typically deleted if the agent for example changes or removes the participant assignment for a particular role.
///
/// Thrown when fails to make API call
- ///
+ /// **Id of times**. *Example: 42*. Id of times entry to be deleted.
/// Index associated with the operation.
/// Cancellation Token to cancel the request.
/// Task of ApiResponse (Id)
@@ -3109,7 +3263,7 @@ namespace BreCalClient.misc.Api
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -3594,7 +3748,7 @@ namespace BreCalClient.misc.Api
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4314,7 +4468,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4374,7 +4528,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4514,7 +4668,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4732,7 +4886,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5191,7 +5345,7 @@ namespace BreCalClient.misc.Client
string report = "C# SDK (BreCalClient.misc) Debug Report:\n";
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
- report += " Version of the API: 1.5.0\n";
+ report += " Version of the API: 1.6.0\n";
report += " SDK Package Version: 1.0.0\n";
return report;
}
@@ -5260,7 +5414,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5280,7 +5434,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5337,7 +5491,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5370,7 +5524,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5403,7 +5557,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5494,7 +5648,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5611,7 +5765,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5695,7 +5849,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5954,7 +6108,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5982,7 +6136,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6052,7 +6206,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6079,7 +6233,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6146,7 +6300,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6166,16 +6320,18 @@ namespace BreCalClient.misc.Model
/// Optional reference to a participant (terminal).
/// Optional reference to a participant (port authority).
/// If true lock must be passed.
- /// created.
- /// modified.
- /// deleted (default to false).
- public Berth(int id = default(int), string name = default(string), int? ownerId = default(int?), int? authorityId = default(int?), bool? varLock = default(bool?), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false)
+ /// Required reference to a port.
+ /// Readonly field set by the database when berth was created.
+ /// Readonly field set by the database when berth was last modified.
+ /// marks the berth as logically deleted (default to false).
+ public Berth(int id = default(int), string name = default(string), int? ownerId = default(int?), int? authorityId = default(int?), bool? varLock = default(bool?), int portId = default(int), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false)
{
this.Id = id;
this.Name = name;
this.OwnerId = ownerId;
this.AuthorityId = authorityId;
this.Lock = varLock;
+ this.PortId = portId;
this.Created = created;
this.Modified = modified;
this.Deleted = deleted;
@@ -6183,44 +6339,62 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Id
///
+ /// 3
[DataMember(Name = "id", EmitDefaultValue = true)]
public int Id { get; set; }
///
/// Gets or Sets Name
///
+ /// Pier 1
[DataMember(Name = "name", EmitDefaultValue = true)]
public string Name { get; set; }
///
/// Optional reference to a participant (terminal)
///
/// Optional reference to a participant (terminal)
+ /// 5
[DataMember(Name = "owner_id", EmitDefaultValue = true)]
public int? OwnerId { get; set; }
///
/// Optional reference to a participant (port authority)
///
/// Optional reference to a participant (port authority)
+ /// 6
[DataMember(Name = "authority_id", EmitDefaultValue = true)]
public int? AuthorityId { get; set; }
///
/// If true lock must be passed
///
/// If true lock must be passed
+ /// true
[DataMember(Name = "lock", EmitDefaultValue = true)]
public bool? Lock { get; set; }
///
- /// Gets or Sets Created
+ /// Required reference to a port
///
+ /// Required reference to a port
+ /// 1
+ [DataMember(Name = "port_id", EmitDefaultValue = true)]
+ public int PortId { get; set; }
+ ///
+ /// Readonly field set by the database when berth was created
+ ///
+ /// Readonly field set by the database when berth was created
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "created", EmitDefaultValue = true)]
public DateTime Created { get; set; }
///
- /// Gets or Sets Modified
+ /// Readonly field set by the database when berth was last modified
///
+ /// Readonly field set by the database when berth was last modified
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime? Modified { get; set; }
///
- /// Gets or Sets Deleted
+ /// marks the berth as logically deleted
///
+ /// marks the berth as logically deleted
+ /// false
[DataMember(Name = "deleted", EmitDefaultValue = true)]
public bool Deleted { get; set; }
///
@@ -6236,6 +6410,7 @@ namespace BreCalClient.misc.Model
sb.Append(" OwnerId: ").Append(OwnerId).Append("\n");
sb.Append(" AuthorityId: ").Append(AuthorityId).Append("\n");
sb.Append(" Lock: ").Append(Lock).Append("\n");
+ sb.Append(" PortId: ").Append(PortId).Append("\n");
sb.Append(" Created: ").Append(Created).Append("\n");
sb.Append(" Modified: ").Append(Modified).Append("\n");
sb.Append(" Deleted: ").Append(Deleted).Append("\n");
@@ -6272,14 +6447,14 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace BreCalClient.misc.Model
{
///
- /// Credentials
+ /// Login credentials for the user
///
[DataContract(Name = "credentials")]
public partial class Credentials : IValidatableObject
@@ -6312,11 +6487,13 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Username
///
+ /// alfred
[DataMember(Name = "username", IsRequired = true, EmitDefaultValue = true)]
public string Username { get; set; }
///
/// Gets or Sets Password
///
+ /// 123456
[DataMember(Name = "password", IsRequired = true, EmitDefaultValue = true)]
public string Password { get; set; }
///
@@ -6357,7 +6534,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6377,38 +6554,32 @@ namespace BreCalClient.misc.Model
///
/// Initializes a new instance of the class.
///
- /// A human readable error message (required).
- /// A list of errors.
- /// A dictionary of valid data.
- public Error(string message = default(string), List errors = default(List), Object validData = default(Object))
+ /// Input field that caused the error or general error message (required).
+ /// Detailed description if error_field was an input field.
+ public Error(string errorField = default(string), string errorDescription = default(string))
{
- // to ensure "message" is required (not null)
- if (message == null)
+ // to ensure "errorField" is required (not null)
+ if (errorField == null)
{
- throw new ArgumentNullException("message is a required property for Error and cannot be null");
+ throw new ArgumentNullException("errorField is a required property for Error and cannot be null");
}
- this.Message = message;
- this.Errors = errors;
- this.ValidData = validData;
+ this.ErrorField = errorField;
+ this.ErrorDescription = errorDescription;
}
///
- /// A human readable error message
+ /// Input field that caused the error or general error message
///
- /// A human readable error message
- [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)]
- public string Message { get; set; }
+ /// Input field that caused the error or general error message
+ /// eta
+ [DataMember(Name = "error_field", IsRequired = true, EmitDefaultValue = true)]
+ public string ErrorField { get; set; }
///
- /// A list of errors
+ /// Detailed description if error_field was an input field
///
- /// A list of errors
- [DataMember(Name = "errors", EmitDefaultValue = true)]
- public List Errors { get; set; }
- ///
- /// A dictionary of valid data
- ///
- /// A dictionary of valid data
- [DataMember(Name = "valid_data", EmitDefaultValue = true)]
- public Object ValidData { get; set; }
+ /// Detailed description if error_field was an input field
+ /// eta must be in the future
+ [DataMember(Name = "error_description", EmitDefaultValue = true)]
+ public string ErrorDescription { get; set; }
///
/// Returns the string presentation of the object
///
@@ -6417,9 +6588,8 @@ namespace BreCalClient.misc.Model
{
StringBuilder sb = new StringBuilder();
sb.Append("class Error {\n");
- sb.Append(" Message: ").Append(Message).Append("\n");
- sb.Append(" Errors: ").Append(Errors).Append("\n");
- sb.Append(" ValidData: ").Append(ValidData).Append("\n");
+ sb.Append(" ErrorField: ").Append(ErrorField).Append("\n");
+ sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -6448,15 +6618,16 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace BreCalClient.misc.Model
{
///
- /// Defines EvaluationType
+ /// Evaluation of the ship call
///
+ /// Evaluation of the ship call
[JsonConverter(typeof(StringEnumConverter))]
public enum EvaluationType
{
@@ -6488,7 +6659,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6533,26 +6704,31 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Id
///
+ /// 3
[DataMember(Name = "id", EmitDefaultValue = true)]
public int Id { get; set; }
///
/// Gets or Sets ParticipantId
///
+ /// 5
[DataMember(Name = "participant_id", EmitDefaultValue = true)]
public int ParticipantId { get; set; }
///
/// Gets or Sets ShipcallId
///
+ /// 42
[DataMember(Name = "shipcall_id", EmitDefaultValue = true)]
public int ShipcallId { get; set; }
///
/// Gets or Sets Timestamp
///
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "timestamp", EmitDefaultValue = true)]
public DateTime Timestamp { get; set; }
///
/// Gets or Sets Eta
///
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "eta", EmitDefaultValue = true)]
public DateTime Eta { get; set; }
///
@@ -6598,7 +6774,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6621,6 +6797,7 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets VarId
///
+ /// 42
[DataMember(Name = "id", EmitDefaultValue = true)]
public int VarId { get; set; }
///
@@ -6660,7 +6837,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6699,46 +6876,55 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Id
///
+ /// 42
[DataMember(Name = "id", EmitDefaultValue = true)]
public int Id { get; set; }
///
/// Gets or Sets ParticipantId
///
+ /// 5
[DataMember(Name = "participant_id", EmitDefaultValue = true)]
public int ParticipantId { get; set; }
///
/// Gets or Sets FirstName
///
+ /// John
[DataMember(Name = "first_name", EmitDefaultValue = true)]
public string FirstName { get; set; }
///
/// Gets or Sets LastName
///
+ /// Doe
[DataMember(Name = "last_name", EmitDefaultValue = true)]
public string LastName { get; set; }
///
/// Gets or Sets UserName
///
+ /// johndoe
[DataMember(Name = "user_name", EmitDefaultValue = true)]
public string UserName { get; set; }
///
/// Gets or Sets UserPhone
///
+ /// 1234567890
[DataMember(Name = "user_phone", EmitDefaultValue = true)]
public string UserPhone { get; set; }
///
/// Gets or Sets UserEmail
///
+ /// no@where.com
[DataMember(Name = "user_email", EmitDefaultValue = true)]
public string UserEmail { get; set; }
///
/// Gets or Sets Exp
///
+ /// 1630000000
[DataMember(Name = "exp", EmitDefaultValue = true)]
public float Exp { get; set; }
///
/// Gets or Sets Token
///
+ /// eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
[DataMember(Name = "token", EmitDefaultValue = true)]
public string Token { get; set; }
///
@@ -6786,7 +6972,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6810,8 +6996,8 @@ namespace BreCalClient.misc.Model
/// shipcallId.
/// notificationType.
/// message.
- /// Readonly field set by the database.
- /// Readonly field set by the database.
+ /// Readonly field set by the database when notification was created.
+ /// Readonly field set by the database when notification was last modified.
public Notification(int id = default(int), int shipcallId = default(int), NotificationType? notificationType = default(NotificationType?), string message = default(string), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
{
this.Id = id;
@@ -6824,28 +7010,33 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Id
///
+ /// 42
[DataMember(Name = "id", EmitDefaultValue = true)]
public int Id { get; set; }
///
/// Gets or Sets ShipcallId
///
+ /// 5
[DataMember(Name = "shipcall_id", EmitDefaultValue = true)]
public int ShipcallId { get; set; }
///
/// Gets or Sets Message
///
+ /// Entry XY violates rule Z
[DataMember(Name = "message", EmitDefaultValue = true)]
public string Message { get; set; }
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when notification was created
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when notification was created
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "created", EmitDefaultValue = true)]
public DateTime Created { get; set; }
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when notification was last modified
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when notification was last modified
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime? Modified { get; set; }
///
@@ -6890,15 +7081,16 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace BreCalClient.misc.Model
{
///
- /// Defines NotificationType
+ /// Type of notification
///
+ /// Type of notification
[JsonConverter(typeof(StringEnumConverter))]
public enum NotificationType
{
@@ -6925,15 +7117,16 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace BreCalClient.misc.Model
{
///
- /// Defines ObjectType
+ /// Type of object that was changed
///
+ /// Type of object that was changed
[JsonConverter(typeof(StringEnumConverter))]
public enum ObjectType
{
@@ -6955,15 +7148,16 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace BreCalClient.misc.Model
{
///
- /// Defines OperationType
+ /// Type of operation that was performed
///
+ /// Type of operation that was performed
[JsonConverter(typeof(StringEnumConverter))]
public enum OperationType
{
@@ -6995,7 +7189,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -7015,12 +7209,13 @@ namespace BreCalClient.misc.Model
/// street.
/// postalCode.
/// city.
- /// a logical combination (bitflag) of possible values. This cannot be encoded in a Enumeration type with discrete values in OpenAPI version < 3.1. The values are 1=.
- /// flags.
- /// Readonly field set by the database.
- /// Readonly field set by the database.
- /// deleted (default to false).
- public Participant(int id = default(int), string name = default(string), string street = default(string), string postalCode = default(string), string city = default(string), int type = default(int), int? flags = default(int?), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false)
+ /// a logical combination (bitflag) of possible values. This cannot be encoded in a Enumeration type with discrete values in OpenAPI version < 3.1..
+ /// Bit-encoded flag array for internal use.
+ /// ports.
+ /// Readonly field set by the database when participant was created.
+ /// Readonly field set by the database when participant was last modified.
+ /// marks the participant as logically deleted (default to false).
+ public Participant(int id = default(int), string name = default(string), string street = default(string), string postalCode = default(string), string city = default(string), int type = default(int), int? flags = default(int?), List ports = default(List), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false)
{
this.Id = id;
this.Name = name;
@@ -7029,6 +7224,7 @@ namespace BreCalClient.misc.Model
this.City = city;
this.Type = type;
this.Flags = flags;
+ this.Ports = ports;
this.Created = created;
this.Modified = modified;
this.Deleted = deleted;
@@ -7036,54 +7232,72 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Id
///
+ /// 42
[DataMember(Name = "id", EmitDefaultValue = true)]
public int Id { get; set; }
///
/// Gets or Sets Name
///
+ /// BSMD
[DataMember(Name = "name", EmitDefaultValue = true)]
public string Name { get; set; }
///
/// Gets or Sets Street
///
+ /// Hermann-Hollerith-Str. 7
[DataMember(Name = "street", EmitDefaultValue = true)]
public string Street { get; set; }
///
/// Gets or Sets PostalCode
///
+ /// 28359
[DataMember(Name = "postal code", EmitDefaultValue = true)]
public string PostalCode { get; set; }
///
/// Gets or Sets City
///
+ /// Bremen
[DataMember(Name = "city", EmitDefaultValue = true)]
public string City { get; set; }
///
- /// a logical combination (bitflag) of possible values. This cannot be encoded in a Enumeration type with discrete values in OpenAPI version < 3.1. The values are 1=
+ /// a logical combination (bitflag) of possible values. This cannot be encoded in a Enumeration type with discrete values in OpenAPI version < 3.1.
///
- /// a logical combination (bitflag) of possible values. This cannot be encoded in a Enumeration type with discrete values in OpenAPI version < 3.1. The values are 1=
+ /// a logical combination (bitflag) of possible values. This cannot be encoded in a Enumeration type with discrete values in OpenAPI version < 3.1.
+ /// 10
[DataMember(Name = "type", EmitDefaultValue = true)]
public int Type { get; set; }
///
- /// Gets or Sets Flags
+ /// Bit-encoded flag array for internal use
///
+ /// Bit-encoded flag array for internal use
+ /// 0
[DataMember(Name = "flags", EmitDefaultValue = true)]
public int? Flags { get; set; }
///
- /// Readonly field set by the database
+ /// Gets or Sets Ports
///
- /// Readonly field set by the database
+ /// [1,2]
+ [DataMember(Name = "ports", EmitDefaultValue = true)]
+ public List Ports { get; set; }
+ ///
+ /// Readonly field set by the database when participant was created
+ ///
+ /// Readonly field set by the database when participant was created
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "created", EmitDefaultValue = true)]
public DateTime Created { get; set; }
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when participant was last modified
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when participant was last modified
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime? Modified { get; set; }
///
- /// Gets or Sets Deleted
+ /// marks the participant as logically deleted
///
+ /// marks the participant as logically deleted
+ /// false
[DataMember(Name = "deleted", EmitDefaultValue = true)]
public bool Deleted { get; set; }
///
@@ -7101,6 +7315,7 @@ namespace BreCalClient.misc.Model
sb.Append(" City: ").Append(City).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" Flags: ").Append(Flags).Append("\n");
+ sb.Append(" Ports: ").Append(Ports).Append("\n");
sb.Append(" Created: ").Append(Created).Append("\n");
sb.Append(" Modified: ").Append(Modified).Append("\n");
sb.Append(" Deleted: ").Append(Deleted).Append("\n");
@@ -7152,7 +7367,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -7173,7 +7388,7 @@ namespace BreCalClient.misc.Model
/// Initializes a new instance of the class.
///
/// participantId (required).
- /// Currently this is encoded as an integer, since in OpenAPI 3.0 there are no enumerations supported with discrete integer values like a bitwise flag array used here. Each bit corresponds to a role. Since a participant can have multiple roles, these bits are combined by OR. Individual values: 1: BSMD 2: TERMINAL, 4: PILOT, 8: AGENCY, 16: MOORING, 32: PORT_ADMINISTRATION, 64: TUG (required).
+ /// Possible role values: 1: BSMD 2: TERMINAL, 4: PILOT, 8: AGENCY, 16: MOORING, 32: PORT_ADMINISTRATION, 64: TUG. A participant may appear multiple times with different roles. (required).
public ParticipantAssignment(int participantId = default(int), int type = default(int))
{
this.ParticipantId = participantId;
@@ -7182,12 +7397,14 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets ParticipantId
///
+ /// 5
[DataMember(Name = "participant_id", IsRequired = true, EmitDefaultValue = true)]
public int ParticipantId { get; set; }
///
- /// Currently this is encoded as an integer, since in OpenAPI 3.0 there are no enumerations supported with discrete integer values like a bitwise flag array used here. Each bit corresponds to a role. Since a participant can have multiple roles, these bits are combined by OR. Individual values: 1: BSMD 2: TERMINAL, 4: PILOT, 8: AGENCY, 16: MOORING, 32: PORT_ADMINISTRATION, 64: TUG
+ /// Possible role values: 1: BSMD 2: TERMINAL, 4: PILOT, 8: AGENCY, 16: MOORING, 32: PORT_ADMINISTRATION, 64: TUG. A participant may appear multiple times with different roles.
///
- /// Currently this is encoded as an integer, since in OpenAPI 3.0 there are no enumerations supported with discrete integer values like a bitwise flag array used here. Each bit corresponds to a role. Since a participant can have multiple roles, these bits are combined by OR. Individual values: 1: BSMD 2: TERMINAL, 4: PILOT, 8: AGENCY, 16: MOORING, 32: PORT_ADMINISTRATION, 64: TUG
+ /// Possible role values: 1: BSMD 2: TERMINAL, 4: PILOT, 8: AGENCY, 16: MOORING, 32: PORT_ADMINISTRATION, 64: TUG. A participant may appear multiple times with different roles.
+ /// 4
[DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
public int Type { get; set; }
///
@@ -7228,7 +7445,133 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
+ * Contact: info@textbausteine.net
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+namespace BreCalClient.misc.Model
+{
+ ///
+ /// Record of port data
+ ///
+ [DataContract(Name = "port")]
+ public partial class Port : IValidatableObject
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// id.
+ /// name.
+ /// locode.
+ /// Readonly field set by the database when port was created.
+ /// Readonly field set by the database when port was last modified.
+ /// marks the port as logically deleted (default to false).
+ public Port(int id = default(int), string name = default(string), string locode = default(string), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false)
+ {
+ this.Id = id;
+ this.Name = name;
+ this.Locode = locode;
+ this.Created = created;
+ this.Modified = modified;
+ this.Deleted = deleted;
+ }
+ ///
+ /// Gets or Sets Id
+ ///
+ /// 2
+ [DataMember(Name = "id", EmitDefaultValue = true)]
+ public int Id { get; set; }
+ ///
+ /// Gets or Sets Name
+ ///
+ /// Hamburg
+ [DataMember(Name = "name", EmitDefaultValue = true)]
+ public string Name { get; set; }
+ ///
+ /// Gets or Sets Locode
+ ///
+ /// DEHAM
+ [DataMember(Name = "locode", EmitDefaultValue = true)]
+ public string Locode { get; set; }
+ ///
+ /// Readonly field set by the database when port was created
+ ///
+ /// Readonly field set by the database when port was created
+ /// 2023-08-21T08:23:35Z
+ [DataMember(Name = "created", EmitDefaultValue = true)]
+ public DateTime Created { get; set; }
+ ///
+ /// Readonly field set by the database when port was last modified
+ ///
+ /// Readonly field set by the database when port was last modified
+ /// 2023-08-21T08:23:35Z
+ [DataMember(Name = "modified", EmitDefaultValue = true)]
+ public DateTime? Modified { get; set; }
+ ///
+ /// marks the port as logically deleted
+ ///
+ /// marks the port as logically deleted
+ /// false
+ [DataMember(Name = "deleted", EmitDefaultValue = true)]
+ public bool Deleted { get; set; }
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class Port {\n");
+ sb.Append(" Id: ").Append(Id).Append("\n");
+ sb.Append(" Name: ").Append(Name).Append("\n");
+ sb.Append(" Locode: ").Append(Locode).Append("\n");
+ sb.Append(" Created: ").Append(Created).Append("\n");
+ sb.Append(" Modified: ").Append(Modified).Append("\n");
+ sb.Append(" Deleted: ").Append(Deleted).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
+ }
+ ///
+ /// To validate all properties of the instance
+ ///
+ /// Validation context
+ /// Validation Result
+ IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+ {
+ // Id (int) minimum
+ if (this.Id < (int)1)
+ {
+ yield return new ValidationResult("Invalid value for Id, must be a value greater than or equal to 1.", new [] { "Id" });
+ }
+ // Locode (string) maxLength
+ if (this.Locode != null && this.Locode.Length > 5)
+ {
+ yield return new ValidationResult("Invalid value for Locode, length must be less than 5.", new [] { "Locode" });
+ }
+ // Locode (string) minLength
+ if (this.Locode != null && this.Locode.Length < 5)
+ {
+ yield return new ValidationResult("Invalid value for Locode, length must be greater than 5.", new [] { "Locode" });
+ }
+ yield break;
+ }
+ }
+}
+
+/*
+ * Bremen calling API
+ *
+ * Administer DEBRE ship calls, times and notifications
+ *
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -7253,9 +7596,9 @@ namespace BreCalClient.misc.Model
/// isTug (default to false).
/// bollardPull.
/// BSMD internal use.
- /// created.
- /// modified.
- /// deleted (default to false).
+ /// Readonly field set by the database when ship was created.
+ /// Readonly field set by the database when ship was last modified.
+ /// marks the ship as logically deleted (default to false).
public Ship(int id = default(int), string name = default(string), int? imo = default(int?), string callsign = default(string), int? participantId = default(int?), double? length = default(double?), double? width = default(double?), bool isTug = false, int? bollardPull = default(int?), int? eni = default(int?), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false)
{
this.Id = id;
@@ -7275,68 +7618,84 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Id
///
+ /// 8
[DataMember(Name = "id", EmitDefaultValue = true)]
public int Id { get; set; }
///
/// Gets or Sets Name
///
+ /// MS Bremen
[DataMember(Name = "name", EmitDefaultValue = true)]
public string Name { get; set; }
///
/// Gets or Sets Imo
///
+ /// 1234567
[DataMember(Name = "imo", EmitDefaultValue = true)]
public int? Imo { get; set; }
///
/// Gets or Sets Callsign
///
+ /// DBRE
[DataMember(Name = "callsign", EmitDefaultValue = true)]
public string Callsign { get; set; }
///
/// Optional reference to participant (tug role)
///
/// Optional reference to participant (tug role)
+ /// 9
[DataMember(Name = "participant_id", EmitDefaultValue = true)]
public int? ParticipantId { get; set; }
///
/// Gets or Sets Length
///
+ /// 200
[DataMember(Name = "length", EmitDefaultValue = true)]
public double? Length { get; set; }
///
/// Gets or Sets Width
///
+ /// 30
[DataMember(Name = "width", EmitDefaultValue = true)]
public double? Width { get; set; }
///
/// Gets or Sets IsTug
///
+ /// false
[DataMember(Name = "is_tug", EmitDefaultValue = true)]
public bool IsTug { get; set; }
///
/// Gets or Sets BollardPull
///
+ /// 100
[DataMember(Name = "bollard_pull", EmitDefaultValue = true)]
public int? BollardPull { get; set; }
///
/// BSMD internal use
///
/// BSMD internal use
+ /// 1234567
[DataMember(Name = "eni", EmitDefaultValue = true)]
public int? Eni { get; set; }
///
- /// Gets or Sets Created
+ /// Readonly field set by the database when ship was created
///
+ /// Readonly field set by the database when ship was created
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "created", EmitDefaultValue = true)]
public DateTime Created { get; set; }
///
- /// Gets or Sets Modified
+ /// Readonly field set by the database when ship was last modified
///
+ /// Readonly field set by the database when ship was last modified
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime? Modified { get; set; }
///
- /// Gets or Sets Deleted
+ /// marks the ship as logically deleted
///
+ /// marks the ship as logically deleted
+ /// false
[DataMember(Name = "deleted", EmitDefaultValue = true)]
public bool Deleted { get; set; }
///
@@ -7398,14 +7757,14 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace BreCalClient.misc.Model
{
///
- /// Shipcall
+ /// Ship call data
///
[DataContract(Name = "shipcall")]
public partial class Shipcall : IValidatableObject
@@ -7428,8 +7787,9 @@ namespace BreCalClient.misc.Model
///
/// Initializes a new instance of the class.
///
- /// The unique identifier of a ship call (required).
+ /// id.
/// shipId (required).
+ /// portId.
/// type (required).
/// eta.
/// voyage.
@@ -7454,13 +7814,14 @@ namespace BreCalClient.misc.Model
/// evaluation.
/// Physical reference point for all times given in shipcall and depending times entries.
/// participants.
- /// Readonly field set by the database.
- /// Readonly field set by the database.
- public Shipcall(int id = default(int), int shipId = default(int), ShipcallType type = default(ShipcallType), DateTime? eta = default(DateTime?), string voyage = default(string), DateTime? etd = default(DateTime?), int? arrivalBerthId = default(int?), int? departureBerthId = default(int?), bool? tugRequired = default(bool?), bool? pilotRequired = default(bool?), int? flags = default(int?), bool? pierSide = default(bool?), bool? bunkering = default(bool?), bool? replenishingTerminal = default(bool?), bool? replenishingLock = default(bool?), double? draft = default(double?), DateTime? tidalWindowFrom = default(DateTime?), DateTime? tidalWindowTo = default(DateTime?), bool? rainSensitiveCargo = default(bool?), int? recommendedTugs = default(int?), bool? anchored = default(bool?), bool? mooredLock = default(bool?), bool? canceled = default(bool?), EvaluationType? evaluation = default(EvaluationType?), int? timeRefPoint = default(int?), List participants = default(List), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
+ /// Readonly field set by the database when shipcall was created.
+ /// Readonly field set by the database when shipcall was last modified.
+ public Shipcall(int id = default(int), int shipId = default(int), int portId = default(int), ShipcallType type = default(ShipcallType), DateTime? eta = default(DateTime?), string voyage = default(string), DateTime? etd = default(DateTime?), int? arrivalBerthId = default(int?), int? departureBerthId = default(int?), bool? tugRequired = default(bool?), bool? pilotRequired = default(bool?), int? flags = default(int?), bool? pierSide = default(bool?), bool? bunkering = default(bool?), bool? replenishingTerminal = default(bool?), bool? replenishingLock = default(bool?), double? draft = default(double?), DateTime? tidalWindowFrom = default(DateTime?), DateTime? tidalWindowTo = default(DateTime?), bool? rainSensitiveCargo = default(bool?), int? recommendedTugs = default(int?), bool? anchored = default(bool?), bool? mooredLock = default(bool?), bool? canceled = default(bool?), EvaluationType? evaluation = default(EvaluationType?), int? timeRefPoint = default(int?), List participants = default(List), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
{
- this.Id = id;
this.ShipId = shipId;
this.Type = type;
+ this.Id = id;
+ this.PortId = portId;
this.Eta = eta;
this.Voyage = voyage;
this.Etd = etd;
@@ -7488,119 +7849,147 @@ namespace BreCalClient.misc.Model
this.Modified = modified;
}
///
- /// The unique identifier of a ship call
+ /// Gets or Sets Id
///
- /// The unique identifier of a ship call
- [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
+ /// 6
+ [DataMember(Name = "id", EmitDefaultValue = true)]
public int Id { get; set; }
///
/// Gets or Sets ShipId
///
+ /// 8
[DataMember(Name = "ship_id", IsRequired = true, EmitDefaultValue = true)]
public int ShipId { get; set; }
///
+ /// Gets or Sets PortId
+ ///
+ /// 3
+ [DataMember(Name = "port_id", EmitDefaultValue = true)]
+ public int PortId { get; set; }
+ ///
/// Gets or Sets Eta
///
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "eta", EmitDefaultValue = true)]
public DateTime? Eta { get; set; }
///
/// Gets or Sets Voyage
///
+ /// Voyage 123
[DataMember(Name = "voyage", EmitDefaultValue = true)]
public string Voyage { get; set; }
///
/// Gets or Sets Etd
///
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "etd", EmitDefaultValue = true)]
public DateTime? Etd { get; set; }
///
/// Gets or Sets ArrivalBerthId
///
+ /// 3
[DataMember(Name = "arrival_berth_id", EmitDefaultValue = true)]
public int? ArrivalBerthId { get; set; }
///
/// Gets or Sets DepartureBerthId
///
+ /// 4
[DataMember(Name = "departure_berth_id", EmitDefaultValue = true)]
public int? DepartureBerthId { get; set; }
///
/// Gets or Sets TugRequired
///
+ /// true
[DataMember(Name = "tug_required", EmitDefaultValue = true)]
public bool? TugRequired { get; set; }
///
/// Gets or Sets PilotRequired
///
+ /// true
[DataMember(Name = "pilot_required", EmitDefaultValue = true)]
public bool? PilotRequired { get; set; }
///
/// Gets or Sets Flags
///
+ /// 1
[DataMember(Name = "flags", EmitDefaultValue = true)]
public int? Flags { get; set; }
///
/// Gets or Sets PierSide
///
+ /// false
[DataMember(Name = "pier_side", EmitDefaultValue = true)]
public bool? PierSide { get; set; }
///
/// Gets or Sets Bunkering
///
+ /// false
[DataMember(Name = "bunkering", EmitDefaultValue = true)]
public bool? Bunkering { get; set; }
///
/// Gets or Sets ReplenishingTerminal
///
+ /// false
[DataMember(Name = "replenishing_terminal", EmitDefaultValue = true)]
public bool? ReplenishingTerminal { get; set; }
///
/// Gets or Sets ReplenishingLock
///
+ /// false
[DataMember(Name = "replenishing_lock", EmitDefaultValue = true)]
public bool? ReplenishingLock { get; set; }
///
/// Gets or Sets Draft
///
+ /// 10.5
[DataMember(Name = "draft", EmitDefaultValue = true)]
public double? Draft { get; set; }
///
/// Gets or Sets TidalWindowFrom
///
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "tidal_window_from", EmitDefaultValue = true)]
public DateTime? TidalWindowFrom { get; set; }
///
/// Gets or Sets TidalWindowTo
///
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "tidal_window_to", EmitDefaultValue = true)]
public DateTime? TidalWindowTo { get; set; }
///
/// Gets or Sets RainSensitiveCargo
///
+ /// false
[DataMember(Name = "rain_sensitive_cargo", EmitDefaultValue = true)]
public bool? RainSensitiveCargo { get; set; }
///
/// Gets or Sets RecommendedTugs
///
+ /// 2
[DataMember(Name = "recommended_tugs", EmitDefaultValue = true)]
public int? RecommendedTugs { get; set; }
///
/// Gets or Sets Anchored
///
+ /// false
[DataMember(Name = "anchored", EmitDefaultValue = true)]
public bool? Anchored { get; set; }
///
/// Gets or Sets MooredLock
///
+ /// false
[DataMember(Name = "moored_lock", EmitDefaultValue = true)]
public bool? MooredLock { get; set; }
///
/// Gets or Sets Canceled
///
+ /// false
[DataMember(Name = "canceled", EmitDefaultValue = true)]
public bool? Canceled { get; set; }
///
/// Gets or Sets EvaluationMessage
///
+ /// Time window too short
[DataMember(Name = "evaluation_message", EmitDefaultValue = true)]
public string EvaluationMessage { get; private set; }
///
@@ -7619,23 +8008,27 @@ namespace BreCalClient.misc.Model
/// Physical reference point for all times given in shipcall and depending times entries
///
/// Physical reference point for all times given in shipcall and depending times entries
+ /// 1
[DataMember(Name = "time_ref_point", EmitDefaultValue = true)]
public int? TimeRefPoint { get; set; }
///
/// Gets or Sets Participants
///
+ /// [{"participant_id":5,"type":4},{"participant_id":6,"type":8}]
[DataMember(Name = "participants", EmitDefaultValue = true)]
public List Participants { get; set; }
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when shipcall was created
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when shipcall was created
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "created", EmitDefaultValue = true)]
public DateTime Created { get; set; }
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when shipcall was last modified
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when shipcall was last modified
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime? Modified { get; set; }
///
@@ -7648,6 +8041,7 @@ namespace BreCalClient.misc.Model
sb.Append("class Shipcall {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" ShipId: ").Append(ShipId).Append("\n");
+ sb.Append(" PortId: ").Append(PortId).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" Eta: ").Append(Eta).Append("\n");
sb.Append(" Voyage: ").Append(Voyage).Append("\n");
@@ -7713,15 +8107,16 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace BreCalClient.misc.Model
{
///
- /// Defines ShipcallType
+ /// Type of ship call
///
+ /// Type of ship call
[JsonConverter(typeof(StringEnumConverter))]
public enum ShipcallType
{
@@ -7753,7 +8148,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -7775,28 +8170,28 @@ namespace BreCalClient.misc.Model
///
/// id.
/// Arrival time at berth.
- /// currently unused.
+ /// If true, the eta is fixed and cannot be changed.
/// departure time from berth.
- /// currently unused.
+ /// If true, the etd is fixed and cannot be changed.
/// arrival time at lock.
- /// currently unused.
- /// currently unused.
- /// currently unused.
+ /// If true, the lock time is fixed and cannot be changed.
+ /// Expected time of entry into the zone.
+ /// If true, the zone entry time is fixed and cannot be changed.
/// Start time for terminal operations.
/// End time for terminal operations.
- /// remarks.
+ /// Additional remarks.
/// Reference to a shipcall id (required).
/// Reference to a participant id (required).
/// Reference to a berth id.
/// Additional info text for berth.
/// true if ship is rotated, false otherwise.
/// participantType.
- /// can be set by mooring if actual times are different from planned.
- /// can be set by mooring if actual times are different from planned.
+ /// ata can be set by mooring if actual times are different from planned.
+ /// atd can be set by mooring if actual times are different from planned.
/// Optional end of the interval for the times eta entry.
/// Optional end of the interval for the times etd entry.
- /// Readonly field set by the database.
- /// Readonly field set by the database.
+ /// Readonly field set by the database when times record was created.
+ /// Readonly field set by the database when times record was last modified.
public Times(int id = default(int), DateTime? etaBerth = default(DateTime?), bool? etaBerthFixed = default(bool?), DateTime? etdBerth = default(DateTime?), bool? etdBerthFixed = default(bool?), DateTime? lockTime = default(DateTime?), bool? lockTimeFixed = default(bool?), DateTime? zoneEntry = default(DateTime?), bool? zoneEntryFixed = default(bool?), DateTime? operationsStart = default(DateTime?), DateTime? operationsEnd = default(DateTime?), string remarks = default(string), int shipcallId = default(int), int participantId = default(int), int? berthId = default(int?), string berthInfo = default(string), bool? pierSide = default(bool?), int participantType = default(int), DateTime? ata = default(DateTime?), DateTime? atd = default(DateTime?), DateTime? etaIntervalEnd = default(DateTime?), DateTime? etdIntervalEnd = default(DateTime?), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
{
this.ShipcallId = shipcallId;
@@ -7827,142 +8222,167 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Id
///
+ /// 2
[DataMember(Name = "id", EmitDefaultValue = true)]
public int Id { get; set; }
///
/// Arrival time at berth
///
/// Arrival time at berth
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "eta_berth", EmitDefaultValue = true)]
public DateTime? EtaBerth { get; set; }
///
- /// currently unused
+ /// If true, the eta is fixed and cannot be changed
///
- /// currently unused
+ /// If true, the eta is fixed and cannot be changed
+ /// true
[DataMember(Name = "eta_berth_fixed", EmitDefaultValue = true)]
public bool? EtaBerthFixed { get; set; }
///
/// departure time from berth
///
/// departure time from berth
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "etd_berth", EmitDefaultValue = true)]
public DateTime? EtdBerth { get; set; }
///
- /// currently unused
+ /// If true, the etd is fixed and cannot be changed
///
- /// currently unused
+ /// If true, the etd is fixed and cannot be changed
+ /// true
[DataMember(Name = "etd_berth_fixed", EmitDefaultValue = true)]
public bool? EtdBerthFixed { get; set; }
///
/// arrival time at lock
///
/// arrival time at lock
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "lock_time", EmitDefaultValue = true)]
public DateTime? LockTime { get; set; }
///
- /// currently unused
+ /// If true, the lock time is fixed and cannot be changed
///
- /// currently unused
+ /// If true, the lock time is fixed and cannot be changed
+ /// true
[DataMember(Name = "lock_time_fixed", EmitDefaultValue = true)]
public bool? LockTimeFixed { get; set; }
///
- /// currently unused
+ /// Expected time of entry into the zone
///
- /// currently unused
+ /// Expected time of entry into the zone
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "zone_entry", EmitDefaultValue = true)]
public DateTime? ZoneEntry { get; set; }
///
- /// currently unused
+ /// If true, the zone entry time is fixed and cannot be changed
///
- /// currently unused
+ /// If true, the zone entry time is fixed and cannot be changed
+ /// true
[DataMember(Name = "zone_entry_fixed", EmitDefaultValue = true)]
public bool? ZoneEntryFixed { get; set; }
///
/// Start time for terminal operations
///
/// Start time for terminal operations
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "operations_start", EmitDefaultValue = true)]
public DateTime? OperationsStart { get; set; }
///
/// End time for terminal operations
///
/// End time for terminal operations
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "operations_end", EmitDefaultValue = true)]
public DateTime? OperationsEnd { get; set; }
///
- /// Gets or Sets Remarks
+ /// Additional remarks
///
+ /// Additional remarks
+ /// Please be aware of the strong current
[DataMember(Name = "remarks", EmitDefaultValue = true)]
public string Remarks { get; set; }
///
/// Reference to a shipcall id
///
/// Reference to a shipcall id
+ /// 23
[DataMember(Name = "shipcall_id", IsRequired = true, EmitDefaultValue = true)]
public int ShipcallId { get; set; }
///
/// Reference to a participant id
///
/// Reference to a participant id
+ /// 34
[DataMember(Name = "participant_id", IsRequired = true, EmitDefaultValue = true)]
public int ParticipantId { get; set; }
///
/// Reference to a berth id
///
/// Reference to a berth id
+ /// 1
[DataMember(Name = "berth_id", EmitDefaultValue = true)]
public int? BerthId { get; set; }
///
/// Additional info text for berth
///
/// Additional info text for berth
+ /// 200m length
[DataMember(Name = "berth_info", EmitDefaultValue = true)]
public string BerthInfo { get; set; }
///
/// true if ship is rotated, false otherwise
///
/// true if ship is rotated, false otherwise
+ /// true
[DataMember(Name = "pier_side", EmitDefaultValue = true)]
public bool? PierSide { get; set; }
///
/// Gets or Sets ParticipantType
///
+ /// 4
[DataMember(Name = "participant_type", EmitDefaultValue = true)]
public int ParticipantType { get; set; }
///
- /// can be set by mooring if actual times are different from planned
+ /// ata can be set by mooring if actual times are different from planned
///
- /// can be set by mooring if actual times are different from planned
+ /// ata can be set by mooring if actual times are different from planned
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "ata", EmitDefaultValue = true)]
public DateTime? Ata { get; set; }
///
- /// can be set by mooring if actual times are different from planned
+ /// atd can be set by mooring if actual times are different from planned
///
- /// can be set by mooring if actual times are different from planned
+ /// atd can be set by mooring if actual times are different from planned
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "atd", EmitDefaultValue = true)]
public DateTime? Atd { get; set; }
///
/// Optional end of the interval for the times eta entry
///
/// Optional end of the interval for the times eta entry
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "eta_interval_end", EmitDefaultValue = true)]
public DateTime? EtaIntervalEnd { get; set; }
///
/// Optional end of the interval for the times etd entry
///
/// Optional end of the interval for the times etd entry
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "etd_interval_end", EmitDefaultValue = true)]
public DateTime? EtdIntervalEnd { get; set; }
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when times record was created
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when times record was created
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "created", EmitDefaultValue = true)]
public DateTime Created { get; set; }
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when times record was last modified
///
- /// Readonly field set by the database
+ /// Readonly field set by the database when times record was last modified
+ /// 2023-08-21T08:23:35Z
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime? Modified { get; set; }
///
@@ -8035,7 +8455,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.5.0
+ * The version of the OpenAPI document: 1.6.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -8070,36 +8490,43 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Id
///
+ /// 42
[DataMember(Name = "id", EmitDefaultValue = true)]
public int Id { get; set; }
///
/// Gets or Sets OldPassword
///
+ /// oldpassword
[DataMember(Name = "old_password", EmitDefaultValue = true)]
public string OldPassword { get; set; }
///
/// Gets or Sets NewPassword
///
+ /// newpassword
[DataMember(Name = "new_password", EmitDefaultValue = true)]
public string NewPassword { get; set; }
///
/// Gets or Sets FirstName
///
+ /// John
[DataMember(Name = "first_name", EmitDefaultValue = true)]
public string FirstName { get; set; }
///
/// Gets or Sets LastName
///
+ /// Doe
[DataMember(Name = "last_name", EmitDefaultValue = true)]
public string LastName { get; set; }
///
/// Gets or Sets UserPhone
///
+ /// 1234567890
[DataMember(Name = "user_phone", EmitDefaultValue = true)]
public string UserPhone { get; set; }
///
/// Gets or Sets UserEmail
///
+ /// no@where.com
[DataMember(Name = "user_email", EmitDefaultValue = true)]
public string UserEmail { get; set; }
///
diff --git a/misc/BreCalApi.yaml b/misc/BreCalApi.yaml
index 0cf9ca9..605a17a 100644
--- a/misc/BreCalApi.yaml
+++ b/misc/BreCalApi.yaml
@@ -2,7 +2,7 @@ openapi: 3.0.0
x-stoplight:
id: mwv4y8vcnopwr
info:
- version: 1.5.0
+ version: 1.6.0
title: Bremen calling API
description: 'Administer DEBRE ship calls, times and notifications'
termsOfService: 'https://www.bsmd.de/'
@@ -15,7 +15,7 @@ info:
url: 'https://www.bsmd.de/license'
servers:
- url: 'https://brecal.bsmd-emswe.eu'
- description: Development server hosted on vcup
+ description: Test server hosted on vcup
tags:
- name: user
- name: shipcall
@@ -37,6 +37,9 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/credentials'
+ example:
+ username: alfred
+ password: '123456'
responses:
'200':
description: Successful response
@@ -44,6 +47,16 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/login_result'
+ example:
+ id: 42
+ participant_id: 5
+ first_name: John
+ last_name: Doe
+ user_name: johndoe
+ user_phone: '1234567890'
+ user_email: no@where.com
+ exp: 1630000000
+ token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
'400':
$ref: '#/components/responses/400'
'403':
@@ -66,6 +79,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/user_details'
+ example:
+ id: 42
+ first_name: John
+ last_name: Doe
+ user_phone: '1234567890'
+ user_email: no@where.de
responses:
'200':
$ref: '#/components/responses/200'
@@ -91,6 +110,7 @@ paths:
description: 'number of days in the past to include in the result. *Example: 7*.'
schema:
type: integer
+ example: 7
responses:
'200':
description: ship call list
@@ -98,6 +118,73 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/shipcalls'
+ example:
+ - id: 6
+ ship_id: 8
+ type: arrival
+ eta: '2023-08-21T08:23:35Z'
+ voyage: Voyage 123
+ etd: '2023-08-21T08:23:35Z'
+ arrival_berth_id: 3
+ departure_berth_id: 4
+ tug_required: true
+ pilot_required: true
+ flags: 1
+ pier_side: false
+ bunkering: false
+ replenishing_terminal: false
+ replenishing_lock: false
+ draft: 10.5
+ tidal_window_from: '2023-08-21T08:23:35Z'
+ tidal_window_to: '2023-08-21T08:23:35Z'
+ rain_sensitive_cargo: false
+ recommended_tugs: 2
+ anchored: false
+ moored_lock: false
+ canceled: false
+ evaluation: yellow
+ evaluation_message: Time window too short
+ time_ref_point: 1
+ participants:
+ - participant_id: 5
+ type: 4
+ - participant_id: 6
+ type: 8
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ - id: 7
+ ship_id: 8
+ type: departure
+ eta: '2023-08-21T08:23:35Z'
+ voyage: Voyage 123
+ etd: '2023-08-21T08:23:35Z'
+ arrival_berth_id: 3
+ departure_berth_id: 4
+ tug_required: true
+ pilot_required: true
+ flags: 1
+ pier_side: false
+ bunkering: false
+ replenishing_terminal: false
+ replenishing_lock: false
+ draft: 10.5
+ tidal_window_from: '2023-08-21T08:23:35Z'
+ tidal_window_to: '2023-08-21T08:23:35Z'
+ rain_sensitive_cargo: false
+ recommended_tugs: 2
+ anchored: false
+ moored_lock: false
+ canceled: false
+ evaluation: yellow
+ evaluation_message: Time window too short
+ time_ref_point: 1
+ participants:
+ - participant_id: 5
+ type: 4
+ - participant_id: 6
+ type: 8
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
'400':
$ref: '#/components/responses/400'
'401':
@@ -119,6 +206,38 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/shipcall'
+ example:
+ id: 6
+ ship_id: 8
+ type: arrival
+ eta: '2023-08-21T08:23:35Z'
+ voyage: Voyage 123
+ etd: '2023-08-21T08:23:35Z'
+ arrival_berth_id: 3
+ departure_berth_id: 4
+ tug_required: true
+ pilot_required: true
+ flags: 1
+ pier_side: false
+ bunkering: false
+ replenishing_terminal: false
+ replenishing_lock: false
+ draft: 10.5
+ tidal_window_from: '2023-08-21T08:23:35Z'
+ tidal_window_to: '2023-08-21T08:23:35Z'
+ rain_sensitive_cargo: false
+ recommended_tugs: 2
+ anchored: false
+ moored_lock: false
+ canceled: false
+ evaluation: yellow
+ evaluation_message: Time window too short
+ time_ref_point: 1
+ participants:
+ - participant_id: 5
+ type: 4
+ - participant_id: 6
+ type: 8
responses:
'201':
$ref: '#/components/responses/201'
@@ -143,6 +262,37 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/shipcall'
+ example:
+ ship_id: 8
+ type: arrival
+ eta: '2023-08-21T08:23:35Z'
+ voyage: Voyage 123
+ etd: '2023-08-21T08:23:35Z'
+ arrival_berth_id: 3
+ departure_berth_id: 4
+ tug_required: true
+ pilot_required: true
+ flags: 1
+ pier_side: false
+ bunkering: false
+ replenishing_terminal: false
+ replenishing_lock: false
+ draft: 10.5
+ tidal_window_from: '2023-08-21T08:23:35Z'
+ tidal_window_to: '2023-08-21T08:23:35Z'
+ rain_sensitive_cargo: false
+ recommended_tugs: 2
+ anchored: false
+ moored_lock: false
+ canceled: false
+ evaluation: yellow
+ evaluation_message: Time window too short
+ time_ref_point: 1
+ participants:
+ - participant_id: 5
+ type: 4
+ - participant_id: 6
+ type: 8
responses:
'200':
$ref: '#/components/responses/200'
@@ -168,6 +318,25 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ship_list'
+ example:
+ - id: 2
+ name: MS Bremen
+ imo: 1234567
+ type: 1
+ length: 200
+ width: 30
+ draft: 10
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ - id: 3
+ name: MS Helgoland
+ imo: 7654321
+ type: 1
+ length: 150
+ width: 12
+ draft: 5
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
'400':
$ref: '#/components/responses/400'
'401':
@@ -189,6 +358,13 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ship'
+ example:
+ name: MS Bremen
+ imo: 1234567
+ type: 1
+ length: 200
+ width: 30
+ draft: 10
responses:
'201':
$ref: '#/components/responses/201'
@@ -213,6 +389,13 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ship'
+ example:
+ id: 2
+ imo: 1234567
+ name: Ship name
+ type: 1
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
responses:
'200':
$ref: '#/components/responses/200'
@@ -232,10 +415,12 @@ paths:
operationId: shipDelete
parameters:
- name: id
+ description: '**Id of ship**. *Example: 42*. Id of ship to be deleted.'
in: query
required: true
schema:
type: integer
+ example: 42
responses:
'200':
$ref: '#/components/responses/200'
@@ -261,13 +446,23 @@ paths:
description: '**Id of user**. *Example: 2*. User id returned by verify call.'
schema:
type: integer
+ example: 2
responses:
'200':
- description: ship call list
+ description: one or all participants as list
content:
application/json:
schema:
$ref: '#/components/schemas/participant_list'
+ example:
+ - id: 5
+ name: BSMD
+ type: 1
+ created: '2023-08-21T08:23:35Z'
+ - id: 6
+ name: Terminal 1
+ type: 2
+ created: '2023-08-21T08:23:35Z'
'400':
$ref: '#/components/responses/400'
'401':
@@ -291,6 +486,8 @@ paths:
description: '**Id**. *Example: 42*. Id of referenced ship call.'
schema:
type: integer
+ example: 42
+ example: 42
responses:
'200':
description: list of recorded times
@@ -298,6 +495,31 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/times_list'
+ example:
+ - id: 2
+ eta_berth: '2023-08-21T08:23:35Z'
+ eta_berth_fixed: true
+ etd_berth: '2023-08-21T08:23:35Z'
+ etd_berth_fixed: true
+ lock_time: '2023-08-21T08:23:35Z'
+ lock_time_fixed: true
+ zone_entry: '2023-08-21T08:23:35Z'
+ zone_entry_fixed: true
+ operations_start: '2023-08-21T08:23:35Z'
+ operations_end: '2023-08-21T08:23:35Z'
+ remarks: Please be aware of the strong current
+ shipcall_id: 23
+ participant_id: 34
+ berth_id: 1
+ berth_info: 200m length
+ pier_side: true
+ participant_type: 4
+ ata: '2023-08-21T08:23:35Z'
+ atd: '2023-08-21T08:23:35Z'
+ eta_interval_end: '2023-08-21T08:23:35Z'
+ etd_interval_end: '2023-08-21T08:23:35Z'
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
'400':
$ref: '#/components/responses/400'
'401':
@@ -319,6 +541,28 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/times'
+ example:
+ eta_berth: '2023-08-21T08:23:35Z'
+ eta_berth_fixed: true
+ etd_berth: '2023-08-21T08:23:35Z'
+ etd_berth_fixed: true
+ lock_time: '2023-08-21T08:23:35Z'
+ lock_time_fixed: true
+ zone_entry: '2023-08-21T08:23:35Z'
+ zone_entry_fixed: true
+ operations_start: '2023-08-21T08:23:35Z'
+ operations_end: '2023-08-21T08:23:35Z'
+ remarks: Please be aware of the strong current
+ shipcall_id: 23
+ participant_id: 34
+ berth_id: 1
+ berth_info: 200m length
+ pier_side: true
+ participant_type: 4
+ ata: '2023-08-21T08:23:35Z'
+ atd: '2023-08-21T08:23:35Z'
+ eta_interval_end: '2023-08-21T08:23:35Z'
+ etd_interval_end: '2023-08-21T08:23:35Z'
responses:
'201':
$ref: '#/components/responses/201'
@@ -343,6 +587,31 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/times'
+ example:
+ id: 2
+ eta_berth: '2023-08-21T08:23:35Z'
+ eta_berth_fixed: true
+ etd_berth: '2023-08-21T08:23:35Z'
+ etd_berth_fixed: true
+ lock_time: '2023-08-21T08:23:35Z'
+ lock_time_fixed: true
+ zone_entry: '2023-08-21T08:23:35Z'
+ zone_entry_fixed: true
+ operations_start: '2023-08-21T08:23:35Z'
+ operations_end: '2023-08-21T08:23:35Z'
+ remarks: Please be aware of the strong current
+ shipcall_id: 23
+ participant_id: 34
+ berth_id: 1
+ berth_info: 200m length
+ pier_side: true
+ participant_type: 4
+ ata: '2023-08-21T08:23:35Z'
+ atd: '2023-08-21T08:23:35Z'
+ eta_interval_end: '2023-08-21T08:23:35Z'
+ etd_interval_end: '2023-08-21T08:23:35Z'
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
responses:
'200':
$ref: '#/components/responses/200'
@@ -362,6 +631,7 @@ paths:
operationId: timesDelete
parameters:
- name: id
+ description: '**Id of times**. *Example: 42*. Id of times entry to be deleted.'
in: query
required: true
schema:
@@ -397,7 +667,18 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/notification'
+ $ref: '#/components/schemas/notification_list'
+ example:
+ - id: 2
+ shipcall_id: 52
+ participant_id: 5
+ message: Please be aware of the strong current
+ created: '2023-08-21T08:23:35Z'
+ - id: 3
+ shipcall_id: 52
+ participant_id: 6
+ message: Please be aware of the strong current
+ created: '2023-08-21T08:23:35Z'
'400':
$ref: '#/components/responses/400'
'401':
@@ -420,6 +701,15 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/berth_list'
+ example:
+ - id: 3
+ name: Pier 1
+ owner_id: 5
+ port_id: 3
+ - id: 4
+ name: Pier 2
+ owner_id: 5
+ port_id: 3
'400':
$ref: '#/components/responses/400'
'401':
@@ -439,7 +729,7 @@ paths:
- name: shipcall_id
in: query
required: true
- description: '**Id of ship call**. *Example: 52*. Id given in ship call list'
+ description: '**Id of ship call**. *Example: 3*. Id given in ship call list'
schema:
$ref: '#/components/schemas/shipcallId'
responses:
@@ -449,6 +739,19 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/history_list'
+ example:
+ - id: 2
+ shipcall_id: 3
+ participant_id: 5
+ operation: insert
+ type: shipcall
+ created: '2023-08-21T08:23:35Z'
+ - id: 3
+ shipcall_id: 3
+ participant_id: 6
+ operation: update
+ type: shipcall
+ created: '2023-08-21T08:23:35Z'
'400':
$ref: '#/components/responses/400'
'401':
@@ -457,25 +760,62 @@ paths:
$ref: '#/components/responses/500'
'503':
$ref: '#/components/responses/503'
+ /ports:
+ get:
+ summary: Your GET endpoint
+ description: Returns a list of ports
+ tags:
+ - static
+ operationId: get-ports
+ responses:
+ '200':
+ description: list of ports
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/port_list'
+ example:
+ - id: 3
+ name: Bremen
+ country: Germany
+ - id: 4
+ name: Hamburg
+ country: Germany
+ '401':
+ $ref: '#/components/responses/401'
+ '403':
+ $ref: '#/components/responses/403'
+ '500':
+ $ref: '#/components/responses/500'
+ '503':
+ $ref: '#/components/responses/503'
components:
schemas:
credentials:
+ description: Login credentials for the user
type: object
properties:
username:
type: string
+ example: alfred
password:
type: string
format: password
+ example: '123456'
required:
- username
- password
+ example:
+ username: alfred
+ password: '123456'
timesId:
description: The unique identifier for a times entry
type: integer
+ example: 2
shipcallId:
description: The unique identifier of a ship call
type: integer
+ example: 6
participant_assignment:
description: Participant assigned to a shipcall with a given role (type)
type: object
@@ -485,479 +825,971 @@ components:
properties:
participant_id:
type: integer
+ example: 5
type:
- description: 'Currently this is encoded as an integer, since in OpenAPI 3.0 there are no enumerations supported with discrete integer values like a bitwise flag array used here. Each bit corresponds to a role. Since a participant can have multiple roles, these bits are combined by OR. Individual values: 1: BSMD 2: TERMINAL, 4: PILOT, 8: AGENCY, 16: MOORING, 32: PORT_ADMINISTRATION, 64: TUG'
+ description: 'Possible role values: 1: BSMD 2: TERMINAL, 4: PILOT, 8: AGENCY, 16: MOORING, 32: PORT_ADMINISTRATION, 64: TUG. A participant may appear multiple times with different roles.'
type: integer
+ example: 4
+ example:
+ participant_id: 5
+ type: 4
shipcall:
type: object
+ description: Ship call data
+ example:
+ id: 6
+ ship_id: 8
+ port_id: 1
+ type: arrival
+ eta: '2023-08-21T08:23:35Z'
+ voyage: Voyage 123
+ etd: '2023-08-21T08:23:35Z'
+ arrival_berth_id: 3
+ departure_berth_id: 4
+ tug_required: true
+ pilot_required: true
+ flags: 1
+ pier_side: false
+ bunkering: false
+ replenishing_terminal: false
+ replenishing_lock: false
+ draft: 10.5
+ tidal_window_from: '2023-08-21T08:23:35Z'
+ tidal_window_to: '2023-08-21T08:23:35Z'
+ rain_sensitive_cargo: false
+ recommended_tugs: 2
+ anchored: false
+ moored_lock: false
+ canceled: false
+ evaluation: yellow
+ evaluation_message: Time window too short
+ time_ref_point: 1
+ participants:
+ - participant_id: 5
+ type: 4
+ - participant_id: 6
+ type: 8
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
properties:
id:
- $ref: '#/components/schemas/shipcallId'
+ type: integer
+ example: 6
ship_id:
type: integer
+ example: 8
+ port_id:
+ type: integer
+ example: 3
type:
$ref: '#/components/schemas/ShipcallType'
eta:
type: string
format: date-time
+ example: '2023-08-21T08:23:35Z'
nullable: true
voyage:
type: string
maxLength: 16
+ example: Voyage 123
nullable: true
etd:
type: string
format: date-time
+ example: '2023-08-21T08:23:35Z'
nullable: true
arrival_berth_id:
type: integer
+ example: 3
nullable: true
departure_berth_id:
type: integer
+ example: 4
nullable: true
tug_required:
type: boolean
+ example: true
nullable: true
pilot_required:
type: boolean
+ example: true
nullable: true
flags:
type: integer
+ example: 1
nullable: true
pier_side:
type: boolean
+ example: false
nullable: true
bunkering:
type: boolean
+ example: false
nullable: true
replenishing_terminal:
type: boolean
+ example: false
nullable: true
replenishing_lock:
type: boolean
+ example: false
nullable: true
draft:
type: number
format: double
+ example: 10.5
nullable: true
tidal_window_from:
type: string
format: date-time
+ example: '2023-08-21T08:23:35Z'
nullable: true
tidal_window_to:
type: string
format: date-time
+ example: '2023-08-21T08:23:35Z'
nullable: true
rain_sensitive_cargo:
type: boolean
+ example: false
nullable: true
recommended_tugs:
type: integer
+ example: 2
nullable: true
anchored:
type: boolean
+ example: false
nullable: true
moored_lock:
type: boolean
+ example: false
nullable: true
canceled:
type: boolean
+ example: false
nullable: true
evaluation:
$ref: '#/components/schemas/EvaluationType'
evaluation_message:
- readOnly: true
maxLength: 512
type: string
+ example: Time window too short
nullable: true
+ readOnly: true
time_ref_point:
type: integer
- nullable: true
description: Physical reference point for all times given in shipcall and depending times entries
+ example: 1
+ nullable: true
participants:
type: array
+ example:
+ - participant_id: 5
+ type: 4
+ - participant_id: 6
+ type: 8
items:
$ref: '#/components/schemas/participant_assignment'
created:
type: string
format: date-time
- description: Readonly field set by the database
+ description: Readonly field set by the database when shipcall was created
+ example: '2023-08-21T08:23:35Z'
modified:
type: string
format: date-time
+ description: Readonly field set by the database when shipcall was last modified
+ example: '2023-08-21T08:23:35Z'
nullable: true
- description: Readonly field set by the database
required:
- - id
- ship_id
- type
shipcalls:
+ description: List of ship calls
type: array
items:
$ref: '#/components/schemas/shipcall'
+ example:
+ - id: 6
+ ship_id: 8
+ port_id: 1
+ type: arrival
+ eta: '2023-08-21T08:23:35Z'
+ voyage: Voyage 123
+ etd: '2023-08-21T08:23:35Z'
+ arrival_berth_id: 3
+ departure_berth_id: 4
+ tug_required: true
+ pilot_required: true
+ flags: 1
+ pier_side: false
+ bunkering: false
+ replenishing_terminal: false
+ replenishing_lock: false
+ draft: 10.5
+ tidal_window_from: '2023-08-21T08:23:35Z'
+ tidal_window_to: '2023-08-21T08:23:35Z'
+ rain_sensitive_cargo: false
+ recommended_tugs: 2
+ anchored: false
+ moored_lock: false
+ canceled: false
+ evaluation: yellow
+ evaluation_message: Time window too short
+ time_ref_point: 1
+ participants:
+ - participant_id: 5
+ type: 4
+ - participant_id: 6
+ type: 8
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ - id: 7
+ ship_id: 8
+ port_id: 1
+ type: departure
+ eta: '2023-08-21T08:23:35Z'
+ voyage: Voyage 123
+ etd: '2023-08-21T08:23:35Z'
+ arrival_berth_id: 3
+ departure_berth_id: 4
+ tug_required: true
+ pilot_required: true
+ flags: 1
+ pier_side: false
+ bunkering: false
+ replenishing_terminal: false
+ replenishing_lock: false
+ draft: 10.5
+ tidal_window_from: '2023-08-21T08:23:35Z'
+ tidal_window_to: '2023-08-21T08:23:35Z'
+ rain_sensitive_cargo: false
+ recommended_tugs: 2
+ anchored: false
+ moored_lock: false
+ canceled: false
+ evaluation: red
+ evaluation_message: Disagreement on time windows
+ time_ref_point: 1
+ participants:
+ - participant_id: 5
+ type: 4
+ - participant_id: 6
+ type: 8
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
times:
type: object
description: 'the id parameter needs to be missing on POST and to be present on PUT (Update) calls, otherwise a 400 response will be generated'
properties:
id:
type: integer
+ example: 2
eta_berth:
type: string
format: date-time
nullable: true
description: Arrival time at berth
+ example: '2023-08-21T08:23:35Z'
eta_berth_fixed:
type: boolean
nullable: true
- description: currently unused
+ description: 'If true, the eta is fixed and cannot be changed'
+ example: true
etd_berth:
type: string
format: date-time
nullable: true
description: departure time from berth
+ example: '2023-08-21T08:23:35Z'
etd_berth_fixed:
type: boolean
nullable: true
- description: currently unused
+ description: 'If true, the etd is fixed and cannot be changed'
+ example: true
lock_time:
type: string
format: date-time
nullable: true
description: arrival time at lock
+ example: '2023-08-21T08:23:35Z'
lock_time_fixed:
type: boolean
nullable: true
- description: currently unused
+ description: 'If true, the lock time is fixed and cannot be changed'
+ example: true
zone_entry:
type: string
format: date-time
nullable: true
- description: currently unused
+ description: Expected time of entry into the zone
+ example: '2023-08-21T08:23:35Z'
zone_entry_fixed:
type: boolean
nullable: true
- description: currently unused
+ description: 'If true, the zone entry time is fixed and cannot be changed'
+ example: true
operations_start:
type: string
format: date-time
nullable: true
description: Start time for terminal operations
+ example: '2023-08-21T08:23:35Z'
operations_end:
type: string
format: date-time
nullable: true
description: End time for terminal operations
+ example: '2023-08-21T08:23:35Z'
remarks:
type: string
maxLength: 512
nullable: true
+ description: Additional remarks
+ example: Please be aware of the strong current
shipcall_id:
type: integer
description: Reference to a shipcall id
+ example: 23
participant_id:
type: integer
description: Reference to a participant id
+ example: 34
berth_id:
type: integer
nullable: true
description: Reference to a berth id
+ example: 1
berth_info:
type: string
nullable: true
maxLength: 512
description: Additional info text for berth
+ example: 200m length
pier_side:
description: 'true if ship is rotated, false otherwise'
type: boolean
nullable: true
+ example: true
participant_type:
type: integer
+ example: 4
ata:
type: string
format: date-time
nullable: true
- description: can be set by mooring if actual times are different from planned
+ description: ata can be set by mooring if actual times are different from planned
+ example: '2023-08-21T08:23:35Z'
atd:
type: string
format: date-time
nullable: true
- description: can be set by mooring if actual times are different from planned
+ description: atd can be set by mooring if actual times are different from planned
+ example: '2023-08-21T08:23:35Z'
eta_interval_end:
type: string
format: date-time
nullable: true
description: Optional end of the interval for the times eta entry
+ example: '2023-08-21T08:23:35Z'
etd_interval_end:
type: string
format: date-time
nullable: true
description: Optional end of the interval for the times etd entry
+ example: '2023-08-21T08:23:35Z'
created:
type: string
format: date-time
- description: Readonly field set by the database
+ description: Readonly field set by the database when times record was created
+ example: '2023-08-21T08:23:35Z'
modified:
type: string
format: date-time
nullable: true
- description: Readonly field set by the database
+ description: Readonly field set by the database when times record was last modified
+ example: '2023-08-21T08:23:35Z'
required:
- shipcall_id
- participant_id
+ example:
+ id: 2
+ eta_berth: '2023-08-21T08:23:35Z'
+ eta_berth_fixed: true
+ etd_berth: '2023-08-21T08:23:35Z'
+ etd_berth_fixed: true
+ lock_time: '2023-08-21T08:23:35Z'
+ lock_time_fixed: true
+ zone_entry: '2023-08-21T08:23:35Z'
+ zone_entry_fixed: true
+ operations_start: '2023-08-21T08:23:35Z'
+ operations_end: '2023-08-21T08:23:35Z'
+ remarks: Please be aware of the strong current
+ shipcall_id: 23
+ participant_id: 34
+ berth_id: 1
+ berth_info: 200m length
+ pier_side: true
+ participant_type: 4
+ ata: '2023-08-21T08:23:35Z'
+ atd: '2023-08-21T08:23:35Z'
+ eta_interval_end: '2023-08-21T08:23:35Z'
+ etd_interval_end: '2023-08-21T08:23:35Z'
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
times_list:
+ description: List of times entries
type: array
items:
$ref: '#/components/schemas/times'
+ example:
+ - id: 2
+ eta_berth: '2023-08-21T08:23:35Z'
+ eta_berth_fixed: true
+ etd_berth: '2023-08-21T08:23:35Z'
+ etd_berth_fixed: true
+ lock_time: '2023-08-21T08:23:35Z'
+ lock_time_fixed: true
+ zone_entry: '2023-08-21T08:23:35Z'
+ zone_entry_fixed: true
+ operations_start: '2023-08-21T08:23:35Z'
+ operations_end: '2023-08-21T08:23:35Z'
+ remarks: Please be aware of the strong current
+ shipcall_id: 23
+ participant_id: 34
+ berth_id: 1
+ berth_info: 200m length
+ pier_side: true
+ participant_type: 4
+ ata: '2023-08-21T08:23:35Z'
+ atd: '2023-08-21T08:23:35Z'
+ eta_interval_end: '2023-08-21T08:23:35Z'
+ etd_interval_end: '2023-08-21T08:23:35Z'
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ - id: 3
+ eta_berth: '2023-08-21T08:23:35Z'
+ eta_berth_fixed: true
+ etd_berth: '2023-08-21T08:23:35Z'
+ etd_berth_fixed: true
+ lock_time: '2023-08-21T08:23:35Z'
+ lock_time_fixed: true
+ zone_entry: '2023-08-21T08:23:35Z'
+ zone_entry_fixed: true
+ operations_start: '2023-08-21T08:23:35Z'
+ operations_end: '2023-08-21T08:23:35Z'
+ remarks: Please be aware of the strong current
+ shipcall_id: 23
+ participant_id: 34
+ berth_id: 1
+ berth_info: 200m length
+ pier_side: true
+ participant_type: 4
+ ata: '2023-08-21T08:23:35Z'
+ atd: '2023-08-21T08:23:35Z'
+ eta_interval_end: '2023-08-21T08:23:35Z'
+ etd_interval_end: '2023-08-21T08:23:35Z'
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
berth:
type: object
description: Ship berth used for a ship call
properties:
id:
type: integer
+ example: 3
name:
type: string
maxLength: 128
+ example: Pier 1
owner_id:
type: integer
nullable: true
description: Optional reference to a participant (terminal)
+ example: 5
authority_id:
type: integer
nullable: true
description: Optional reference to a participant (port authority)
+ example: 6
lock:
type: boolean
nullable: true
description: If true lock must be passed
+ example: true
+ port_id:
+ type: integer
+ nullable: false
+ description: Required reference to a port
+ example: 1
created:
+ description: Readonly field set by the database when berth was created
type: string
format: date-time
+ example: '2023-08-21T08:23:35Z'
modified:
+ description: Readonly field set by the database when berth was last modified
type: string
format: date-time
nullable: true
+ example: '2023-08-21T08:23:35Z'
deleted:
+ description: marks the berth as logically deleted
type: boolean
default: false
+ example: false
+ example:
+ id: 3
+ name: Pier 1
+ owner_id: 5
+ authority_id: 6
+ lock: true
+ port_id: 1
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ deleted: false
berth_list:
type: array
+ description: List of berths
items:
$ref: '#/components/schemas/berth'
+ example:
+ - id: 3
+ name: Pier 1
+ owner_id: 5
+ authority_id: 6
+ lock: true
+ port_id: 1
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ deleted: false
+ - id: 4
+ name: Pier 2
+ owner_id: 5
+ authority_id: 6
+ lock: true
+ port_id: 1
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ deleted: false
ship:
type: object
description: a ship
properties:
id:
type: integer
+ example: 8
name:
type: string
maxLength: 64
+ example: MS Bremen
imo:
type: integer
nullable: true
+ example: 1234567
callsign:
type: string
maxLength: 8
nullable: true
+ example: DBRE
participant_id:
type: integer
nullable: true
description: Optional reference to participant (tug role)
+ example: 9
length:
type: number
format: double
nullable: true
+ example: 200
width:
type: number
format: double
nullable: true
+ example: 30
is_tug:
type: boolean
default: false
+ example: false
bollard_pull:
type: integer
nullable: true
+ example: 100
eni:
type: integer
nullable: true
description: BSMD internal use
+ example: 1234567
created:
type: string
format: date-time
+ description: Readonly field set by the database when ship was created
+ example: '2023-08-21T08:23:35Z'
modified:
type: string
format: date-time
nullable: true
+ description: Readonly field set by the database when ship was last modified
+ example: '2023-08-21T08:23:35Z'
deleted:
type: boolean
default: false
+ description: marks the ship as logically deleted
+ example: false
+ example:
+ id: 8
+ name: MS Bremen
+ imo: 1234567
+ callsign: DBRE
+ participant_id: 9
+ length: 200
+ width: 30
+ is_tug: false
+ bollard_pull: 100
+ eni: 1234567
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ deleted: false
ship_list:
type: array
+ description: List of ships
items:
$ref: '#/components/schemas/ship'
+ example:
+ - id: 8
+ name: MS Bremen
+ imo: 1234567
+ callsign: DBRE
+ participant_id: 9
+ length: 200
+ width: 30
+ is_tug: false
+ bollard_pull: 100
+ eni: 1234567
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ deleted: false
+ - id: 9
+ name: MS Alfred
+ imo: 1234568
+ callsign: DBRF
+ participant_id: 9
+ length: 200
+ width: 30
+ is_tug: false
+ bollard_pull: 100
+ eni: 1234567
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ deleted: false
history:
type: object
description: Single history entry with references
properties:
id:
type: integer
+ example: 3
participant_id:
type: integer
+ example: 5
shipcall_id:
type: integer
+ example: 42
timestamp:
type: string
format: date-time
+ example: '2023-08-21T08:23:35Z'
eta:
type: string
format: date-time
+ example: '2023-08-21T08:23:35Z'
operation:
$ref: '#/components/schemas/OperationType'
type:
$ref: '#/components/schemas/ObjectType'
+ example:
+ id: 3
+ participant_id: 5
+ shipcall_id: 42
+ timestamp: '2023-08-21T08:23:35Z'
+ eta: '2023-08-21T08:23:35Z'
+ operation: update
+ type: shipcall
history_list:
type: array
+ description: List of history items
items:
$ref: '#/components/schemas/history'
x-stoplight:
id: 93b5ff080c12a
+ example:
+ - id: 3
+ participant_id: 5
+ shipcall_id: 42
+ timestamp: '2023-08-21T08:23:35Z'
+ eta: '2023-08-21T08:23:35Z'
+ operation: insert
+ type: shipcall
+ - id: 4
+ participant_id: 5
+ shipcall_id: 42
+ timestamp: '2023-08-21T08:23:35Z'
+ eta: '2023-08-21T08:23:35Z'
+ operation: update
+ type: shipcall
notification:
type: object
description: a notification created by the engine if a times entry violates a rule
properties:
id:
type: integer
+ example: 42
shipcall_id:
type: integer
+ example: 5
notification_type:
$ref: '#/components/schemas/NotificationType'
message:
type: string
+ example: Entry XY violates rule Z
created:
type: string
format: date-time
- description: Readonly field set by the database
+ description: Readonly field set by the database when notification was created
+ example: '2023-08-21T08:23:35Z'
modified:
type: string
format: date-time
nullable: true
- description: Readonly field set by the database
+ description: Readonly field set by the database when notification was last modified
+ example: '2023-08-21T08:23:35Z'
+ example:
+ id: 42
+ shipcall_id: 5
+ notification_type: email
+ message: Entry XY violates rule Z
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ notification_list:
+ type: array
+ description: List of notifications
+ items:
+ $ref: '#/components/schemas/notification'
+ example:
+ - id: 42
+ shipcall_id: 5
+ notification_type: email
+ message: Entry XY violates rule Z
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ - id: 43
+ shipcall_id: 7
+ notification_type: email
+ message: Entry AB violates rule C
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
participant:
type: object
description: A organisational entity that participates in Bremen Calling
+ example:
+ id: 42
+ name: BSMD
+ street: Hermann-Hollerith-Str. 7
+ postal code: '28359'
+ city: Bremen
+ type: 10
+ flags: 0
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ deleted: false
properties:
id:
type: integer
+ example: 42
name:
type: string
maxLength: 128
+ example: BSMD
street:
type: string
maxLength: 128
+ example: Hermann-Hollerith-Str. 7
postal code:
type: string
maxLength: 5
+ example: '28359'
city:
type: string
maxLength: 64
+ example: Bremen
type:
type: integer
- description: a logical combination (bitflag) of possible values. This cannot be encoded in a Enumeration type with discrete values in OpenAPI version < 3.1. The values are 1=
+ description: a logical combination (bitflag) of possible values. This cannot be encoded in a Enumeration type with discrete values in OpenAPI version < 3.1.
+ example: 10
flags:
+ description: Bit-encoded flag array for internal use
type: integer
+ example: 0
nullable: true
+ ports:
+ type: array
+ x-stoplight:
+ id: cj29rdqeg15b3
+ items:
+ x-stoplight:
+ id: is7kj0fmlc1nz
+ type: integer
+ minimum: 1
+ example: 1
+ example:
+ - 1
+ - 2
created:
type: string
format: date-time
- description: Readonly field set by the database
+ description: Readonly field set by the database when participant was created
+ example: '2023-08-21T08:23:35Z'
modified:
type: string
format: date-time
+ description: Readonly field set by the database when participant was last modified
+ example: '2023-08-21T08:23:35Z'
nullable: true
- description: Readonly field set by the database
deleted:
+ description: marks the participant as logically deleted
type: boolean
default: false
+ example: false
participant_list:
+ description: List of participants
type: array
items:
$ref: '#/components/schemas/participant'
+ example:
+ - id: 42
+ name: BSMD
+ street: Hermann-Hollerith-Str. 7
+ postal code: '28359'
+ city: Bremen
+ type: 10
+ flags: 0
+ created: '2023-08-21T08:23:35Z'
+ modified: '2023-08-21T08:23:35Z'
+ deleted: false
login_result:
type: object
description: result structure of a successful login attempt
properties:
id:
type: integer
+ example: 42
participant_id:
type: integer
+ example: 5
first_name:
type: string
+ example: John
last_name:
type: string
+ example: Doe
user_name:
type: string
+ example: johndoe
user_phone:
type: string
+ example: '1234567890'
user_email:
type: string
+ example: no@where.com
exp:
type: number
format: float
+ example: 1630000000
token:
type: string
+ example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
+ example:
+ id: 42
+ participant_id: 5
+ first_name: John
+ last_name: Doe
+ user_name: johndoe
+ user_phone: '1234567890'
+ user_email: no@where.com
+ exp: 1630000000
+ token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
user_details:
type: object
description: fields that a user may change
properties:
id:
type: integer
+ example: 42
old_password:
type: string
nullable: true
maxLength: 128
+ example: oldpassword
new_password:
type: string
nullable: true
maxLength: 128
+ example: newpassword
first_name:
type: string
nullable: true
maxLength: 45
+ example: John
last_name:
type: string
nullable: true
maxLength: 45
+ example: Doe
user_phone:
maxLength: 128
type: string
nullable: true
+ example: '1234567890'
user_email:
maxLength: 128
type: string
nullable: true
+ example: no@where.com
+ example:
+ id: 42
+ old_password: oldpassword
+ new_password: newpassword
+ first_name: John
+ last_name: Doe
+ user_phone: '1234567890'
+ user_email: no@where.com
Id:
type: object
description: A unique identifier for an entity
properties:
id:
type: integer
+ example: 42
+ example:
+ id: 42
Error:
type: object
description: Structure returned when invalid data (bad request) is created.
properties:
- message:
- description: A human readable error message
+ error_field:
+ description: Input field that caused the error or general error message
type: string
- errors:
- description: A list of errors
- type: array
- items:
- type: string
- valid_data:
- description: A dictionary of valid data
- type: object
+ example: eta
+ error_description:
+ description: Detailed description if error_field was an input field
+ type: string
+ example: eta must be in the future
required:
- - message
+ - error_field
+ example:
+ error_field: eta
+ error_description: eta must be in the future
ShipcallType:
type: string
enum:
@@ -966,14 +1798,18 @@ components:
- departure
- shifting
x-internal: false
- description: ''
+ description: Type of ship call
+ example: arrival
NotificationType:
type: string
+ description: Type of notification
enum:
- undefined
- email
- push
+ example: email
EvaluationType:
+ description: Evaluation of the ship call
readOnly: true
nullable: true
type: string
@@ -982,20 +1818,84 @@ components:
- green
- yellow
- red
+ example: green
OperationType:
type: string
+ description: Type of operation that was performed
enum:
- undefined
- insert
- update
- delete
+ example: insert
ObjectType:
type: string
+ description: Type of object that was changed
enum:
- times
- shipcall
+ example: times
+ port:
+ title: port
+ x-stoplight:
+ id: j17v63cxewkz6
+ type: object
+ description: Record of port data
+ properties:
+ id:
+ type: integer
+ example: 2
+ minimum: 1
+ name:
+ type: string
+ x-stoplight:
+ id: zfcomg2kr5e9g
+ example: Hamburg
+ locode:
+ type: string
+ x-stoplight:
+ id: lbrnbreql8ah1
+ maxLength: 5
+ minLength: 5
+ example: DEHAM
+ created:
+ description: Readonly field set by the database when port was created
+ type: string
+ format: date-time
+ example: '2023-08-21T08:23:35Z'
+ modified:
+ description: Readonly field set by the database when port was last modified
+ type: string
+ format: date-time
+ nullable: true
+ example: '2023-08-21T08:23:35Z'
+ deleted:
+ description: marks the port as logically deleted
+ type: boolean
+ default: false
+ example: false
+ example:
+ id: 2
+ name: Hamburg
+ locode: DEHAM
+ port_list:
+ title: port_list
+ description: List of ports
+ x-stoplight:
+ id: it0cu6ivurgii
+ type: array
+ items:
+ $ref: '#/components/schemas/port'
+ example:
+ - id: 2
+ name: Hamburg
+ locode: DEHAM
+ - id: 3
+ name: Bremen
+ locode: DEBRE
securitySchemes:
ApiKey:
+ description: API key needed to access the API
type: apiKey
in: header
name: Authorization
@@ -1006,48 +1906,70 @@ components:
application/json:
schema:
$ref: '#/components/schemas/Id'
+ example:
+ id: 42
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Id'
+ example:
+ id: 42
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
+ example:
+ error_field: eta
+ error_description: eta must be in the future
'401':
description: Not authorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
+ example:
+ error_field: user_id
+ error_description: User not authorized to perform this action
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
+ example:
+ error_field: user_id
+ error_description: User not authorized to perform this action
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
+ example:
+ error_field: shipcall_id
+ error_description: Ship call not found
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
+ example:
+ error_field: service
+ error_description: Internal server error
'503':
description: Service unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
+ example:
+ error_field: service
+ error_description: Service is currently unavailable
security:
- ApiKey: []
externalDocs:
diff --git a/misc/clear_entries_for_participant.sql b/misc/clear_entries_for_participant.sql
new file mode 100644
index 0000000..9f33a37
--- /dev/null
+++ b/misc/clear_entries_for_participant.sql
@@ -0,0 +1,23 @@
+DELETE FROM times WHERE
+times.shipcall_id IN
+(
+ SELECT s.id FROM shipcall s
+ JOIN shipcall_participant_map spm ON s.id = spm.shipcall_id
+ JOIN participant p ON spm.participant_id = p.id
+ WHERE p.id = 10
+);
+
+DELETE `history` FROM `history`
+JOIN shipcall s on `history`.shipcall_id = s.id
+JOIN shipcall_participant_map spm ON s.id = spm.shipcall_id
+WHERE spm.participant_id = 10;
+
+-- damit das hier funktioniert muss der FK in shipcall_participant_map von "RESTRICT" auf "SET NULL"
+-- geändert werden
+
+DELETE shipcall FROM shipcall
+INNER JOIN shipcall_participant_map spm ON shipcall.id = spm.shipcall_id
+JOIN participant p ON spm.participant_id = p.id
+WHERE p.id = 10;
+
+DELETE FROM shipcall_participant_map WHERE participant_id = 10;
\ No newline at end of file
diff --git a/misc/requirements.txt b/misc/requirements.txt
new file mode 100644
index 0000000..92b8545
--- /dev/null
+++ b/misc/requirements.txt
@@ -0,0 +1,37 @@
+bcrypt==4.2.0
+blinker==1.8.2
+cached-property==1.5.2
+click==8.1.7
+coro-context-manager==0.2.0
+coverage==7.6.1
+dsnparse==0.1.15
+Flask==3.0.3
+Flask-JWT-Extended==4.6.0
+iniconfig==2.0.0
+itsdangerous==2.2.0
+Jinja2==3.1.4
+MarkupSafe==2.1.5
+marshmallow==3.22.0
+marshmallow-enum==1.5.1
+marshmallow_dataclass==8.7.1
+mypy-extensions==1.0.0
+mysql-connector-python==9.0.0
+numpy==2.1.1
+packaging==24.1
+pandas==2.2.3
+pluggy==1.5.0
+pydapper==0.10.0
+PyJWT==2.9.0
+pytest==8.3.3
+pytest-cov==5.0.0
+python-dateutil==2.9.0.post0
+pytz==2024.2
+schedule==1.2.2
+six==1.16.0
+tqdm==4.66.5
+typeguard==4.3.0
+typing-inspect==0.9.0
+typing_extensions==4.12.2
+tzdata==2024.1
+webargs==8.6.0
+Werkzeug==3.0.4
diff --git a/misc/update_1.5_to_1.6.sql b/misc/update_1.5_to_1.6.sql
new file mode 100644
index 0000000..b17ba5a
--- /dev/null
+++ b/misc/update_1.5_to_1.6.sql
@@ -0,0 +1,57 @@
+CREATE TABLE `port` (
+ `id` int unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) NOT NULL COMMENT 'Name of port',
+ `locode` char(5) DEFAULT NULL COMMENT 'UNECE locode',
+ `created` datetime DEFAULT CURRENT_TIMESTAMP,
+ `modified` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ `deleted` bit(1) DEFAULT b'0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Port as reference for shipcalls and berths';
+
+-- Add default port to table
+INSERT INTO port (id, name, locode) VALUES (1, 'Bremen', 'DEBRE');
+
+-- Adding new ref column to berth
+ALTER TABLE `berth`
+ADD COLUMN `port_id` INT UNSIGNED DEFAULT NULL AFTER `authority_id`;
+ALTER TABLE `berth` ALTER INDEX `FK_AUTHORITY_PART_idx` INVISIBLE;
+
+-- adding a foreign key berth.port_id -> port.id
+ALTER TABLE `berth`
+ADD INDEX `FK_PORT_PART_idx` (`port_id` ASC) VISIBLE;
+
+ALTER TABLE `berth`
+ADD CONSTRAINT `FK_PORT`
+ FOREIGN KEY (`port_id`)
+ REFERENCES `port` (`id`)
+ ON DELETE RESTRICT
+ ON UPDATE RESTRICT;
+
+-- adding new ref column to shipcall incl. foreign key
+ALTER TABLE `shipcall`
+ADD COLUMN `port_id` INT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Selected port for this shipcall' AFTER `evaluation_notifications_sent`,
+CHANGE COLUMN `time_ref_point` `time_ref_point` INT NULL DEFAULT '0' COMMENT 'Index of a location which is the reference point for all time value entries, e.g. berth or Geeste' AFTER `port_id`,
+ADD INDEX `FK_SHIPCALL_PORT_idx` (`port_id` ASC) VISIBLE;
+;
+ALTER TABLE `shipcall`
+ADD CONSTRAINT `FK_SHIPCALL_PORT`
+ FOREIGN KEY (`port_id`)
+ REFERENCES `port` (`id`)
+ ON DELETE RESTRICT
+ ON UPDATE RESTRICT;
+
+CREATE TABLE `participant_port_map` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `participant_id` int unsigned NOT NULL COMMENT 'Ref to participant',
+ `port_id` int unsigned NOT NULL COMMENT 'Ref to port',
+ `created` datetime DEFAULT CURRENT_TIMESTAMP,
+ `modified` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`),
+ KEY `FK_PP_PARTICIPANT` (`participant_id`),
+ KEY `FK_PP_PORT` (`port_id`),
+ CONSTRAINT `FK_PP_PARTICIPANT` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`),
+ CONSTRAINT `FK_PP_PORT` FOREIGN KEY (`port_id`) REFERENCES `port` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Mapping table that assigns participants to a port';
+
+-- all existing berths shall default to "bremen"
+UPDATE berth SET port_id = 1 where port_id is null;
\ No newline at end of file
diff --git a/misc/version.txt b/misc/version.txt
index 34c3267..5dc1d67 100644
--- a/misc/version.txt
+++ b/misc/version.txt
@@ -1 +1 @@
-1.4.1.0
\ No newline at end of file
+1.6.0.8
\ No newline at end of file
diff --git a/src/BreCalClient/BreCalClient.csproj b/src/BreCalClient/BreCalClient.csproj
index ed82cb5..af2d434 100644
--- a/src/BreCalClient/BreCalClient.csproj
+++ b/src/BreCalClient/BreCalClient.csproj
@@ -8,8 +8,8 @@
TrueBreCalClient.App..\..\misc\brecal.snk
- 1.5.0.12
- 1.5.0.12
+ 1.6.0.8
+ 1.6.0.8Bremen calling clientA Windows WPF client for the Bremen calling API.containership.ico
diff --git a/src/BreCalClient/BreCalLists.cs b/src/BreCalClient/BreCalLists.cs
index b0316a2..4bf9b18 100644
--- a/src/BreCalClient/BreCalLists.cs
+++ b/src/BreCalClient/BreCalLists.cs
@@ -25,16 +25,19 @@ namespace BreCalClient
private static List _participants = new();
private static readonly List _ships = new();
private static readonly List _allShips = new();
+ private static readonly List _ports = new();
+ private static readonly List _allPorts = new();
private readonly static ConcurrentDictionary _shipLookupDict = new();
private readonly static ConcurrentDictionary _berthLookupDict = new();
private readonly static Dictionary _participantLookupDict = new();
+ private readonly static ConcurrentDictionary _portLookupDict = new();
///
/// List of TimeRef points
///
// TODO: To make this portable the list of texts should come from a configuration file
- private readonly static List _timeRefs = new List
+ private readonly static List _timeRefs = new()
{
"ETB",
"Geeste",
@@ -45,12 +48,26 @@ namespace BreCalClient
#region Properties
+ ///
+ /// fast ship lookup
+ ///
public static ConcurrentDictionary ShipLookupDict { get { return _shipLookupDict; } }
+ ///
+ /// fast port lookup
+ ///
public static ConcurrentDictionary BerthLookupDict { get { return _berthLookupDict; } }
+ ///
+ /// fast participant lookup
+ ///
public static Dictionary ParticipantLookupDict { get { return _participantLookupDict; } }
+ ///
+ /// fast port lookup
+ ///
+ public static ConcurrentDictionary PortLookupDict { get { return _portLookupDict; } }
+
///
/// Participants that are agents
///
@@ -91,6 +108,16 @@ namespace BreCalClient
///
public static List AllBerths { get { return _allBerths; } }
+ ///
+ /// All active ports
+ ///
+ public static List Ports { get { return _ports; } }
+
+ ///
+ /// All ports including deleted ports
+ ///
+ public static List AllPorts { get { return _allPorts; } }
+
///
/// All active ships
///
@@ -108,7 +135,33 @@ namespace BreCalClient
#endregion
- #region methods
+ #region public static methods
+
+ public static List GetBerthsByPort(int port)
+ {
+ List berths = new();
+ foreach(Berth berth in _berths)
+ {
+ if(berth.PortId == port)
+ berths.Add(berth);
+ }
+ return berths;
+ }
+
+ public static List GetParticipants(int port, Extensions.ParticipantType type)
+ {
+ List participants = new();
+ foreach(Participant participant in _participants)
+ {
+ if(participant.IsTypeFlagSet(type) && participant.Ports.Contains(port))
+ participants.Add(participant);
+ }
+ return participants;
+ }
+
+ #endregion
+
+ #region Internal initializer methods
internal static void InitializeParticipants(List participants)
{
@@ -157,6 +210,17 @@ namespace BreCalClient
}
}
+ internal static void InitializePorts(List ports)
+ {
+ foreach(var port in ports)
+ {
+ _portLookupDict[port.Id] = port;
+ if(!port.Deleted)
+ _ports.Add(port);
+ _allPorts.Add(port);
+ }
+ }
+
#endregion
}
diff --git a/src/BreCalClient/EditShipcallControl.xaml b/src/BreCalClient/EditShipcallControl.xaml
index 9356652..a6a55dd 100644
--- a/src/BreCalClient/EditShipcallControl.xaml
+++ b/src/BreCalClient/EditShipcallControl.xaml
@@ -44,7 +44,9 @@
-
+
+
+
diff --git a/src/BreCalClient/EditShipcallControl.xaml.cs b/src/BreCalClient/EditShipcallControl.xaml.cs
index 8609f0a..f02ab43 100644
--- a/src/BreCalClient/EditShipcallControl.xaml.cs
+++ b/src/BreCalClient/EditShipcallControl.xaml.cs
@@ -6,6 +6,7 @@ using BreCalClient.misc.Api;
using BreCalClient.misc.Model;
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Windows;
using System.Windows.Controls;
using static BreCalClient.Extensions;
@@ -41,13 +42,14 @@ namespace BreCalClient
public ShipApi? ShipApi { get; set; }
+ public bool IsCreate { get; set; } = false;
+
#endregion
#region Event handler
private void Window_Loaded(object sender, RoutedEventArgs e)
- {
- this.comboBoxAgency.ItemsSource = BreCalLists.Participants_Agent;
+ {
this.comboBoxShip.ItemsSource = BreCalLists.Ships;
Array types = Enum.GetValues(typeof(ShipcallType));
@@ -59,10 +61,8 @@ namespace BreCalClient
else first = false;
}
- this.comboBoxArrivalBerth.ItemsSource = BreCalLists.Berths;
- this.comboBoxDepartureBerth.ItemsSource = BreCalLists.Berths;
-
this.comboBoxTimeRef.ItemsSource = BreCalLists.TimeRefs;
+ this.comboBoxHarbour.ItemsSource = BreCalLists.Ports.Where(x => App.Participant.Ports.Contains(x.Id));
this.integerUpDownShiftingCount.Value = this.ShipcallModel.ShiftSequence;
@@ -86,21 +86,21 @@ namespace BreCalClient
}
private void comboBoxShip_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
+ {
if (this.comboBoxShip.SelectedItem != null)
{
ShipModel? ship = this.comboBoxShip.SelectedItem as ShipModel;
this.integerUpDownIMO.Value = ship?.Ship.Imo;
this.textBoxCallsign.Text = ship?.Ship.Callsign;
this.doubleUpDownLength.Value = ship?.Ship.Length;
- this.doubleUpDownWidth.Value = ship?.Ship.Width;
+ this.doubleUpDownWidth.Value = ship?.Ship.Width;
}
else
{
this.integerUpDownIMO.Value = null;
this.textBoxCallsign.Text = string.Empty;
this.doubleUpDownLength.Value = null;
- this.doubleUpDownWidth.Value = null;
+ this.doubleUpDownWidth.Value = null;
}
this.CheckForCompletion();
}
@@ -118,7 +118,7 @@ namespace BreCalClient
{
switch (type)
{
- case ShipcallType.Arrival:
+ case ShipcallType.Arrival:
this.datePickerETD.Visibility = Visibility.Hidden;
this.labelETD.Visibility = Visibility.Hidden;
this.datePickerETA.Visibility = Visibility.Visible;
@@ -175,7 +175,7 @@ namespace BreCalClient
this.comboBoxAgency.SelectedIndex = -1;
this.ShipcallModel.AssignedParticipants.Remove(Extensions.ParticipantType.AGENCY);
}
-
+
#endregion
#region private methods
@@ -188,10 +188,13 @@ namespace BreCalClient
void CheckForCompletion()
{
+ if (this.ShipcallModel.Shipcall?.Canceled ?? false) return; // Cancelled shipcall never clicks ok
+
bool isEnabled = true;
isEnabled &= this.comboBoxShip.SelectedItem != null;
isEnabled &= this.comboBoxCategories.SelectedItem != null;
+ isEnabled &= this.comboBoxHarbour.SelectedItem != null;
if (comboBoxCategories.SelectedItem == null)
{
@@ -207,7 +210,7 @@ namespace BreCalClient
isEnabled &= this.datePickerETD.Value.HasValue;
isEnabled &= !(this.datePickerETD.Value.IsTooOld() && this.datePickerETD.Value != this.ShipcallModel.Shipcall?.Etd);
isEnabled &= !this.datePickerETD.Value.IsTooFar();
- break;
+ break;
case ShipcallType.Arrival:
isEnabled &= this.comboBoxArrivalBerth.SelectedItem != null;
isEnabled &= this.datePickerETA.Value.HasValue;
@@ -227,7 +230,7 @@ namespace BreCalClient
break;
}
}
-
+
isEnabled &= this.comboBoxAgency.SelectedItem != null;
this.buttonOK.IsEnabled = isEnabled;
@@ -249,7 +252,7 @@ namespace BreCalClient
{
this.ShipcallModel.Shipcall.ArrivalBerthId = (this.comboBoxArrivalBerth.SelectedItem != null) ? ((Berth)this.comboBoxArrivalBerth.SelectedItem).Id : null;
this.ShipcallModel.Shipcall.DepartureBerthId = (this.comboBoxDepartureBerth.SelectedItem != null) ? ((Berth)this.comboBoxDepartureBerth.SelectedItem).Id : null;
- }
+ }
else // shifting
{
this.ShipcallModel.Shipcall.DepartureBerthId = (this.comboBoxArrivalBerth.SelectedItem != null) ? ((Berth)this.comboBoxArrivalBerth.SelectedItem).Id : null;
@@ -264,11 +267,11 @@ namespace BreCalClient
ParticipantAssignment pa = new()
{
ParticipantId = participant.Id,
-
+
Type = (int)Extensions.ParticipantType.AGENCY
};
this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.AGENCY] = pa;
- }
+ }
else
{
// AGENCY was set before and now is set to nothing
@@ -309,7 +312,7 @@ namespace BreCalClient
// set the time reference value (which point do all times refer to?)
this.ShipcallModel.Shipcall.TimeRefPoint = this.comboBoxTimeRef.SelectedIndex;
-
+ this.ShipcallModel.Shipcall.PortId = ((Port) this.comboBoxHarbour.SelectedItem).Id;
}
}
@@ -321,8 +324,8 @@ namespace BreCalClient
this.comboBoxTimeRef.SelectedIndex = this.ShipcallModel.Shipcall.TimeRefPoint ?? 1;
this.comboBoxCategories.SelectedItem = new EnumToStringConverter().Convert(this.ShipcallModel.Shipcall.Type, typeof(ShipcallType), new object(), System.Globalization.CultureInfo.CurrentCulture);
if (this.ShipcallModel.Shipcall.Eta != DateTime.MinValue)
- this.datePickerETA.Value = this.ShipcallModel.Shipcall.Eta;
- // this.textBoxVoyage.Text = this.ShipcallModel.Shipcall.Voyage;
+ this.datePickerETA.Value = this.ShipcallModel.Shipcall.Eta;
+
this.datePickerETD.Value = this.ShipcallModel.Shipcall.Etd;
if (BreCalLists.Ships.Find(x => x.Ship.Id == this.ShipcallModel.Shipcall.ShipId) != null)
{
@@ -333,6 +336,16 @@ namespace BreCalClient
}
this.checkBoxCancelled.IsChecked = this.ShipcallModel.Shipcall.Canceled ?? false;
+ if (BreCalLists.PortLookupDict.ContainsKey(this.ShipcallModel.Shipcall.PortId))
+ this.comboBoxHarbour.SelectedValue = this.ShipcallModel.Shipcall.PortId;
+ List availableBerths = BreCalLists.GetBerthsByPort(this.ShipcallModel.Shipcall.PortId);
+ this.comboBoxArrivalBerth.ItemsSource = availableBerths;
+ this.comboBoxDepartureBerth.ItemsSource = availableBerths;
+
+ // Filter agency combobox by port
+ List availableAgencies = BreCalLists.GetParticipants(this.ShipcallModel.Shipcall.PortId, ParticipantType.AGENCY);
+ this.comboBoxAgency.ItemsSource = availableAgencies;
+
if (this.ShipcallModel.Shipcall.Type != ShipcallType.Shifting) // incoming, outgoing
{
this.comboBoxArrivalBerth.SelectedValue = this.ShipcallModel.Shipcall.ArrivalBerthId;
@@ -345,14 +358,18 @@ namespace BreCalClient
}
if (this.ShipcallModel.Shipcall.Participants == null) this.ShipcallModel.Shipcall.Participants = new();
-
+
if(this.ShipcallModel.AssignedParticipants.ContainsKey(ParticipantType.AGENCY))
{
if (BreCalLists.ParticipantLookupDict.ContainsKey(this.ShipcallModel.AssignedParticipants[ParticipantType.AGENCY].ParticipantId))
{
this.comboBoxAgency.SelectedValue = this.ShipcallModel.AssignedParticipants[ParticipantType.AGENCY].ParticipantId;
}
- }
+ }
+
+ this.comboBoxHarbour.SelectionChanged += this.comboBoxHarbour_SelectionChanged;
+
+ this.comboBoxHarbour.IsEnabled = this.ShipcallModel.AllowPortChange;
}
}
@@ -363,6 +380,8 @@ namespace BreCalClient
bool editRightGrantedForBSMD = false;
+ if (this.ShipcallModel.Shipcall?.Canceled ?? false) return; // do not allow edit on canceled shipcall
+
// Special case: Selected Agency allows BSMD to edit their fields
if (this.comboBoxAgency.SelectedIndex >= 0)
{
@@ -386,6 +405,7 @@ namespace BreCalClient
this.datePickerETD.IsEnabled = isAgency || isBsmd;
this.labelBSMDGranted.Visibility = editRightGrantedForBSMD ? Visibility.Visible : Visibility.Hidden;
+ this.comboBoxHarbour.IsEnabled = this.IsCreate && this.ShipcallModel.AllowPortChange;
this.comboBoxCategories_SelectionChanged(null, null);
}
@@ -412,7 +432,7 @@ namespace BreCalClient
private void comboBoxDepartureBerth_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
this.CheckForCompletion();
- }
+ }
private void buttonEditShips_Click(object sender, RoutedEventArgs e)
{
@@ -420,7 +440,7 @@ namespace BreCalClient
{
ShipApi = this.ShipApi
};
-
+
shipListDialog.ShowDialog();
// reload combobox
@@ -428,6 +448,24 @@ namespace BreCalClient
this.comboBoxShip.ItemsSource = BreCalLists.Ships;
}
+ private void comboBoxHarbour_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ Port port = (Port)this.comboBoxHarbour.SelectedItem;
+ if (port == null) return;
+
+ // Filter berth selection combobox by port
+ List availableBerths = BreCalLists.GetBerthsByPort(port.Id);
+ this.comboBoxArrivalBerth.ItemsSource = null;
+ this.comboBoxArrivalBerth.ItemsSource = availableBerths;
+ this.comboBoxDepartureBerth.ItemsSource = null;
+ this.comboBoxDepartureBerth.ItemsSource = availableBerths;
+
+ // Filter agency combobox by port
+ List availableAgencies = BreCalLists.GetParticipants(port.Id, ParticipantType.AGENCY);
+ this.comboBoxAgency.ItemsSource = null;
+ this.comboBoxAgency.ItemsSource = availableAgencies;
+ }
+
#endregion
}
diff --git a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs
index e3ef1c1..4362f2c 100644
--- a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs
+++ b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs
@@ -1,6 +1,6 @@
// Copyright (c) 2023 schick Informatik
// Description: Input control for incoming shipcalls
-//
+//
using BreCalClient.misc.Model;
using System;
@@ -33,7 +33,7 @@ namespace BreCalClient
public ShipcallControlModel ShipcallModel { get; set; } = new();
- public Times Times { get; set; } = new();
+ public Times Times { get; set; } = new();
#endregion
@@ -41,19 +41,27 @@ namespace BreCalClient
private void Window_Loaded(object sender, RoutedEventArgs e)
{
- this.comboBoxMooring.ItemsSource = BreCalLists.Participants_Mooring;
- this.comboBoxPilot.ItemsSource = BreCalLists.Participants_Pilot;
- this.comboBoxTug.ItemsSource = BreCalLists.Participants_Tug;
- this.comboBoxTerminal.ItemsSource = BreCalLists.Participants_Terminal;
- this.comboBoxArrivalBerth.ItemsSource = BreCalLists.Berths;
+ if ((this.ShipcallModel != null) && (this.ShipcallModel.Shipcall != null))
+ {
+ int portId = this.ShipcallModel.Shipcall.PortId;
+ this.comboBoxArrivalBerth.ItemsSource = BreCalLists.GetBerthsByPort(portId);
+ this.comboBoxMooring.ItemsSource = BreCalLists.GetParticipants(portId, ParticipantType.MOORING);
+ this.comboBoxPilot.ItemsSource = BreCalLists.GetParticipants(portId, ParticipantType.PILOT);
+ this.comboBoxTug.ItemsSource = BreCalLists.GetParticipants(portId, ParticipantType.TUG);
+ this.comboBoxTerminal.ItemsSource = BreCalLists.GetParticipants(portId, ParticipantType.TERMINAL);
+ }
+
this.CopyToControls();
-
- this.Title = this.ShipcallModel.Title;
+
+ this.Title = this.ShipcallModel?.Title;
Participant? p = null;
- if(this.ShipcallModel.AssignedParticipants.ContainsKey(ParticipantType.AGENCY))
- p = BreCalLists.Participants.Find(x => x.Id == this.ShipcallModel.AssignedParticipants[ParticipantType.AGENCY].ParticipantId);
+ if (this.ShipcallModel != null)
+ {
+ if (this.ShipcallModel.AssignedParticipants.ContainsKey(ParticipantType.AGENCY))
+ p = BreCalLists.Participants.Find(x => x.Id == this.ShipcallModel.AssignedParticipants[ParticipantType.AGENCY].ParticipantId);
+ }
bool allowBSMD = false;
if (p != null)
@@ -65,7 +73,7 @@ namespace BreCalClient
(App.Participant.IsTypeFlagSet(ParticipantType.BSMD) && allowBSMD);
this.EnableControls();
-
+
}
private void buttonOK_Click(object sender, RoutedEventArgs e)
@@ -93,7 +101,7 @@ namespace BreCalClient
#region private methods
private bool CheckValues(out string message)
- {
+ {
message = "";
if ((this.datePickerETA.Value != this.Times.EtaBerth) || (this.datePickerETA_End.Value != this.Times.EtaIntervalEnd)) // something has changed
@@ -130,7 +138,7 @@ namespace BreCalClient
message = BreCalClient.Resources.Resources.textTidalBothValues;
return false;
}
- }
+ }
if(this.datePickerETA.Value.IsTooFar() || this.datePickerETA_End.Value.IsTooFar() || this.datePickerTidalWindowFrom.Value.IsTooFar() || this.datePickerTidalWindowTo.Value.IsTooFar())
{
@@ -138,7 +146,8 @@ namespace BreCalClient
return false;
}
- if((this.datePickerETA_End.Value.HasValue && !this.datePickerETA.Value.HasValue) || (this.datePickerTidalWindowTo.Value.HasValue && !this.datePickerTidalWindowFrom.Value.HasValue))
+ if((this.datePickerETA_End.Value.HasValue && !this.datePickerETA.Value.HasValue) ||
+ (this.datePickerTidalWindowTo.Value.HasValue && !this.datePickerTidalWindowFrom.Value.HasValue))
{
message = BreCalClient.Resources.Resources.textStartTimeMissing;
return false;
@@ -153,7 +162,7 @@ namespace BreCalClient
{
this.Times.EtaBerth = this.datePickerETA.Value;
this.Times.EtaIntervalEnd = this.datePickerETA_End.Value;
-
+
if (this.comboBoxPierside.SelectedIndex >= 0)
{
this.ShipcallModel.Shipcall.PierSide = (this.comboBoxPierside.SelectedIndex == 0);
@@ -163,8 +172,8 @@ namespace BreCalClient
this.ShipcallModel.Shipcall.PierSide = null;
}
- this.Times.BerthInfo = this.textBoxBerthRemarks.Text.Trim();
- this.Times.BerthId = (int?)this.comboBoxArrivalBerth.SelectedValue;
+ this.Times.BerthInfo = this.textBoxBerthRemarks.Text.Trim();
+ this.Times.BerthId = (int?)this.comboBoxArrivalBerth.SelectedValue;
this.ShipcallModel.Shipcall.Draft = (float?)this.doubleUpDownDraft.Value;
this.ShipcallModel.Shipcall.TidalWindowFrom = this.datePickerTidalWindowFrom.Value;
@@ -172,9 +181,9 @@ namespace BreCalClient
this.ShipcallModel.Shipcall.Canceled = this.checkBoxCanceled.IsChecked;
this.ShipcallModel.Shipcall.Anchored = this.checkBoxAnchored.IsChecked;
-
+
this.ShipcallModel.Shipcall.RecommendedTugs = this.integerUpDownRecommendedTugs.Value;
-
+
this.ShipcallModel.Shipcall.MooredLock = this.checkBoxMooredLock.IsChecked;
this.ShipcallModel.Shipcall.Bunkering = this.checkBoxBunkering.IsChecked;
this.ShipcallModel.Shipcall.ReplenishingTerminal = this.checkBoxReplenishingTerminal.IsChecked;
@@ -186,7 +195,7 @@ namespace BreCalClient
Participant? participant = (Participant?)this.comboBoxMooring.SelectedItem;
if (participant != null)
{
- ParticipantAssignment participantAssignment = new() {
+ ParticipantAssignment participantAssignment = new() {
ParticipantId = participant.Id,
Type = (int)Extensions.ParticipantType.MOORING
};
@@ -234,14 +243,14 @@ namespace BreCalClient
if(this.Times.EtaBerth.HasValue)
{
this.datePickerETA.Value = this.Times.EtaBerth.Value;
- }
+ }
else
{
// if not set through times use value of BSMD entry
if (this.ShipcallModel.Shipcall.Eta != DateTime.MinValue)
this.datePickerETA.Value = this.ShipcallModel.Shipcall.Eta;
}
-
+
this.datePickerETA_End.Value = this.Times.EtaIntervalEnd;
if (Times.BerthId.HasValue)
@@ -261,12 +270,12 @@ namespace BreCalClient
this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled ?? false;
this.checkBoxAnchored.IsChecked = this.ShipcallModel.Shipcall.Anchored ?? false;
-
+
this.integerUpDownRecommendedTugs.Value = this.ShipcallModel.Shipcall.RecommendedTugs;
-
-
+
+
this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock ?? false;
-
+
this.checkBoxBunkering.IsChecked = this.ShipcallModel.Shipcall.Bunkering ?? false;
this.checkBoxReplenishingLock.IsChecked = this.ShipcallModel.Shipcall.ReplenishingLock ?? false;
this.checkBoxReplenishingTerminal.IsChecked = this.ShipcallModel.Shipcall.ReplenishingTerminal ?? false;
@@ -276,7 +285,7 @@ namespace BreCalClient
else
this.labelETA.Content = string.Format("ETA {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall.TimeRefPoint ?? 0]);
- if(!string.IsNullOrEmpty(this.Times.Remarks))
+ if(!string.IsNullOrEmpty(this.Times.Remarks))
this.textBoxRemarks.Text = this.Times.Remarks;
if (this.ShipcallModel.AssignedParticipants.ContainsKey(ParticipantType.MOORING))
@@ -309,8 +318,8 @@ namespace BreCalClient
{
this.comboBoxTug.SelectedValue = this.ShipcallModel.AssignedParticipants[ParticipantType.TUG].ParticipantId;
}
- }
-
+ }
+
}
}
@@ -327,10 +336,10 @@ namespace BreCalClient
this.checkBoxCanceled.IsEnabled = _editing;
this.checkBoxAnchored.IsEnabled = _editing;
-
+
this.comboBoxTug.IsEnabled = _editing;
this.integerUpDownRecommendedTugs.IsEnabled = _editing;
-
+
this.comboBoxPilot.IsEnabled = _editing;
this.comboBoxMooring.IsEnabled = _editing;
this.checkBoxMooredLock.IsEnabled = _editing;
@@ -357,7 +366,7 @@ namespace BreCalClient
private void CheckOKButton()
{
- this.buttonOK.IsEnabled = _editing && RequiredFieldsSet();
+ this.buttonOK.IsEnabled = _editing && RequiredFieldsSet() && !(this.ShipcallModel.Shipcall?.Canceled ?? false);
}
#endregion
@@ -392,17 +401,17 @@ namespace BreCalClient
{
this.comboBoxTerminal.SelectedIndex = -1;
this.ShipcallModel.AssignedParticipants.Remove(Extensions.ParticipantType.TERMINAL);
- }
+ }
private void contextMenuItemClearPierside_Click(object sender, RoutedEventArgs e)
{
this.comboBoxPierside.SelectedIndex = -1;
- }
+ }
private void doubleUpDownDraft_ValueChanged(object sender, RoutedPropertyChangedEventArgs