From 5459d9909876dd76c4cf833276efb5b0fe2ccccf Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Fri, 15 Dec 2023 15:57:12 +0100 Subject: [PATCH] Improved OpenAPI doc in Stoplight, but still issues with ParticipantType and nullable Types. The client code does not compile. --- misc/BreCalApi.cs | 2686 ++++++++++++++++++++++++++----------------- misc/BreCalApi.yaml | 1743 ++++++++++++++-------------- 2 files changed, 2501 insertions(+), 1928 deletions(-) diff --git a/misc/BreCalApi.cs b/misc/BreCalApi.cs index 8d04cf3..d153dad 100644 --- a/misc/BreCalApi.cs +++ b/misc/BreCalApi.cs @@ -1,7 +1,7 @@ //---------------------- // -// Generated REST API Client Code Generator v1.9.1.0 on 15.12.2023 13:07:51 +// Generated REST API Client Code Generator v1.9.1.0 on 15.12.2023 15:53:58 // Using the tool OpenAPI Generator v7.1.0 // //---------------------- @@ -57,88 +57,59 @@ namespace BreCalClient.misc.Api /// /// Represents a collection of functions to interact with the API endpoints /// - public interface IDefaultApiSync : IApiAccessor + public interface IShipcallApiSync : IApiAccessor { #region Synchronous Operations /// - /// Gets a list of all berths registered - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// List<Berth> - List BerthsGet(int operationIndex = 0); - /// - /// Gets a list of all berths registered + /// Create a new ship call /// /// - /// + /// A new shipcall is created without times at this point. This is ususally done by the BSMD or a participant with that particular role. /// /// Thrown when fails to make API call + /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. - /// ApiResponse of List<Berth> - ApiResponse> BerthsGetWithHttpInfo(int operationIndex = 0); + /// Id + Id ShipcallCreate(Shipcall shipcall, int operationIndex = 0); /// - /// Returns a JWT session token and user data if successful - /// - /// Thrown when fails to make API call - /// Login credentials - /// Index associated with the operation. - /// LoginResult - LoginResult LoginPost(Credentials credentials, int operationIndex = 0); - /// - /// Returns a JWT session token and user data if successful + /// Create a new ship call /// /// - /// + /// A new shipcall is created without times at this point. This is ususally done by the BSMD or a participant with that particular role. /// /// Thrown when fails to make API call - /// Login credentials + /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. - /// ApiResponse of LoginResult - ApiResponse LoginPostWithHttpInfo(Credentials credentials, int operationIndex = 0); + /// ApiResponse of Id + ApiResponse ShipcallCreateWithHttpInfo(Shipcall shipcall, int operationIndex = 0); /// - /// Gets a list of notifications pursuant to a specified participant and ship call - /// - /// Thrown when fails to make API call - /// **Id of participant**. *Example: 2*. Id returned through loading of participant - /// **Id of ship call**. *Example: 52*. Id given in ship call list - /// Index associated with the operation. - /// Notification - Notification NotificationsGet(int participantId, int shipcallId, int operationIndex = 0); - /// - /// Gets a list of notifications pursuant to a specified participant and ship call + /// Updates a ship call /// /// - /// + /// Updates a shipcall. Usually done if the participant assignments change. /// /// Thrown when fails to make API call - /// **Id of participant**. *Example: 2*. Id returned through loading of participant - /// **Id of ship call**. *Example: 52*. Id given in ship call list + /// Creates a new ship call. The id parameter is **required**. /// Index associated with the operation. - /// ApiResponse of Notification - ApiResponse NotificationsGetWithHttpInfo(int participantId, int shipcallId, int operationIndex = 0); + /// Id + Id ShipcallUpdate(Shipcall shipcall, int operationIndex = 0); /// - /// gets a particular participant entry corresponding to user id - /// - /// Thrown when fails to make API call - /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) - /// Index associated with the operation. - /// List<Participant> - List ParticipantsGet(int? userId = default(int?), int operationIndex = 0); - /// - /// gets a particular participant entry corresponding to user id + /// Updates a ship call /// /// - /// + /// Updates a shipcall. Usually done if the participant assignments change. /// /// Thrown when fails to make API call - /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) + /// Creates a new ship call. The id parameter is **required**. /// Index associated with the operation. - /// ApiResponse of List<Participant> - ApiResponse> ParticipantsGetWithHttpInfo(int? userId = default(int?), int operationIndex = 0); + /// ApiResponse of Id + ApiResponse ShipcallUpdateWithHttpInfo(Shipcall shipcall, int operationIndex = 0); /// /// Gets a list of ship calls /// + /// + /// Get current ship calls + /// /// Thrown when fails to make API call /// number of days in the past to include in the result. *Example: 7*. (optional) /// Index associated with the operation. @@ -148,272 +119,74 @@ namespace BreCalClient.misc.Api /// Gets a list of ship calls /// /// - /// + /// Get current ship calls /// /// Thrown when fails to make API call /// number of days in the past to include in the result. *Example: 7*. (optional) /// Index associated with the operation. /// ApiResponse of List<Shipcall> ApiResponse> ShipcallsGetWithHttpInfo(int? pastDays = default(int?), int operationIndex = 0); - /// - /// Create a new ship call - /// - /// Thrown when fails to make API call - /// Creates a new ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// Id - Id ShipcallsPost(Shipcall shipcall, int operationIndex = 0); - /// - /// Create a new ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Creates a new ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// ApiResponse of Id - ApiResponse ShipcallsPostWithHttpInfo(Shipcall shipcall, int operationIndex = 0); - /// - /// Updates a ship call - /// - /// Thrown when fails to make API call - /// Creates a new ship call. The id parameter is **required**. - /// Index associated with the operation. - /// Id - Id ShipcallsPut(Shipcall shipcall, int operationIndex = 0); - /// - /// Updates a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Creates a new ship call. The id parameter is **required**. - /// Index associated with the operation. - /// ApiResponse of Id - ApiResponse ShipcallsPutWithHttpInfo(Shipcall shipcall, int operationIndex = 0); - /// - /// gets a list of registered shipcalls - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// List<Ship> - List ShipsGet(int operationIndex = 0); - /// - /// gets a list of registered shipcalls - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of List<Ship> - ApiResponse> ShipsGetWithHttpInfo(int operationIndex = 0); - /// - /// Delete a times entry for a ship call. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - void TimesDelete(int id, int operationIndex = 0); - /// - /// Delete a times entry for a ship call. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse TimesDeleteWithHttpInfo(int id, int operationIndex = 0); - /// - /// Get all recorded times for a a ship call - /// - /// Thrown when fails to make API call - /// **Id**. *Example: 42*. Id of referenced ship call. (optional) - /// Index associated with the operation. - /// List<Times> - List TimesGet(int? shipcallId = default(int?), int operationIndex = 0); - /// - /// Get all recorded times for a a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// **Id**. *Example: 42*. Id of referenced ship call. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Times> - ApiResponse> TimesGetWithHttpInfo(int? shipcallId = default(int?), int operationIndex = 0); - /// - /// Create a new times entry for a ship call - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// Id - Id TimesPost(Times times, int operationIndex = 0); - /// - /// Create a new times entry for a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// ApiResponse of Id - ApiResponse TimesPostWithHttpInfo(Times times, int operationIndex = 0); - /// - /// Update a times entry for a ship call - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. The id parameter is **required**. - /// Index associated with the operation. - /// Id - Id TimesPut(Times times, int operationIndex = 0); - /// - /// Update a times entry for a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. The id parameter is **required**. - /// Index associated with the operation. - /// ApiResponse of Id - ApiResponse TimesPutWithHttpInfo(Times times, int operationIndex = 0); - /// - /// Update user details (first/last name, phone, password) - /// - /// Thrown when fails to make API call - /// User details - /// Index associated with the operation. - /// - void UserPut(UserDetails userDetails, int operationIndex = 0); - /// - /// Update user details (first/last name, phone, password) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// User details - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse UserPutWithHttpInfo(UserDetails userDetails, int operationIndex = 0); #endregion Synchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// - public interface IDefaultApiAsync : IApiAccessor + public interface IShipcallApiAsync : IApiAccessor { #region Asynchronous Operations /// - /// Gets a list of all berths registered + /// Create a new ship call /// /// - /// + /// A new shipcall is created without times at this point. This is ususally done by the BSMD or a participant with that particular role. /// /// Thrown when fails to make API call + /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of List<Berth> - System.Threading.Tasks.Task> BerthsGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of Id + System.Threading.Tasks.Task ShipcallCreateAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a list of all berths registered + /// Create a new ship call /// /// - /// + /// A new shipcall is created without times at this point. This is ususally done by the BSMD or a participant with that particular role. /// /// Thrown when fails to make API call + /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Berth>) - System.Threading.Tasks.Task>> BerthsGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (Id) + System.Threading.Tasks.Task> ShipcallCreateWithHttpInfoAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Returns a JWT session token and user data if successful + /// Updates a ship call /// /// - /// + /// Updates a shipcall. Usually done if the participant assignments change. /// /// Thrown when fails to make API call - /// Login credentials + /// Creates a new ship call. The id parameter is **required**. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of LoginResult - System.Threading.Tasks.Task LoginPostAsync(Credentials credentials, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of Id + System.Threading.Tasks.Task ShipcallUpdateAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Returns a JWT session token and user data if successful + /// Updates a ship call /// /// - /// + /// Updates a shipcall. Usually done if the participant assignments change. /// /// Thrown when fails to make API call - /// Login credentials + /// Creates a new ship call. The id parameter is **required**. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LoginResult) - System.Threading.Tasks.Task> LoginPostWithHttpInfoAsync(Credentials credentials, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Gets a list of notifications pursuant to a specified participant and ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// **Id of participant**. *Example: 2*. Id returned through loading of participant - /// **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 participantId, int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Gets a list of notifications pursuant to a specified participant and ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// **Id of participant**. *Example: 2*. Id returned through loading of participant - /// **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 participantId, int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// gets a particular participant entry corresponding to user id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Participant> - System.Threading.Tasks.Task> ParticipantsGetAsync(int? userId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// gets a particular participant entry corresponding to user id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Participant>) - System.Threading.Tasks.Task>> ParticipantsGetWithHttpInfoAsync(int? userId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (Id) + System.Threading.Tasks.Task> ShipcallUpdateWithHttpInfoAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Gets a list of ship calls /// /// - /// + /// Get current ship calls /// /// Thrown when fails to make API call /// number of days in the past to include in the result. *Example: 7*. (optional) @@ -425,7 +198,7 @@ namespace BreCalClient.misc.Api /// Gets a list of ship calls /// /// - /// + /// Get current ship calls /// /// Thrown when fails to make API call /// number of days in the past to include in the result. *Example: 7*. (optional) @@ -433,222 +206,32 @@ namespace BreCalClient.misc.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Shipcall>) System.Threading.Tasks.Task>> ShipcallsGetWithHttpInfoAsync(int? pastDays = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Create a new ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Creates a new ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Id - System.Threading.Tasks.Task ShipcallsPostAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Create a new ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Creates a new ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Id) - System.Threading.Tasks.Task> ShipcallsPostWithHttpInfoAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Updates a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Creates a new ship call. The id parameter is **required**. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Id - System.Threading.Tasks.Task ShipcallsPutAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Updates a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Creates a new ship call. The id parameter is **required**. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Id) - System.Threading.Tasks.Task> ShipcallsPutWithHttpInfoAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// gets a list of registered shipcalls - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Ship> - System.Threading.Tasks.Task> ShipsGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// gets a list of registered shipcalls - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Ship>) - System.Threading.Tasks.Task>> ShipsGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete a times entry for a ship call. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task TimesDeleteAsync(int id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete a times entry for a ship call. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> TimesDeleteWithHttpInfoAsync(int id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get all recorded times for a a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// **Id**. *Example: 42*. Id of referenced ship call. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Times> - System.Threading.Tasks.Task> TimesGetAsync(int? shipcallId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get all recorded times for a a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// **Id**. *Example: 42*. Id of referenced ship call. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Times>) - System.Threading.Tasks.Task>> TimesGetWithHttpInfoAsync(int? shipcallId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Create a new times entry for a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Id - System.Threading.Tasks.Task TimesPostAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Create a new times entry for a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Id) - System.Threading.Tasks.Task> TimesPostWithHttpInfoAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update a times entry for a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. The id parameter is **required**. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Id - System.Threading.Tasks.Task TimesPutAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update a times entry for a ship call - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. The id parameter is **required**. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Id) - System.Threading.Tasks.Task> TimesPutWithHttpInfoAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update user details (first/last name, phone, password) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// User details - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task UserPutAsync(UserDetails userDetails, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update user details (first/last name, phone, password) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// User details - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> UserPutWithHttpInfoAsync(UserDetails userDetails, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// - public interface IDefaultApi : IDefaultApiSync, IDefaultApiAsync + public interface IShipcallApi : IShipcallApiSync, IShipcallApiAsync { } /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class DefaultApi : IDefaultApi + public partial class ShipcallApi : IShipcallApi { private BreCalClient.misc.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// - public DefaultApi() : this((string)null) + public ShipcallApi() : this((string)null) { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// - public DefaultApi(string basePath) + public ShipcallApi(string basePath) { this.Configuration = BreCalClient.misc.Client.Configuration.MergeConfigurations( BreCalClient.misc.Client.GlobalConfiguration.Instance, @@ -659,12 +242,12 @@ namespace BreCalClient.misc.Api this.ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; } /// - /// Initializes a new instance of the class + /// Initializes a new instance of the class /// using Configuration object /// /// An instance of Configuration /// - public DefaultApi(BreCalClient.misc.Client.Configuration configuration) + public ShipcallApi(BreCalClient.misc.Client.Configuration configuration) { if (configuration == null) throw new ArgumentNullException("configuration"); this.Configuration = BreCalClient.misc.Client.Configuration.MergeConfigurations( @@ -676,13 +259,13 @@ namespace BreCalClient.misc.Api ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; } /// - /// Initializes a new instance of the class + /// Initializes a new instance of the class /// using a Configuration object and client instance. /// /// The client interface for synchronous API access. /// The client interface for asynchronous API access. /// The configuration object. - public DefaultApi(BreCalClient.misc.Client.ISynchronousClient client, BreCalClient.misc.Client.IAsynchronousClient asyncClient, BreCalClient.misc.Client.IReadableConfiguration configuration) + public ShipcallApi(BreCalClient.misc.Client.ISynchronousClient client, BreCalClient.misc.Client.IAsynchronousClient asyncClient, BreCalClient.misc.Client.IReadableConfiguration configuration) { if (client == null) throw new ArgumentNullException("client"); if (asyncClient == null) throw new ArgumentNullException("asyncClient"); @@ -729,142 +312,30 @@ namespace BreCalClient.misc.Api set { _exceptionFactory = value; } } /// - /// Gets a list of all berths registered + /// Create a new ship call A new shipcall is created without times at this point. This is ususally done by the BSMD or a participant with that particular role. /// /// Thrown when fails to make API call + /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. - /// List<Berth> - public List BerthsGet(int operationIndex = 0) + /// Id + public Id ShipcallCreate(Shipcall shipcall, int operationIndex = 0) { - BreCalClient.misc.Client.ApiResponse> localVarResponse = BerthsGetWithHttpInfo(); + BreCalClient.misc.Client.ApiResponse localVarResponse = ShipcallCreateWithHttpInfo(shipcall); return localVarResponse.Data; } /// - /// Gets a list of all berths registered + /// Create a new ship call A new shipcall is created without times at this point. This is ususally done by the BSMD or a participant with that particular role. /// /// Thrown when fails to make API call + /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. - /// ApiResponse of List<Berth> - public BreCalClient.misc.Client.ApiResponse> BerthsGetWithHttpInfo(int operationIndex = 0) + /// ApiResponse of Id + public BreCalClient.misc.Client.ApiResponse ShipcallCreateWithHttpInfo(Shipcall shipcall, 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) + // verify the required parameter 'shipcall' is set + if (shipcall == 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 = "DefaultApi.BerthsGet"; - 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>("/berths", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("BerthsGet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - return localVarResponse; - } - /// - /// Gets a list of all berths registered - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Berth> - public async System.Threading.Tasks.Task> BerthsGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - BreCalClient.misc.Client.ApiResponse> localVarResponse = await BerthsGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - /// - /// Gets a list of all berths registered - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Berth>) - public async System.Threading.Tasks.Task>> BerthsGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; - // 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 = "DefaultApi.BerthsGet"; - 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>("/berths", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("BerthsGet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - return localVarResponse; - } - /// - /// Returns a JWT session token and user data if successful - /// - /// Thrown when fails to make API call - /// Login credentials - /// Index associated with the operation. - /// LoginResult - public LoginResult LoginPost(Credentials credentials, int operationIndex = 0) - { - BreCalClient.misc.Client.ApiResponse localVarResponse = LoginPostWithHttpInfo(credentials); - return localVarResponse.Data; - } - /// - /// Returns a JWT session token and user data if successful - /// - /// Thrown when fails to make API call - /// Login credentials - /// Index associated with the operation. - /// ApiResponse of LoginResult - public BreCalClient.misc.Client.ApiResponse LoginPostWithHttpInfo(Credentials credentials, int operationIndex = 0) - { - // verify the required parameter 'credentials' is set - if (credentials == null) - { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'credentials' when calling DefaultApi->LoginPost"); + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'shipcall' when calling ShipcallApi->ShipcallCreate"); } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -884,8 +355,8 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = credentials; - localVarRequestOptions.Operation = "DefaultApi.LoginPost"; + localVarRequestOptions.Data = shipcall; + localVarRequestOptions.Operation = "ShipcallApi.ShipcallCreate"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -893,10 +364,10 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = this.Client.Post("/login", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/shipcalls", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("LoginPost", localVarResponse); + Exception _exception = this.ExceptionFactory("ShipcallCreate", localVarResponse); if (_exception != null) { throw _exception; @@ -905,32 +376,32 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Returns a JWT session token and user data if successful + /// Create a new ship call A new shipcall is created without times at this point. This is ususally done by the BSMD or a participant with that particular role. /// /// Thrown when fails to make API call - /// Login credentials + /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of LoginResult - public async System.Threading.Tasks.Task LoginPostAsync(Credentials credentials, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of Id + public async System.Threading.Tasks.Task ShipcallCreateAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BreCalClient.misc.Client.ApiResponse localVarResponse = await LoginPostWithHttpInfoAsync(credentials, operationIndex, cancellationToken).ConfigureAwait(false); + BreCalClient.misc.Client.ApiResponse localVarResponse = await ShipcallCreateWithHttpInfoAsync(shipcall, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Returns a JWT session token and user data if successful + /// Create a new ship call A new shipcall is created without times at this point. This is ususally done by the BSMD or a participant with that particular role. /// /// Thrown when fails to make API call - /// Login credentials + /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LoginResult) - public async System.Threading.Tasks.Task> LoginPostWithHttpInfoAsync(Credentials credentials, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (Id) + public async System.Threading.Tasks.Task> ShipcallCreateWithHttpInfoAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'credentials' is set - if (credentials == null) + // verify the required parameter 'shipcall' is set + if (shipcall == null) { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'credentials' when calling DefaultApi->LoginPost"); + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'shipcall' when calling ShipcallApi->ShipcallCreate"); } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -950,8 +421,8 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = credentials; - localVarRequestOptions.Operation = "DefaultApi.LoginPost"; + localVarRequestOptions.Data = shipcall; + localVarRequestOptions.Operation = "ShipcallApi.ShipcallCreate"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -959,10 +430,10 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/shipcalls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("LoginPost", localVarResponse); + Exception _exception = this.ExceptionFactory("ShipcallCreate", localVarResponse); if (_exception != null) { throw _exception; @@ -971,30 +442,34 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Gets a list of notifications pursuant to a specified participant and ship call + /// Updates a ship call Updates a shipcall. Usually done if the participant assignments change. /// /// Thrown when fails to make API call - /// **Id of participant**. *Example: 2*. Id returned through loading of participant - /// **Id of ship call**. *Example: 52*. Id given in ship call list + /// Creates a new ship call. The id parameter is **required**. /// Index associated with the operation. - /// Notification - public Notification NotificationsGet(int participantId, int shipcallId, int operationIndex = 0) + /// Id + public Id ShipcallUpdate(Shipcall shipcall, int operationIndex = 0) { - BreCalClient.misc.Client.ApiResponse localVarResponse = NotificationsGetWithHttpInfo(participantId, shipcallId); + BreCalClient.misc.Client.ApiResponse localVarResponse = ShipcallUpdateWithHttpInfo(shipcall); return localVarResponse.Data; } /// - /// Gets a list of notifications pursuant to a specified participant and ship call + /// Updates a ship call Updates a shipcall. Usually done if the participant assignments change. /// /// Thrown when fails to make API call - /// **Id of participant**. *Example: 2*. Id returned through loading of participant - /// **Id of ship call**. *Example: 52*. Id given in ship call list + /// Creates a new ship call. The id parameter is **required**. /// Index associated with the operation. - /// ApiResponse of Notification - public BreCalClient.misc.Client.ApiResponse NotificationsGetWithHttpInfo(int participantId, int shipcallId, int operationIndex = 0) + /// ApiResponse of Id + public BreCalClient.misc.Client.ApiResponse ShipcallUpdateWithHttpInfo(Shipcall shipcall, int operationIndex = 0) { + // verify the required parameter 'shipcall' is set + if (shipcall == null) + { + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'shipcall' when calling ShipcallApi->ShipcallUpdate"); + } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header string[] _accepts = new string[] { @@ -1010,9 +485,8 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "participant_id", participantId)); - localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId)); - localVarRequestOptions.Operation = "DefaultApi.NotificationsGet"; + localVarRequestOptions.Data = shipcall; + localVarRequestOptions.Operation = "ShipcallApi.ShipcallUpdate"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1020,10 +494,10 @@ 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.Put("/shipcalls", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("NotificationsGet", localVarResponse); + Exception _exception = this.ExceptionFactory("ShipcallUpdate", localVarResponse); if (_exception != null) { throw _exception; @@ -1032,32 +506,36 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Gets a list of notifications pursuant to a specified participant and ship call + /// Updates a ship call Updates a shipcall. Usually done if the participant assignments change. /// /// Thrown when fails to make API call - /// **Id of participant**. *Example: 2*. Id returned through loading of participant - /// **Id of ship call**. *Example: 52*. Id given in ship call list + /// Creates a new ship call. The id parameter is **required**. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of Notification - public async System.Threading.Tasks.Task NotificationsGetAsync(int participantId, int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of Id + public async System.Threading.Tasks.Task ShipcallUpdateAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BreCalClient.misc.Client.ApiResponse localVarResponse = await NotificationsGetWithHttpInfoAsync(participantId, shipcallId, operationIndex, cancellationToken).ConfigureAwait(false); + BreCalClient.misc.Client.ApiResponse localVarResponse = await ShipcallUpdateWithHttpInfoAsync(shipcall, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Gets a list of notifications pursuant to a specified participant and ship call + /// Updates a ship call Updates a shipcall. Usually done if the participant assignments change. /// /// Thrown when fails to make API call - /// **Id of participant**. *Example: 2*. Id returned through loading of participant - /// **Id of ship call**. *Example: 52*. Id given in ship call list + /// Creates a new ship call. The id parameter is **required**. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Notification) - public async System.Threading.Tasks.Task> NotificationsGetWithHttpInfoAsync(int participantId, int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (Id) + public async System.Threading.Tasks.Task> ShipcallUpdateWithHttpInfoAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'shipcall' is set + if (shipcall == null) + { + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'shipcall' when calling ShipcallApi->ShipcallUpdate"); + } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header string[] _accepts = new string[] { @@ -1073,9 +551,8 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "participant_id", participantId)); - localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId)); - localVarRequestOptions.Operation = "DefaultApi.NotificationsGet"; + localVarRequestOptions.Data = shipcall; + localVarRequestOptions.Operation = "ShipcallApi.ShipcallUpdate"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1083,10 +560,10 @@ 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.PutAsync("/shipcalls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("NotificationsGet", localVarResponse); + Exception _exception = this.ExceptionFactory("ShipcallUpdate", localVarResponse); if (_exception != null) { throw _exception; @@ -1095,131 +572,7 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// gets a particular participant entry corresponding to user id - /// - /// Thrown when fails to make API call - /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) - /// Index associated with the operation. - /// List<Participant> - public List ParticipantsGet(int? userId = default(int?), int operationIndex = 0) - { - BreCalClient.misc.Client.ApiResponse> localVarResponse = ParticipantsGetWithHttpInfo(userId); - return localVarResponse.Data; - } - /// - /// gets a particular participant entry corresponding to user id - /// - /// Thrown when fails to make API call - /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Participant> - public BreCalClient.misc.Client.ApiResponse> ParticipantsGetWithHttpInfo(int? userId = default(int?), 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); - } - if (userId != null) - { - localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "user_id", userId)); - } - localVarRequestOptions.Operation = "DefaultApi.ParticipantsGet"; - 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>("/participants", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ParticipantsGet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - return localVarResponse; - } - /// - /// gets a particular participant entry corresponding to user id - /// - /// Thrown when fails to make API call - /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Participant> - public async System.Threading.Tasks.Task> ParticipantsGetAsync(int? userId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - BreCalClient.misc.Client.ApiResponse> localVarResponse = await ParticipantsGetWithHttpInfoAsync(userId, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - /// - /// gets a particular participant entry corresponding to user id - /// - /// Thrown when fails to make API call - /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Participant>) - public async System.Threading.Tasks.Task>> ParticipantsGetWithHttpInfoAsync(int? userId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; - // 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); - } - if (userId != null) - { - localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "user_id", userId)); - } - localVarRequestOptions.Operation = "DefaultApi.ParticipantsGet"; - 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>("/participants", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ParticipantsGet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - return localVarResponse; - } - /// - /// Gets a list of ship calls + /// Gets a list of ship calls Get current ship calls /// /// Thrown when fails to make API call /// number of days in the past to include in the result. *Example: 7*. (optional) @@ -1231,7 +584,7 @@ namespace BreCalClient.misc.Api return localVarResponse.Data; } /// - /// Gets a list of ship calls + /// Gets a list of ship calls Get current ship calls /// /// Thrown when fails to make API call /// number of days in the past to include in the result. *Example: 7*. (optional) @@ -1260,7 +613,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "past_days", pastDays)); } - localVarRequestOptions.Operation = "DefaultApi.ShipcallsGet"; + localVarRequestOptions.Operation = "ShipcallApi.ShipcallsGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1280,7 +633,7 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Gets a list of ship calls + /// Gets a list of ship calls Get current ship calls /// /// Thrown when fails to make API call /// number of days in the past to include in the result. *Example: 7*. (optional) @@ -1293,7 +646,7 @@ namespace BreCalClient.misc.Api return localVarResponse.Data; } /// - /// Gets a list of ship calls + /// Gets a list of ship calls Get current ship calls /// /// Thrown when fails to make API call /// number of days in the past to include in the result. *Example: 7*. (optional) @@ -1323,7 +676,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "past_days", pastDays)); } - localVarRequestOptions.Operation = "DefaultApi.ShipcallsGet"; + localVarRequestOptions.Operation = "ShipcallApi.ShipcallsGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1342,35 +695,340 @@ namespace BreCalClient.misc.Api } return localVarResponse; } + } +} + +/* + * Bremen calling API + * + * Administer DEBRE ship calls, times and notifications + * + * The version of the OpenAPI document: 1.1.0 + * Contact: info@textbausteine.net + * Generated by: https://github.com/openapitools/openapi-generator.git + */ +namespace BreCalClient.misc.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IStaticApiSync : IApiAccessor + { + #region Synchronous Operations /// - /// Create a new ship call + /// Gets a list of all berths registered + /// + /// + /// Returns a list of berths, including berths that are (logically) deleted + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<Berth> + List BerthsGet(int operationIndex = 0); + /// + /// Gets a list of all berths registered + /// + /// + /// Returns a list of berths, including berths that are (logically) deleted + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<Berth> + ApiResponse> BerthsGetWithHttpInfo(int operationIndex = 0); + /// + /// Gets a list of notifications pursuant to a specified participant and ship call + /// + /// + /// List of notifications (tbd) + /// + /// Thrown when fails to make API call + /// **Id of participant**. *Example: 2*. Id returned through loading of participant + /// **Id of ship call**. *Example: 52*. Id given in ship call list + /// Index associated with the operation. + /// Notification + Notification NotificationsGet(int participantId, int shipcallId, int operationIndex = 0); + /// + /// Gets a list of notifications pursuant to a specified participant and ship call + /// + /// + /// List of notifications (tbd) + /// + /// Thrown when fails to make API call + /// **Id of participant**. *Example: 2*. Id returned through loading of participant + /// **Id of ship call**. *Example: 52*. Id given in ship call list + /// Index associated with the operation. + /// ApiResponse of Notification + ApiResponse NotificationsGetWithHttpInfo(int participantId, int shipcallId, int operationIndex = 0); + /// + /// gets one or all participants + /// + /// + /// If no parameter is given, all participants are returned. The list can be used to display participant information in the context of ship calls. + /// + /// Thrown when fails to make API call + /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) + /// Index associated with the operation. + /// List<Participant> + List ParticipantsGet(int? userId = default(int?), int operationIndex = 0); + /// + /// gets one or all participants + /// + /// + /// If no parameter is given, all participants are returned. The list can be used to display participant information in the context of ship calls. + /// + /// Thrown when fails to make API call + /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) + /// Index associated with the operation. + /// ApiResponse of List<Participant> + ApiResponse> ParticipantsGetWithHttpInfo(int? userId = default(int?), int operationIndex = 0); + /// + /// gets a list of ships + /// + /// + /// Gets a list of ships including logically deleted ships to be used with shipcalls + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<Ship> + List ShipsGet(int operationIndex = 0); + /// + /// gets a list of ships + /// + /// + /// Gets a list of ships including logically deleted ships to be used with shipcalls + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<Ship> + ApiResponse> ShipsGetWithHttpInfo(int operationIndex = 0); + #endregion Synchronous Operations + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IStaticApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Gets a list of all berths registered + /// + /// + /// Returns a list of berths, including berths that are (logically) deleted + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<Berth> + System.Threading.Tasks.Task> BerthsGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Gets a list of all berths registered + /// + /// + /// Returns a list of berths, including berths that are (logically) deleted + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Berth>) + System.Threading.Tasks.Task>> BerthsGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Gets a list of notifications pursuant to a specified participant and ship call + /// + /// + /// List of notifications (tbd) + /// + /// Thrown when fails to make API call + /// **Id of participant**. *Example: 2*. Id returned through loading of participant + /// **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 participantId, int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Gets a list of notifications pursuant to a specified participant and ship call + /// + /// + /// List of notifications (tbd) + /// + /// Thrown when fails to make API call + /// **Id of participant**. *Example: 2*. Id returned through loading of participant + /// **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 participantId, int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// gets one or all participants + /// + /// + /// If no parameter is given, all participants are returned. The list can be used to display participant information in the context of ship calls. + /// + /// Thrown when fails to make API call + /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<Participant> + System.Threading.Tasks.Task> ParticipantsGetAsync(int? userId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// gets one or all participants + /// + /// + /// If no parameter is given, all participants are returned. The list can be used to display participant information in the context of ship calls. + /// + /// Thrown when fails to make API call + /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Participant>) + System.Threading.Tasks.Task>> ParticipantsGetWithHttpInfoAsync(int? userId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// gets a list of ships + /// + /// + /// Gets a list of ships including logically deleted ships to be used with shipcalls + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<Ship> + System.Threading.Tasks.Task> ShipsGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// gets a list of ships + /// + /// + /// Gets a list of ships including logically deleted ships to be used with shipcalls + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Ship>) + System.Threading.Tasks.Task>> ShipsGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IStaticApi : IStaticApiSync, IStaticApiAsync + { + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class StaticApi : IStaticApi + { + private BreCalClient.misc.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + /// + /// Initializes a new instance of the class. + /// + /// + public StaticApi() : this((string)null) + { + } + /// + /// Initializes a new instance of the class. + /// + /// + public StaticApi(string basePath) + { + this.Configuration = BreCalClient.misc.Client.Configuration.MergeConfigurations( + BreCalClient.misc.Client.GlobalConfiguration.Instance, + new BreCalClient.misc.Client.Configuration { BasePath = basePath } + ); + this.Client = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; + } + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public StaticApi(BreCalClient.misc.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + this.Configuration = BreCalClient.misc.Client.Configuration.MergeConfigurations( + BreCalClient.misc.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; + } + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public StaticApi(BreCalClient.misc.Client.ISynchronousClient client, BreCalClient.misc.Client.IAsynchronousClient asyncClient, BreCalClient.misc.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; + } + /// + /// The client for accessing this underlying API asynchronously. + /// + public BreCalClient.misc.Client.IAsynchronousClient AsynchronousClient { get; set; } + /// + /// The client for accessing this underlying API synchronously. + /// + public BreCalClient.misc.Client.ISynchronousClient Client { get; set; } + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public BreCalClient.misc.Client.IReadableConfiguration Configuration { get; set; } + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public BreCalClient.misc.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + /// + /// Gets a list of all berths registered Returns a list of berths, including berths that are (logically) deleted /// /// Thrown when fails to make API call - /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. - /// Id - public Id ShipcallsPost(Shipcall shipcall, int operationIndex = 0) + /// List<Berth> + public List BerthsGet(int operationIndex = 0) { - BreCalClient.misc.Client.ApiResponse localVarResponse = ShipcallsPostWithHttpInfo(shipcall); + BreCalClient.misc.Client.ApiResponse> localVarResponse = BerthsGetWithHttpInfo(); return localVarResponse.Data; } /// - /// Create a new ship call + /// Gets a list of all berths registered Returns a list of berths, including berths that are (logically) deleted /// /// Thrown when fails to make API call - /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. - /// ApiResponse of Id - public BreCalClient.misc.Client.ApiResponse ShipcallsPostWithHttpInfo(Shipcall shipcall, int operationIndex = 0) + /// ApiResponse of List<Berth> + public BreCalClient.misc.Client.ApiResponse> BerthsGetWithHttpInfo(int operationIndex = 0) { - // verify the required parameter 'shipcall' is set - if (shipcall == null) - { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'shipcall' when calling DefaultApi->ShipcallsPost"); - } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header string[] _accepts = new string[] { @@ -1386,8 +1044,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = shipcall; - localVarRequestOptions.Operation = "DefaultApi.ShipcallsPost"; + localVarRequestOptions.Operation = "StaticApi.BerthsGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1395,10 +1052,10 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = this.Client.Post("/shipcalls", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get>("/berths", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ShipcallsPost", localVarResponse); + Exception _exception = this.ExceptionFactory("BerthsGet", localVarResponse); if (_exception != null) { throw _exception; @@ -1407,36 +1064,28 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Create a new ship call + /// Gets a list of all berths registered Returns a list of berths, including berths that are (logically) deleted /// /// Thrown when fails to make API call - /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of Id - public async System.Threading.Tasks.Task ShipcallsPostAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of List<Berth> + public async System.Threading.Tasks.Task> BerthsGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BreCalClient.misc.Client.ApiResponse localVarResponse = await ShipcallsPostWithHttpInfoAsync(shipcall, operationIndex, cancellationToken).ConfigureAwait(false); + BreCalClient.misc.Client.ApiResponse> localVarResponse = await BerthsGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Create a new ship call + /// Gets a list of all berths registered Returns a list of berths, including berths that are (logically) deleted /// /// Thrown when fails to make API call - /// Creates a new ship call. **Do not** provide id parameter. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Id) - public async System.Threading.Tasks.Task> ShipcallsPostWithHttpInfoAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (List<Berth>) + public async System.Threading.Tasks.Task>> BerthsGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'shipcall' is set - if (shipcall == null) - { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'shipcall' when calling DefaultApi->ShipcallsPost"); - } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header string[] _accepts = new string[] { @@ -1452,8 +1101,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = shipcall; - localVarRequestOptions.Operation = "DefaultApi.ShipcallsPost"; + localVarRequestOptions.Operation = "StaticApi.BerthsGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1461,10 +1109,10 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/shipcalls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/berths", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ShipcallsPost", localVarResponse); + Exception _exception = this.ExceptionFactory("BerthsGet", localVarResponse); if (_exception != null) { throw _exception; @@ -1473,34 +1121,30 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Updates a ship call + /// Gets a list of notifications pursuant to a specified participant and ship call List of notifications (tbd) /// /// Thrown when fails to make API call - /// Creates a new ship call. The id parameter is **required**. + /// **Id of participant**. *Example: 2*. Id returned through loading of participant + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. - /// Id - public Id ShipcallsPut(Shipcall shipcall, int operationIndex = 0) + /// Notification + public Notification NotificationsGet(int participantId, int shipcallId, int operationIndex = 0) { - BreCalClient.misc.Client.ApiResponse localVarResponse = ShipcallsPutWithHttpInfo(shipcall); + BreCalClient.misc.Client.ApiResponse localVarResponse = NotificationsGetWithHttpInfo(participantId, shipcallId); return localVarResponse.Data; } /// - /// Updates a ship call + /// Gets a list of notifications pursuant to a specified participant and ship call List of notifications (tbd) /// /// Thrown when fails to make API call - /// Creates a new ship call. The id parameter is **required**. + /// **Id of participant**. *Example: 2*. Id returned through loading of participant + /// **Id of ship call**. *Example: 52*. Id given in ship call list /// Index associated with the operation. - /// ApiResponse of Id - public BreCalClient.misc.Client.ApiResponse ShipcallsPutWithHttpInfo(Shipcall shipcall, int operationIndex = 0) + /// ApiResponse of Notification + public BreCalClient.misc.Client.ApiResponse NotificationsGetWithHttpInfo(int participantId, int shipcallId, int operationIndex = 0) { - // verify the required parameter 'shipcall' is set - if (shipcall == null) - { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'shipcall' when calling DefaultApi->ShipcallsPut"); - } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header string[] _accepts = new string[] { @@ -1516,8 +1160,9 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = shipcall; - localVarRequestOptions.Operation = "DefaultApi.ShipcallsPut"; + localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "participant_id", participantId)); + localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId)); + localVarRequestOptions.Operation = "StaticApi.NotificationsGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1525,10 +1170,10 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = this.Client.Put("/shipcalls", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/notifications", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ShipcallsPut", localVarResponse); + Exception _exception = this.ExceptionFactory("NotificationsGet", localVarResponse); if (_exception != null) { throw _exception; @@ -1537,36 +1182,32 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Updates a ship call + /// Gets a list of notifications pursuant to a specified participant and ship call List of notifications (tbd) /// /// Thrown when fails to make API call - /// Creates a new ship call. The id parameter is **required**. + /// **Id of participant**. *Example: 2*. Id returned through loading of participant + /// **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 Id - public async System.Threading.Tasks.Task ShipcallsPutAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of Notification + public async System.Threading.Tasks.Task NotificationsGetAsync(int participantId, int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BreCalClient.misc.Client.ApiResponse localVarResponse = await ShipcallsPutWithHttpInfoAsync(shipcall, operationIndex, cancellationToken).ConfigureAwait(false); + BreCalClient.misc.Client.ApiResponse localVarResponse = await NotificationsGetWithHttpInfoAsync(participantId, shipcallId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Updates a ship call + /// Gets a list of notifications pursuant to a specified participant and ship call List of notifications (tbd) /// /// Thrown when fails to make API call - /// Creates a new ship call. The id parameter is **required**. + /// **Id of participant**. *Example: 2*. Id returned through loading of participant + /// **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 (Id) - public async System.Threading.Tasks.Task> ShipcallsPutWithHttpInfoAsync(Shipcall shipcall, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (Notification) + public async System.Threading.Tasks.Task> NotificationsGetWithHttpInfoAsync(int participantId, int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'shipcall' is set - if (shipcall == null) - { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'shipcall' when calling DefaultApi->ShipcallsPut"); - } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header string[] _accepts = new string[] { @@ -1582,8 +1223,9 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = shipcall; - localVarRequestOptions.Operation = "DefaultApi.ShipcallsPut"; + localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "participant_id", participantId)); + localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId)); + localVarRequestOptions.Operation = "StaticApi.NotificationsGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1591,10 +1233,10 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/shipcalls", 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("ShipcallsPut", localVarResponse); + Exception _exception = this.ExceptionFactory("NotificationsGet", localVarResponse); if (_exception != null) { throw _exception; @@ -1603,7 +1245,131 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// gets a list of registered shipcalls + /// gets one or all participants If no parameter is given, all participants are returned. The list can be used to display participant information in the context of ship calls. + /// + /// Thrown when fails to make API call + /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) + /// Index associated with the operation. + /// List<Participant> + public List ParticipantsGet(int? userId = default(int?), int operationIndex = 0) + { + BreCalClient.misc.Client.ApiResponse> localVarResponse = ParticipantsGetWithHttpInfo(userId); + return localVarResponse.Data; + } + /// + /// gets one or all participants If no parameter is given, all participants are returned. The list can be used to display participant information in the context of ship calls. + /// + /// Thrown when fails to make API call + /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) + /// Index associated with the operation. + /// ApiResponse of List<Participant> + public BreCalClient.misc.Client.ApiResponse> ParticipantsGetWithHttpInfo(int? userId = default(int?), 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); + } + if (userId != null) + { + localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "user_id", userId)); + } + localVarRequestOptions.Operation = "StaticApi.ParticipantsGet"; + 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>("/participants", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ParticipantsGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + return localVarResponse; + } + /// + /// gets one or all participants If no parameter is given, all participants are returned. The list can be used to display participant information in the context of ship calls. + /// + /// Thrown when fails to make API call + /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<Participant> + public async System.Threading.Tasks.Task> ParticipantsGetAsync(int? userId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + BreCalClient.misc.Client.ApiResponse> localVarResponse = await ParticipantsGetWithHttpInfoAsync(userId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + /// + /// gets one or all participants If no parameter is given, all participants are returned. The list can be used to display participant information in the context of ship calls. + /// + /// Thrown when fails to make API call + /// **Id of user**. *Example: 2*. User id returned by verify call. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Participant>) + public async System.Threading.Tasks.Task>> ParticipantsGetWithHttpInfoAsync(int? userId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); + string[] _contentTypes = new string[] { + }; + // 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); + } + if (userId != null) + { + localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "user_id", userId)); + } + localVarRequestOptions.Operation = "StaticApi.ParticipantsGet"; + 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>("/participants", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ParticipantsGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + return localVarResponse; + } + /// + /// gets a list of ships Gets a list of ships including logically deleted ships to be used with shipcalls /// /// Thrown when fails to make API call /// Index associated with the operation. @@ -1614,7 +1380,7 @@ namespace BreCalClient.misc.Api return localVarResponse.Data; } /// - /// gets a list of registered shipcalls + /// gets a list of ships Gets a list of ships including logically deleted ships to be used with shipcalls /// /// Thrown when fails to make API call /// Index associated with the operation. @@ -1638,7 +1404,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Operation = "DefaultApi.ShipsGet"; + localVarRequestOptions.Operation = "StaticApi.ShipsGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1658,7 +1424,7 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// gets a list of registered shipcalls + /// gets a list of ships Gets a list of ships including logically deleted ships to be used with shipcalls /// /// Thrown when fails to make API call /// Index associated with the operation. @@ -1670,7 +1436,7 @@ namespace BreCalClient.misc.Api return localVarResponse.Data; } /// - /// gets a list of registered shipcalls + /// gets a list of ships Gets a list of ships including logically deleted ships to be used with shipcalls /// /// Thrown when fails to make API call /// Index associated with the operation. @@ -1695,7 +1461,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Operation = "DefaultApi.ShipsGet"; + localVarRequestOptions.Operation = "StaticApi.ShipsGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1714,25 +1480,473 @@ namespace BreCalClient.misc.Api } return localVarResponse; } + } +} + +/* + * Bremen calling API + * + * Administer DEBRE ship calls, times and notifications + * + * The version of the OpenAPI document: 1.1.0 + * Contact: info@textbausteine.net + * Generated by: https://github.com/openapitools/openapi-generator.git + */ +namespace BreCalClient.misc.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITimesApiSync : IApiAccessor + { + #region Synchronous Operations /// - /// Delete a times entry for a ship call. + /// Create a new times entry for a ship call /// + /// + /// The times entry for a shipcall is created with reference to a participant. For each participant type there should be only one times data record. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. **Do not** provide id parameter. + /// Index associated with the operation. + /// Id + Id TimesCreate(Times times, int operationIndex = 0); + /// + /// Create a new times entry for a ship call + /// + /// + /// The times entry for a shipcall is created with reference to a participant. For each participant type there should be only one times data record. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. **Do not** provide id parameter. + /// Index associated with the operation. + /// ApiResponse of Id + ApiResponse TimesCreateWithHttpInfo(Times times, int operationIndex = 0); + /// + /// 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 /// /// Index associated with the operation. + /// Id + Id TimesDelete(int id, int operationIndex = 0); + /// + /// 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 + /// + /// Index associated with the operation. + /// ApiResponse of Id + ApiResponse TimesDeleteWithHttpInfo(int id, int operationIndex = 0); + /// + /// Gets list of times + /// + /// + /// Get all times assigned to a shipcall. These might not be complete. + /// + /// Thrown when fails to make API call + /// **Id**. *Example: 42*. Id of referenced ship call. (optional) + /// Index associated with the operation. + /// List<Times> + List TimesGet(int? shipcallId = default(int?), int operationIndex = 0); + /// + /// Gets list of times + /// + /// + /// Get all times assigned to a shipcall. These might not be complete. + /// + /// Thrown when fails to make API call + /// **Id**. *Example: 42*. Id of referenced ship call. (optional) + /// Index associated with the operation. + /// ApiResponse of List<Times> + ApiResponse> TimesGetWithHttpInfo(int? shipcallId = default(int?), int operationIndex = 0); + /// + /// Update a times entry for a ship call + /// + /// + /// Updating a times entry for a ship for a particular participant. The times entries are required for a shipcall to pass the validation rules. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. The id parameter is **required**. + /// Index associated with the operation. + /// Id + Id TimesUpdate(Times times, int operationIndex = 0); + /// + /// Update a times entry for a ship call + /// + /// + /// Updating a times entry for a ship for a particular participant. The times entries are required for a shipcall to pass the validation rules. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. The id parameter is **required**. + /// Index associated with the operation. + /// ApiResponse of Id + ApiResponse TimesUpdateWithHttpInfo(Times times, int operationIndex = 0); + #endregion Synchronous Operations + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITimesApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create a new times entry for a ship call + /// + /// + /// The times entry for a shipcall is created with reference to a participant. For each participant type there should be only one times data record. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. **Do not** provide id parameter. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Id + System.Threading.Tasks.Task TimesCreateAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create a new times entry for a ship call + /// + /// + /// The times entry for a shipcall is created with reference to a participant. For each participant type there should be only one times data record. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. **Do not** provide id parameter. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Id) + System.Threading.Tasks.Task> TimesCreateWithHttpInfoAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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 + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Id + System.Threading.Tasks.Task TimesDeleteAsync(int id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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 + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Id) + System.Threading.Tasks.Task> TimesDeleteWithHttpInfoAsync(int id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Gets list of times + /// + /// + /// Get all times assigned to a shipcall. These might not be complete. + /// + /// Thrown when fails to make API call + /// **Id**. *Example: 42*. Id of referenced ship call. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<Times> + System.Threading.Tasks.Task> TimesGetAsync(int? shipcallId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Gets list of times + /// + /// + /// Get all times assigned to a shipcall. These might not be complete. + /// + /// Thrown when fails to make API call + /// **Id**. *Example: 42*. Id of referenced ship call. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Times>) + System.Threading.Tasks.Task>> TimesGetWithHttpInfoAsync(int? shipcallId = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update a times entry for a ship call + /// + /// + /// Updating a times entry for a ship for a particular participant. The times entries are required for a shipcall to pass the validation rules. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. The id parameter is **required**. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Id + System.Threading.Tasks.Task TimesUpdateAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update a times entry for a ship call + /// + /// + /// Updating a times entry for a ship for a particular participant. The times entries are required for a shipcall to pass the validation rules. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. The id parameter is **required**. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Id) + System.Threading.Tasks.Task> TimesUpdateWithHttpInfoAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITimesApi : ITimesApiSync, ITimesApiAsync + { + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class TimesApi : ITimesApi + { + private BreCalClient.misc.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + /// + /// Initializes a new instance of the class. + /// /// - public void TimesDelete(int id, int operationIndex = 0) + public TimesApi() : this((string)null) { - TimesDeleteWithHttpInfo(id); } /// - /// Delete a times entry for a ship call. + /// Initializes a new instance of the class. + /// + /// + public TimesApi(string basePath) + { + this.Configuration = BreCalClient.misc.Client.Configuration.MergeConfigurations( + BreCalClient.misc.Client.GlobalConfiguration.Instance, + new BreCalClient.misc.Client.Configuration { BasePath = basePath } + ); + this.Client = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; + } + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public TimesApi(BreCalClient.misc.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + this.Configuration = BreCalClient.misc.Client.Configuration.MergeConfigurations( + BreCalClient.misc.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; + } + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public TimesApi(BreCalClient.misc.Client.ISynchronousClient client, BreCalClient.misc.Client.IAsynchronousClient asyncClient, BreCalClient.misc.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; + } + /// + /// The client for accessing this underlying API asynchronously. + /// + public BreCalClient.misc.Client.IAsynchronousClient AsynchronousClient { get; set; } + /// + /// The client for accessing this underlying API synchronously. + /// + public BreCalClient.misc.Client.ISynchronousClient Client { get; set; } + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public BreCalClient.misc.Client.IReadableConfiguration Configuration { get; set; } + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public BreCalClient.misc.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + /// + /// Create a new times entry for a ship call The times entry for a shipcall is created with reference to a participant. For each participant type there should be only one times data record. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. **Do not** provide id parameter. + /// Index associated with the operation. + /// Id + public Id TimesCreate(Times times, int operationIndex = 0) + { + BreCalClient.misc.Client.ApiResponse localVarResponse = TimesCreateWithHttpInfo(times); + return localVarResponse.Data; + } + /// + /// Create a new times entry for a ship call The times entry for a shipcall is created with reference to a participant. For each participant type there should be only one times data record. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. **Do not** provide id parameter. + /// Index associated with the operation. + /// ApiResponse of Id + public BreCalClient.misc.Client.ApiResponse TimesCreateWithHttpInfo(Times times, int operationIndex = 0) + { + // verify the required parameter 'times' is set + if (times == null) + { + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'times' when calling TimesApi->TimesCreate"); + } + BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); + string[] _contentTypes = new string[] { + "application/json" + }; + // 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.Data = times; + localVarRequestOptions.Operation = "TimesApi.TimesCreate"; + 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.Post("/times", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TimesCreate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + return localVarResponse; + } + /// + /// Create a new times entry for a ship call The times entry for a shipcall is created with reference to a participant. For each participant type there should be only one times data record. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. **Do not** provide id parameter. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Id + public async System.Threading.Tasks.Task TimesCreateAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + BreCalClient.misc.Client.ApiResponse localVarResponse = await TimesCreateWithHttpInfoAsync(times, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + /// + /// Create a new times entry for a ship call The times entry for a shipcall is created with reference to a participant. For each participant type there should be only one times data record. + /// + /// Thrown when fails to make API call + /// Times entry that will be added to the ship call. **Do not** provide id parameter. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Id) + public async System.Threading.Tasks.Task> TimesCreateWithHttpInfoAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'times' is set + if (times == null) + { + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'times' when calling TimesApi->TimesCreate"); + } + BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); + string[] _contentTypes = new string[] { + "application/json" + }; + // 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.Data = times; + localVarRequestOptions.Operation = "TimesApi.TimesCreate"; + 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.PostAsync("/times", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TimesCreate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + return localVarResponse; + } + /// + /// 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 /// /// Index associated with the operation. - /// ApiResponse of Object(void) - public BreCalClient.misc.Client.ApiResponse TimesDeleteWithHttpInfo(int id, int operationIndex = 0) + /// Id + public Id TimesDelete(int id, int operationIndex = 0) + { + BreCalClient.misc.Client.ApiResponse localVarResponse = TimesDeleteWithHttpInfo(id); + return localVarResponse.Data; + } + /// + /// 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 + /// + /// Index associated with the operation. + /// ApiResponse of Id + public BreCalClient.misc.Client.ApiResponse TimesDeleteWithHttpInfo(int id, int operationIndex = 0) { BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1752,7 +1966,7 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "id", id)); - localVarRequestOptions.Operation = "DefaultApi.TimesDelete"; + localVarRequestOptions.Operation = "TimesApi.TimesDelete"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1760,7 +1974,7 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = this.Client.Delete("/times", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/times", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("TimesDelete", localVarResponse); @@ -1772,26 +1986,27 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Delete a times entry for a ship call. + /// 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 /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task TimesDeleteAsync(int id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of Id + public async System.Threading.Tasks.Task TimesDeleteAsync(int id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TimesDeleteWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + BreCalClient.misc.Client.ApiResponse localVarResponse = await TimesDeleteWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// - /// Delete a times entry for a ship call. + /// 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 /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TimesDeleteWithHttpInfoAsync(int id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (Id) + public async System.Threading.Tasks.Task> TimesDeleteWithHttpInfoAsync(int id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1811,7 +2026,7 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "id", id)); - localVarRequestOptions.Operation = "DefaultApi.TimesDelete"; + localVarRequestOptions.Operation = "TimesApi.TimesDelete"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1819,7 +2034,7 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/times", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/times", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("TimesDelete", localVarResponse); @@ -1831,7 +2046,7 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Get all recorded times for a a ship call + /// Gets list of times Get all times assigned to a shipcall. These might not be complete. /// /// Thrown when fails to make API call /// **Id**. *Example: 42*. Id of referenced ship call. (optional) @@ -1843,7 +2058,7 @@ namespace BreCalClient.misc.Api return localVarResponse.Data; } /// - /// Get all recorded times for a a ship call + /// Gets list of times Get all times assigned to a shipcall. These might not be complete. /// /// Thrown when fails to make API call /// **Id**. *Example: 42*. Id of referenced ship call. (optional) @@ -1872,7 +2087,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId)); } - localVarRequestOptions.Operation = "DefaultApi.TimesGet"; + localVarRequestOptions.Operation = "TimesApi.TimesGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1892,7 +2107,7 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Get all recorded times for a a ship call + /// Gets list of times Get all times assigned to a shipcall. These might not be complete. /// /// Thrown when fails to make API call /// **Id**. *Example: 42*. Id of referenced ship call. (optional) @@ -1905,7 +2120,7 @@ namespace BreCalClient.misc.Api return localVarResponse.Data; } /// - /// Get all recorded times for a a ship call + /// Gets list of times Get all times assigned to a shipcall. These might not be complete. /// /// Thrown when fails to make API call /// **Id**. *Example: 42*. Id of referenced ship call. (optional) @@ -1935,7 +2150,7 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId)); } - localVarRequestOptions.Operation = "DefaultApi.TimesGet"; + localVarRequestOptions.Operation = "TimesApi.TimesGet"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -1955,160 +2170,30 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Create a new times entry for a ship call - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// Id - public Id TimesPost(Times times, int operationIndex = 0) - { - BreCalClient.misc.Client.ApiResponse localVarResponse = TimesPostWithHttpInfo(times); - return localVarResponse.Data; - } - /// - /// Create a new times entry for a ship call - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// ApiResponse of Id - public BreCalClient.misc.Client.ApiResponse TimesPostWithHttpInfo(Times times, int operationIndex = 0) - { - // verify the required parameter 'times' is set - if (times == null) - { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'times' when calling DefaultApi->TimesPost"); - } - BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; - // 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.Data = times; - localVarRequestOptions.Operation = "DefaultApi.TimesPost"; - 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.Post("/times", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("TimesPost", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - return localVarResponse; - } - /// - /// Create a new times entry for a ship call - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Id - public async System.Threading.Tasks.Task TimesPostAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - BreCalClient.misc.Client.ApiResponse localVarResponse = await TimesPostWithHttpInfoAsync(times, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - /// - /// Create a new times entry for a ship call - /// - /// Thrown when fails to make API call - /// Times entry that will be added to the ship call. **Do not** provide id parameter. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Id) - public async System.Threading.Tasks.Task> TimesPostWithHttpInfoAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'times' is set - if (times == null) - { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'times' when calling DefaultApi->TimesPost"); - } - BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; - // 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.Data = times; - localVarRequestOptions.Operation = "DefaultApi.TimesPost"; - 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.PostAsync("/times", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("TimesPost", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - return localVarResponse; - } - /// - /// Update a times entry for a ship call + /// Update a times entry for a ship call Updating a times entry for a ship for a particular participant. The times entries are required for a shipcall to pass the validation rules. /// /// Thrown when fails to make API call /// Times entry that will be added to the ship call. The id parameter is **required**. /// Index associated with the operation. /// Id - public Id TimesPut(Times times, int operationIndex = 0) + public Id TimesUpdate(Times times, int operationIndex = 0) { - BreCalClient.misc.Client.ApiResponse localVarResponse = TimesPutWithHttpInfo(times); + BreCalClient.misc.Client.ApiResponse localVarResponse = TimesUpdateWithHttpInfo(times); return localVarResponse.Data; } /// - /// Update a times entry for a ship call + /// Update a times entry for a ship call Updating a times entry for a ship for a particular participant. The times entries are required for a shipcall to pass the validation rules. /// /// Thrown when fails to make API call /// Times entry that will be added to the ship call. The id parameter is **required**. /// Index associated with the operation. /// ApiResponse of Id - public BreCalClient.misc.Client.ApiResponse TimesPutWithHttpInfo(Times times, int operationIndex = 0) + public BreCalClient.misc.Client.ApiResponse TimesUpdateWithHttpInfo(Times times, int operationIndex = 0) { // verify the required parameter 'times' is set if (times == null) { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'times' when calling DefaultApi->TimesPut"); + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'times' when calling TimesApi->TimesUpdate"); } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2129,7 +2214,7 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.Data = times; - localVarRequestOptions.Operation = "DefaultApi.TimesPut"; + localVarRequestOptions.Operation = "TimesApi.TimesUpdate"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -2140,7 +2225,7 @@ namespace BreCalClient.misc.Api var localVarResponse = this.Client.Put("/times", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("TimesPut", localVarResponse); + Exception _exception = this.ExceptionFactory("TimesUpdate", localVarResponse); if (_exception != null) { throw _exception; @@ -2149,32 +2234,32 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Update a times entry for a ship call + /// Update a times entry for a ship call Updating a times entry for a ship for a particular participant. The times entries are required for a shipcall to pass the validation rules. /// /// Thrown when fails to make API call /// Times entry that will be added to the ship call. The id parameter is **required**. /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Id - public async System.Threading.Tasks.Task TimesPutAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TimesUpdateAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BreCalClient.misc.Client.ApiResponse localVarResponse = await TimesPutWithHttpInfoAsync(times, operationIndex, cancellationToken).ConfigureAwait(false); + BreCalClient.misc.Client.ApiResponse localVarResponse = await TimesUpdateWithHttpInfoAsync(times, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Update a times entry for a ship call + /// Update a times entry for a ship call Updating a times entry for a ship for a particular participant. The times entries are required for a shipcall to pass the validation rules. /// /// Thrown when fails to make API call /// Times entry that will be added to the ship call. The id parameter is **required**. /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Id) - public async System.Threading.Tasks.Task> TimesPutWithHttpInfoAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TimesUpdateWithHttpInfoAsync(Times times, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'times' is set if (times == null) { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'times' when calling DefaultApi->TimesPut"); + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'times' when calling TimesApi->TimesUpdate"); } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2195,7 +2280,7 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.Data = times; - localVarRequestOptions.Operation = "DefaultApi.TimesPut"; + localVarRequestOptions.Operation = "TimesApi.TimesUpdate"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -2206,7 +2291,7 @@ namespace BreCalClient.misc.Api var localVarResponse = await this.AsynchronousClient.PutAsync("/times", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("TimesPut", localVarResponse); + Exception _exception = this.ExceptionFactory("TimesUpdate", localVarResponse); if (_exception != null) { throw _exception; @@ -2214,30 +2299,256 @@ namespace BreCalClient.misc.Api } return localVarResponse; } + } +} + +/* + * Bremen calling API + * + * Administer DEBRE ship calls, times and notifications + * + * The version of the OpenAPI document: 1.1.0 + * Contact: info@textbausteine.net + * Generated by: https://github.com/openapitools/openapi-generator.git + */ +namespace BreCalClient.misc.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IUserApiSync : IApiAccessor + { + #region Synchronous Operations /// - /// Update user details (first/last name, phone, password) + /// Returns a JWT session token and user data if successful /// + /// + /// Perform login + /// + /// Thrown when fails to make API call + /// Login credentials + /// Index associated with the operation. + /// LoginResult + LoginResult Login(Credentials credentials, int operationIndex = 0); + /// + /// Returns a JWT session token and user data if successful + /// + /// + /// Perform login + /// + /// Thrown when fails to make API call + /// Login credentials + /// Index associated with the operation. + /// ApiResponse of LoginResult + ApiResponse LoginWithHttpInfo(Credentials credentials, int operationIndex = 0); + /// + /// Update user details (first/last name, phone, password) + /// + /// + /// Update user information + /// /// Thrown when fails to make API call /// User details /// Index associated with the operation. + /// Id + Id UserUpdate(UserDetails userDetails, int operationIndex = 0); + /// + /// Update user details (first/last name, phone, password) + /// + /// + /// Update user information + /// + /// Thrown when fails to make API call + /// User details + /// Index associated with the operation. + /// ApiResponse of Id + ApiResponse UserUpdateWithHttpInfo(UserDetails userDetails, int operationIndex = 0); + #endregion Synchronous Operations + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IUserApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Returns a JWT session token and user data if successful + /// + /// + /// Perform login + /// + /// Thrown when fails to make API call + /// Login credentials + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of LoginResult + System.Threading.Tasks.Task LoginAsync(Credentials credentials, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Returns a JWT session token and user data if successful + /// + /// + /// Perform login + /// + /// Thrown when fails to make API call + /// Login credentials + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (LoginResult) + System.Threading.Tasks.Task> LoginWithHttpInfoAsync(Credentials credentials, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update user details (first/last name, phone, password) + /// + /// + /// Update user information + /// + /// Thrown when fails to make API call + /// User details + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Id + System.Threading.Tasks.Task UserUpdateAsync(UserDetails userDetails, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update user details (first/last name, phone, password) + /// + /// + /// Update user information + /// + /// Thrown when fails to make API call + /// User details + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Id) + System.Threading.Tasks.Task> UserUpdateWithHttpInfoAsync(UserDetails userDetails, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IUserApi : IUserApiSync, IUserApiAsync + { + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class UserApi : IUserApi + { + private BreCalClient.misc.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + /// + /// Initializes a new instance of the class. + /// /// - public void UserPut(UserDetails userDetails, int operationIndex = 0) + public UserApi() : this((string)null) { - UserPutWithHttpInfo(userDetails); } /// - /// Update user details (first/last name, phone, password) + /// Initializes a new instance of the class. + /// + /// + public UserApi(string basePath) + { + this.Configuration = BreCalClient.misc.Client.Configuration.MergeConfigurations( + BreCalClient.misc.Client.GlobalConfiguration.Instance, + new BreCalClient.misc.Client.Configuration { BasePath = basePath } + ); + this.Client = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; + } + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public UserApi(BreCalClient.misc.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + this.Configuration = BreCalClient.misc.Client.Configuration.MergeConfigurations( + BreCalClient.misc.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new BreCalClient.misc.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; + } + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public UserApi(BreCalClient.misc.Client.ISynchronousClient client, BreCalClient.misc.Client.IAsynchronousClient asyncClient, BreCalClient.misc.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = BreCalClient.misc.Client.Configuration.DefaultExceptionFactory; + } + /// + /// The client for accessing this underlying API asynchronously. + /// + public BreCalClient.misc.Client.IAsynchronousClient AsynchronousClient { get; set; } + /// + /// The client for accessing this underlying API synchronously. + /// + public BreCalClient.misc.Client.ISynchronousClient Client { get; set; } + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public BreCalClient.misc.Client.IReadableConfiguration Configuration { get; set; } + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public BreCalClient.misc.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + /// + /// Returns a JWT session token and user data if successful Perform login /// /// Thrown when fails to make API call - /// User details + /// Login credentials /// Index associated with the operation. - /// ApiResponse of Object(void) - public BreCalClient.misc.Client.ApiResponse UserPutWithHttpInfo(UserDetails userDetails, int operationIndex = 0) + /// LoginResult + public LoginResult Login(Credentials credentials, int operationIndex = 0) { - // verify the required parameter 'userDetails' is set - if (userDetails == null) + BreCalClient.misc.Client.ApiResponse localVarResponse = LoginWithHttpInfo(credentials); + return localVarResponse.Data; + } + /// + /// Returns a JWT session token and user data if successful Perform login + /// + /// Thrown when fails to make API call + /// Login credentials + /// Index associated with the operation. + /// ApiResponse of LoginResult + public BreCalClient.misc.Client.ApiResponse LoginWithHttpInfo(Credentials credentials, int operationIndex = 0) + { + // verify the required parameter 'credentials' is set + if (credentials == null) { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'userDetails' when calling DefaultApi->UserPut"); + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'credentials' when calling UserApi->Login"); } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2257,8 +2568,8 @@ namespace BreCalClient.misc.Api { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = userDetails; - localVarRequestOptions.Operation = "DefaultApi.UserPut"; + localVarRequestOptions.Data = credentials; + localVarRequestOptions.Operation = "UserApi.Login"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -2266,10 +2577,10 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = this.Client.Put("/user", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/login", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UserPut", localVarResponse); + Exception _exception = this.ExceptionFactory("Login", localVarResponse); if (_exception != null) { throw _exception; @@ -2278,31 +2589,96 @@ namespace BreCalClient.misc.Api return localVarResponse; } /// - /// Update user details (first/last name, phone, password) + /// Returns a JWT session token and user data if successful Perform login /// /// Thrown when fails to make API call - /// User details + /// Login credentials /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task UserPutAsync(UserDetails userDetails, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of LoginResult + public async System.Threading.Tasks.Task LoginAsync(Credentials credentials, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UserPutWithHttpInfoAsync(userDetails, operationIndex, cancellationToken).ConfigureAwait(false); + BreCalClient.misc.Client.ApiResponse localVarResponse = await LoginWithHttpInfoAsync(credentials, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// - /// Update user details (first/last name, phone, password) + /// Returns a JWT session token and user data if successful Perform login + /// + /// Thrown when fails to make API call + /// Login credentials + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (LoginResult) + public async System.Threading.Tasks.Task> LoginWithHttpInfoAsync(Credentials credentials, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'credentials' is set + if (credentials == null) + { + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'credentials' when calling UserApi->Login"); + } + BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); + string[] _contentTypes = new string[] { + "application/json" + }; + // 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.Data = credentials; + localVarRequestOptions.Operation = "UserApi.Login"; + 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.PostAsync("/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Login", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + return localVarResponse; + } + /// + /// Update user details (first/last name, phone, password) Update user information /// /// Thrown when fails to make API call /// User details /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UserPutWithHttpInfoAsync(UserDetails userDetails, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Id + public Id UserUpdate(UserDetails userDetails, int operationIndex = 0) + { + BreCalClient.misc.Client.ApiResponse localVarResponse = UserUpdateWithHttpInfo(userDetails); + return localVarResponse.Data; + } + /// + /// Update user details (first/last name, phone, password) Update user information + /// + /// Thrown when fails to make API call + /// User details + /// Index associated with the operation. + /// ApiResponse of Id + public BreCalClient.misc.Client.ApiResponse UserUpdateWithHttpInfo(UserDetails userDetails, int operationIndex = 0) { // verify the required parameter 'userDetails' is set if (userDetails == null) { - throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'userDetails' when calling DefaultApi->UserPut"); + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'userDetails' when calling UserApi->UserUpdate"); } BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -2323,7 +2699,7 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.Data = userDetails; - localVarRequestOptions.Operation = "DefaultApi.UserPut"; + localVarRequestOptions.Operation = "UserApi.UserUpdate"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (ApiKey) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) @@ -2331,10 +2707,76 @@ namespace BreCalClient.misc.Api localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = this.Client.Put("/user", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UserPut", localVarResponse); + Exception _exception = this.ExceptionFactory("UserUpdate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + return localVarResponse; + } + /// + /// Update user details (first/last name, phone, password) Update user information + /// + /// Thrown when fails to make API call + /// User details + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Id + public async System.Threading.Tasks.Task UserUpdateAsync(UserDetails userDetails, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + BreCalClient.misc.Client.ApiResponse localVarResponse = await UserUpdateWithHttpInfoAsync(userDetails, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + /// + /// Update user details (first/last name, phone, password) Update user information + /// + /// Thrown when fails to make API call + /// User details + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Id) + public async System.Threading.Tasks.Task> UserUpdateWithHttpInfoAsync(UserDetails userDetails, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'userDetails' is set + if (userDetails == null) + { + throw new BreCalClient.misc.Client.ApiException(400, "Missing required parameter 'userDetails' when calling UserApi->UserUpdate"); + } + BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions(); + string[] _contentTypes = new string[] { + "application/json" + }; + // 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.Data = userDetails; + localVarRequestOptions.Operation = "UserApi.UserUpdate"; + 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.PutAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UserUpdate", localVarResponse); if (_exception != null) { throw _exception; @@ -5961,11 +6403,6 @@ namespace BreCalClient.misc.Model [DataContract(Name = "participant")] public partial class Participant : IEquatable, IValidatableObject { - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public ParticipantType? Type { get; set; } /// /// Initializes a new instance of the class. /// @@ -5974,12 +6411,12 @@ namespace BreCalClient.misc.Model /// street. /// postalCode. /// city. - /// type. + /// a logical combinat. /// flags. /// created. /// modified. /// 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), ParticipantType? type = default(ParticipantType?), int flags = default(int), DateTime created = default(DateTime), DateTime modified = default(DateTime), bool deleted = 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) { this.Id = id; this.Name = name; @@ -6018,6 +6455,12 @@ namespace BreCalClient.misc.Model [DataMember(Name = "city", EmitDefaultValue = true)] public string City { get; set; } /// + /// a logical combinat + /// + /// a logical combinat + [DataMember(Name = "type", EmitDefaultValue = true)] + public int Type { get; set; } + /// /// Gets or Sets Flags /// [DataMember(Name = "flags", EmitDefaultValue = true)] @@ -6372,6 +6815,95 @@ namespace BreCalClient.misc.Model } } +/* + * Bremen calling API + * + * Administer DEBRE ship calls, times and notifications + * + * The version of the OpenAPI document: 1.1.0 + * Contact: info@textbausteine.net + * Generated by: https://github.com/openapitools/openapi-generator.git + */ +namespace BreCalClient.misc.Model +{ + /// + /// Enumeration that can take particular values + /// + [DataContract(Name = "ParticipantType2")] + public partial class ParticipantType2 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public ParticipantType2() + { + } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ParticipantType2 {\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); + } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParticipantType2); + } + /// + /// Returns true if ParticipantType2 instances are equal + /// + /// Instance of ParticipantType2 to be compared + /// Boolean + public bool Equals(ParticipantType2 input) + { + if (input == null) + { + return false; + } + return false; + } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} + /* * Bremen calling API * @@ -7212,11 +7744,6 @@ namespace BreCalClient.misc.Model [DataContract(Name = "times")] public partial class Times : IEquatable, IValidatableObject { - /// - /// Gets or Sets ParticipantType - /// - [DataMember(Name = "participant_type", EmitDefaultValue = true)] - public ParticipantType? ParticipantType { get; set; } /// /// Initializes a new instance of the class. /// @@ -7245,7 +7772,7 @@ namespace BreCalClient.misc.Model /// participantType. /// created. /// 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), ParticipantType? participantType = default(ParticipantType?), DateTime created = default(DateTime), DateTime modified = default(DateTime)) + 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), ParticipantType2 participantType = default(ParticipantType2), DateTime created = default(DateTime), DateTime modified = default(DateTime)) { this.ShipcallId = shipcallId; this.ParticipantId = participantId; @@ -7354,6 +7881,11 @@ namespace BreCalClient.misc.Model [DataMember(Name = "pier_side", EmitDefaultValue = true)] public bool PierSide { get; set; } /// + /// Gets or Sets ParticipantType + /// + [DataMember(Name = "participant_type", EmitDefaultValue = true)] + public ParticipantType2 ParticipantType { get; set; } + /// /// Gets or Sets Created /// [DataMember(Name = "created", EmitDefaultValue = true)] @@ -7501,7 +8033,8 @@ namespace BreCalClient.misc.Model ) && ( this.ParticipantType == input.ParticipantType || - this.ParticipantType.Equals(input.ParticipantType) + (this.ParticipantType != null && + this.ParticipantType.Equals(input.ParticipantType)) ) && ( this.Created == input.Created || @@ -7564,7 +8097,10 @@ namespace BreCalClient.misc.Model hashCode = (hashCode * 59) + this.BerthInfo.GetHashCode(); } hashCode = (hashCode * 59) + this.PierSide.GetHashCode(); - hashCode = (hashCode * 59) + this.ParticipantType.GetHashCode(); + if (this.ParticipantType != null) + { + hashCode = (hashCode * 59) + this.ParticipantType.GetHashCode(); + } if (this.Created != null) { hashCode = (hashCode * 59) + this.Created.GetHashCode(); diff --git a/misc/BreCalApi.yaml b/misc/BreCalApi.yaml index e014ffa..5c3ad92 100644 --- a/misc/BreCalApi.yaml +++ b/misc/BreCalApi.yaml @@ -1,859 +1,896 @@ -openapi: "3.1.0" +openapi: 3.1.0 +x-stoplight: + id: iucm9tq7jgu7j info: - version: "1.1.0" - title: "Bremen calling API" - description: Administer DEBRE ship calls, times and notifications - termsOfService: "https://www.bsmd.de/" # TBD: url to terms page - contact: - name: "Bremen calling API" - url: "https://www.textbausteine.net" - email: "info@textbausteine.net" - license: - name: "Use at your own risk" - url: "https://www.bsmd.de/license" - + version: 1.1.0 + title: Bremen calling API + description: 'Administer DEBRE ship calls, times and notifications' + termsOfService: 'https://www.bsmd.de/' + contact: + name: Bremen calling API + url: 'https://www.textbausteine.net' + email: info@textbausteine.net + license: + name: Use at your own risk + url: 'https://www.bsmd.de/license' + summary: Bremen calling servers: - - url: "https://brecaldevel.bsmd-emswe.eu/" - description: "Development server hosted on vcup" - + - url: 'https://brecaldevel.bsmd-emswe.eu' + description: Development server hosted on vcup +tags: + - name: user + - name: shipcall + - name: times + - name: static paths: - /login: - post: - summary: Returns a JWT session token and user data if successful - requestBody: - description: Login credentials - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/credentials" - responses: - 200: - description: Successful response - content: - application/json: - schema: - $ref: "#/components/schemas/login_result" - 400: - $ref: "#/components/responses/400" - 403: - $ref: "#/components/responses/403" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - /user: - put: - summary: Update user details (first/last name, phone, password) - requestBody: - description: User details - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/user_details" - responses: - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - /shipcalls: - get: - summary: Gets a list of ship calls - parameters: - - name: past_days - in: query - required: false - description: "number of days in the past to include in the result. *Example: 7*." - schema: - type: integer - responses: - 200: - description: ship call list - content: - application/json: - schema: - $ref: "#/components/schemas/shipcalls" - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - post: - summary: Create a new ship call - requestBody: - description: Creates a new ship call. **Do not** provide id parameter. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/shipcall" - responses: - 201: - $ref: "#/components/responses/201" - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - put: - summary: Updates a ship call - requestBody: - description: Creates a new ship call. The id parameter is **required**. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/shipcall" - responses: - 200: - $ref: "#/components/responses/200" - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - /ships: - get: - summary: gets a list of registered shipcalls - responses: - 200: - description: list of ships - content: - application/json: - schema: - $ref: "#/components/schemas/ship_list" - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - /participants: - get: - summary: gets a particular participant entry corresponding to user id - parameters: - - name: user_id - in: query - required: false - description: "**Id of user**. *Example: 2*. User id returned by verify call." - schema: - type: integer - responses: - 200: - description: ship call list - content: - application/json: - schema: - $ref: "#/components/schemas/participant_list" - 400: - $ref: "#/components/responses/400" - 404: - $ref: "#/components/responses/404" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - /times: - get: - summary: Get all recorded times for a a ship call - parameters: - - name: shipcall_id - in: query - description: "**Id**. *Example: 42*. Id of referenced ship call." - schema: - type: integer - responses: - 200: - description: list of recorded times - content: - application/json: - schema: - $ref: "#/components/schemas/times_list" - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - post: - summary: Create a new times entry for a ship call - requestBody: - description: Times entry that will be added to the ship call. **Do not** provide id parameter. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/times" - responses: - 201: - $ref: "#/components/responses/201" - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - put: - summary: Update a times entry for a ship call - requestBody: - description: Times entry that will be added to the ship call. The id parameter is **required**. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/times" - responses: - 200: - $ref: "#/components/responses/200" - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - delete: - summary: Delete a times entry for a ship call. - parameters: - - name: id - in: query - required: true - schema: - $ref: "#/components/schemas/timesId" - responses: - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - - /notifications: - get: - summary: Gets a list of notifications pursuant to a specified participant and ship call - parameters: - - name: participant_id - in: query - required: true - description: "**Id of participant**. *Example: 2*. Id returned through loading of participant" - schema: - type: integer - - name: shipcall_id - in: query - required: true - description: "**Id of ship call**. *Example: 52*. Id given in ship call list" - schema: - $ref: "#/components/schemas/shipcallId" - responses: - 200: - description: notification list - content: - application/json: - schema: - $ref: "#/components/schemas/notification" - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" - /berths: - get: - summary: Gets a list of all berths registered - responses: - 200: - description: list of berths - content: - application/json: - schema: - $ref: "#/components/schemas/berth_list" - 400: - $ref: "#/components/responses/400" - 401: - $ref: "#/components/responses/401" - 500: - $ref: "#/components/responses/500" - 503: - $ref: "#/components/responses/503" + /login: + post: + description: Perform login + summary: Returns a JWT session token and user data if successful + tags: + - user + operationId: login + requestBody: + description: Login credentials + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/credentials' + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/login_result' + '400': + $ref: '#/components/responses/400' + '403': + $ref: '#/components/responses/403' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + /user: + put: + description: Update user information + summary: 'Update user details (first/last name, phone, password)' + tags: + - user + operationId: userUpdate + requestBody: + description: User details + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/user_details' + responses: + '200': + $ref: '#/components/responses/200' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + /shipcalls: + get: + description: Get current ship calls + summary: Gets a list of ship calls + tags: + - shipcall + operationId: shipcallsGet + parameters: + - name: past_days + in: query + required: false + description: 'number of days in the past to include in the result. *Example: 7*.' + schema: + type: integer + responses: + '200': + description: ship call list + content: + application/json: + schema: + $ref: '#/components/schemas/shipcalls' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + post: + summary: Create a new ship call + description: A new shipcall is created without times at this point. This is ususally done by the BSMD or a participant with that particular role. + tags: + - shipcall + operationId: shipcallCreate + requestBody: + description: Creates a new ship call. **Do not** provide id parameter. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/shipcall' + responses: + '201': + $ref: '#/components/responses/201' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + put: + summary: Updates a ship call + description: Updates a shipcall. Usually done if the participant assignments change. + tags: + - shipcall + operationId: shipcallUpdate + requestBody: + description: Creates a new ship call. The id parameter is **required**. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/shipcall' + responses: + '200': + $ref: '#/components/responses/200' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + /ships: + get: + summary: gets a list of ships + description: Gets a list of ships including logically deleted ships to be used with shipcalls + tags: + - static + operationId: shipsGet + responses: + '200': + description: list of ships + content: + application/json: + schema: + $ref: '#/components/schemas/ship_list' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + /participants: + get: + summary: gets one or all participants + description: 'If no parameter is given, all participants are returned. The list can be used to display participant information in the context of ship calls.' + tags: + - static + operationId: participantsGet + parameters: + - name: user_id + in: query + required: false + description: '**Id of user**. *Example: 2*. User id returned by verify call.' + schema: + type: integer + responses: + '200': + description: ship call list + content: + application/json: + schema: + $ref: '#/components/schemas/participant_list' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + /times: + get: + summary: Gets list of times + description: Get all times assigned to a shipcall. These might not be complete. + tags: + - times + operationId: timesGet + parameters: + - name: shipcall_id + in: query + description: '**Id**. *Example: 42*. Id of referenced ship call.' + schema: + type: integer + responses: + '200': + description: list of recorded times + content: + application/json: + schema: + $ref: '#/components/schemas/times_list' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + post: + summary: Create a new times entry for a ship call + description: The times entry for a shipcall is created with reference to a participant. For each participant type there should be only one times data record. + tags: + - times + operationId: timesCreate + requestBody: + description: Times entry that will be added to the ship call. **Do not** provide id parameter. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/times' + responses: + '201': + $ref: '#/components/responses/201' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + put: + summary: Update a times entry for a ship call + description: Updating a times entry for a ship for a particular participant. The times entries are required for a shipcall to pass the validation rules. + tags: + - times + operationId: timesUpdate + requestBody: + description: Times entry that will be added to the ship call. The id parameter is **required**. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/times' + responses: + '200': + $ref: '#/components/responses/200' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + delete: + summary: Delete a times entry for a ship call. + description: A times entry is typically deleted if the agent for example changes or removes the participant assignment for a particular role. + tags: + - times + operationId: timesDelete + parameters: + - name: id + in: query + required: true + schema: + $ref: '#/components/schemas/timesId' + responses: + '200': + $ref: '#/components/responses/200' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + /notifications: + get: + summary: Gets a list of notifications pursuant to a specified participant and ship call + description: List of notifications (tbd) + tags: + - static + operationId: notificationsGet + parameters: + - name: participant_id + in: query + required: true + description: '**Id of participant**. *Example: 2*. Id returned through loading of participant' + schema: + type: integer + - name: shipcall_id + in: query + required: true + description: '**Id of ship call**. *Example: 52*. Id given in ship call list' + schema: + $ref: '#/components/schemas/shipcallId' + responses: + '200': + description: notification list + content: + application/json: + schema: + $ref: '#/components/schemas/notification' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + /berths: + get: + description: 'Returns a list of berths, including berths that are (logically) deleted' + summary: Gets a list of all berths registered + tags: + - static + operationId: berthsGet + responses: + '200': + description: list of berths + content: + application/json: + schema: + $ref: '#/components/schemas/berth_list' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' components: - schemas: - credentials: - type: object - required: - - username - - password - properties: - username: - type: string - password: - type: string - format: password - timesId: - description: The unique identifier for a times entry - type: integer - shipcallId: - description: The unique identifier of a ship call - type: integer - participant_assignment: - description: Participant assigned to a shipcall with a given role (type) - type: object - required: - - participant_id - - type - properties: - participant_id: - type: integer - type: - type: integer - shipcall: - type: object - required: - - id - - ship_id - - type - properties: - id: - $ref: "#/components/schemas/shipcallId" - ship_id: - type: integer - type: - type: ShipcallType - eta: - type: string - format: date-time - nullable: true - voyage: - type: string - maxLength: 16 - nullable: true - etd: - type: string - format: date-time - nullable: true - arrival_berth_id: - type: integer - nullable: true - departure_berth_id: - type: integer - nullable: true - tug_required: - type: boolean - nullable: true - pilot_required: - type: boolean - nullable: true - flags: - type: integer - nullable: true - pier_side: - type: boolean - nullable: true - bunkering: - type: boolean - nullable: true - replenishing_terminal: - type: boolean - nullable: true - replenishing_lock: - type: boolean - nullable: true - draft: - type: number - format: float - nullable: true - tidal_window_from: - type: string - format: date-time - nullable: true - tidal_window_to: - type: string - format: date-time - nullable: true - rain_sensitive_cargo: - type: boolean - nullable: true - recommended_tugs: - type: integer - nullable: true - anchored: - type: boolean - nullable: true - moored_lock: - type: boolean - nullable: true - canceled: - type: boolean - nullable: true - evaluation: - type: integer - nullable: true - evaluation_message: - type: string - nullable: true - participants: - type: array - items: - $ref: "#/components/schemas/participant_assignment" - created: - type: string - format: date-time - modified: - type: string - format: date-time - nullable: true - - shipcalls: - type: array - items: - $ref: "#/components/schemas/shipcall" - - 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 - required: - - shipcall_id - - participant_id - properties: - id: - type: integer - eta_berth: - type: string - format: date-time - nullable: true - eta_berth_fixed: - type: boolean - nullable: true - etd_berth: - type: string - format: date-time - nullable: true - etd_berth_fixed: - type: boolean - nullable: true - lock_time: - type: string - format: date-time - nullable: true - lock_time_fixed: - type: boolean - nullable: true - zone_entry: - type: string - format: date-time - nullable: true - zone_entry_fixed: - type: boolean - nullable: true - operations_start: - type: string - format: date-time - nullable: true - operations_end: - type: string - format: date-time - nullable: true - remarks: - type: string - maxLength: 512 - nullable: true - shipcall_id: - type: integer - participant_id: - type: integer - berth_id: - type: integer - nullable: true - berth_info: - type: string - nullable: true - pier_side: - type: boolean - nullable: true - participant_type: - type: ParticipantType - created: - type: string - format: date-time - modified: - type: string - format: date-time - nullable: true - - times_list: - type: array - items: - $ref: "#/components/schemas/times" - - berth: - type: object - description: Ship berth used for a ship call - properties: - id: - type: integer - name: - type: string - maxLength: 128 - owner_id: - type: integer - nullable: true - authority_id: - type: integer - nullable: true - lock: - type: boolean - nullable: true - created: - type: string - format: date-time - modified: - type: string - format: date-time - nullable: true - deleted: - type: boolean - default: false - - berth_list: - type: array - items: - $ref: "#/components/schemas/berth" - - ship: - type: object - description: a ship - properties: - id: - type: integer - name: - type: string - maxLength: 64 - imo: - type: integer - nullable: true - callsign: - type: string - maxLength: 8 - nullable: true - participant_id: - type: integer - nullable: true - length: - type: number - format: float - nullable: true - width: - type: number - format: float - nullable: true - is_tug: - type: boolean - default: false - bollard_pull: - type: integer - nullable: true - eni: - type: integer - nullable: true - created: - type: string - format: date-time - modified: - type: string - format: date-time - nullable: true - deleted: - type: boolean - default: false - - ship_list: - type: array - items: - $ref: "#/components/schemas/ship" - - notification: - type: object - description: a notification created by the engine if a times entry violates a rule - properties: - id: - type: integer - times_id: - type: integer - participant_id: - type: integer - notification_type: - $ref: "#/components/schemas/NotificationType" - timestamp: - type: string - format: date-time - acknowledged: - type: boolean - created: - type: string - format: date-time - modified: - type: string - format: date-time - nullable: true - - notification_list: - type: array - items: - $ref: "#/components/schemas/notification" - - participant: - type: object - description: A organisational entity that participates in Bremen Calling - properties: - id: - type: integer - name: - type: string - maxLength: 128 - street: - type: string - maxLength: 128 - postal code: - type: string - maxLength: 5 - city: - type: string - maxLength: 64 - type: - type: ParticipantType - flags: - type: integer - nullable: true - created: - type: string - format: date-time - modified: - type: string - format: date-time - nullable: true - deleted: - type: boolean - default: false - - participant_list: - type: array - items: - $ref: "#/components/schemas/participant" - - login_result: - type: object - description: result structure of a successful login attempt - properties: - id: - type: integer - participant_id: - type: integer - first_name: - type: string - last_name: - type: string - user_name: - type: string - user_phone: - type: string - user_email: - type: string - exp: - type: number - format: float - token: - type: string - - user_details: - type: object - description: fields that a user may change - properties: - id: - type: integer - old_password: - type: string - nullable: true - new_password: - type: string - nullable: true - first_name: - type: string - nullable: true - last_name: - type: string - nullable: true - user_phone: - type: string - nullable: true - user_email: - type: string - nullable: true - Id: - type: object - description: A unique identifier for an entity - properties: - id: - type: integer - Error: - type: object - required: - - message - properties: - message: - description: A human readable error message - type: string - - ShipcallType: - type: string - enum: [undefined, arrival, departure, shifting] - - NotificationType: - type: string - enum: [undefined, email, push] - - ParticipantType: - type: integer - enum: - - 1 - - 2 - - 4 - - 8 - - 16 - - 32 - - 64 - x-enumDescriptions: - 1: bsmd - 2: terminal - 4: pilot - 8: agency - 16: mooring - 32: port_authority - 64: tug - - # this here works only with OpenAPI 3.1 - # ParticipantType: - # type: integer - # oneOf: - # - const: 1 - # title: bsmd - # description: Bremen Schiffsmeldedienst - - # - const: 2 - # title: terminal - # description: Terminal - - # - const: 4 - # title: pilot - # description: Pilot - - # - const: 8 - # title: agency - # description: Agency - - # - const: 16 - # title: mooring - # description: Mooring - - # - const: 32 - # title: port_authority - # description: Port Authority - - # - const: 64 - # title: tug - # description: Tug - - securitySchemes: - ApiKey: - type: apiKey - in: header - name: Authorization - responses: - 200: - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/Id" - 201: - description: Created - content: - application/json: - schema: - $ref: "#/components/schemas/Id" - 400: - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 401: - description: Not authorized - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 403: - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 404: - description: Not found - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 500: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 503: - description: Service unavailable - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - + schemas: + credentials: + type: object + properties: + username: + type: string + password: + type: string + format: password + required: + - username + - password + timesId: + description: The unique identifier for a times entry + type: integer + shipcallId: + description: The unique identifier of a ship call + type: integer + participant_assignment: + description: Participant assigned to a shipcall with a given role (type) + type: object + required: + - participant_id + - type + properties: + participant_id: + type: integer + type: + type: integer + shipcall: + type: object + required: + - id + - ship_id + - type + properties: + id: + $ref: '#/components/schemas/shipcallId' + ship_id: + type: integer + type: + $ref: '#/components/schemas/ShipcallType' + eta: + type: string + format: date-time + nullable: true + voyage: + type: string + maxLength: 16 + nullable: true + etd: + type: string + format: date-time + nullable: true + arrival_berth_id: + type: integer + nullable: true + departure_berth_id: + type: integer + nullable: true + tug_required: + type: boolean + nullable: true + pilot_required: + type: boolean + nullable: true + flags: + type: integer + nullable: true + pier_side: + type: boolean + nullable: true + bunkering: + type: boolean + nullable: true + replenishing_terminal: + type: boolean + nullable: true + replenishing_lock: + type: boolean + nullable: true + draft: + type: number + format: float + nullable: true + tidal_window_from: + type: string + format: date-time + nullable: true + tidal_window_to: + type: string + format: date-time + nullable: true + rain_sensitive_cargo: + type: boolean + nullable: true + recommended_tugs: + type: integer + nullable: true + anchored: + type: boolean + nullable: true + moored_lock: + type: boolean + nullable: true + canceled: + type: boolean + nullable: true + evaluation: + type: integer + nullable: true + evaluation_message: + type: string + nullable: true + participants: + type: array + items: + $ref: '#/components/schemas/participant_assignment' + created: + type: string + format: date-time + modified: + type: string + format: date-time + nullable: true + shipcalls: + type: array + items: + $ref: '#/components/schemas/shipcall' + 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' + required: + - shipcall_id + - participant_id + properties: + id: + type: integer + eta_berth: + type: string + format: date-time + nullable: true + eta_berth_fixed: + type: boolean + nullable: true + etd_berth: + type: string + format: date-time + nullable: true + etd_berth_fixed: + type: boolean + nullable: true + lock_time: + type: string + format: date-time + nullable: true + lock_time_fixed: + type: boolean + nullable: true + zone_entry: + type: string + format: date-time + nullable: true + zone_entry_fixed: + type: boolean + nullable: true + operations_start: + type: string + format: date-time + nullable: true + operations_end: + type: string + format: date-time + nullable: true + remarks: + type: string + maxLength: 512 + nullable: true + shipcall_id: + type: integer + participant_id: + type: integer + berth_id: + type: integer + nullable: true + berth_info: + type: string + nullable: true + pier_side: + type: boolean + nullable: true + participant_type: + $ref: '#/components/schemas/ParticipantType2' + created: + type: string + format: date-time + modified: + type: string + format: date-time + nullable: true + times_list: + type: array + items: + $ref: '#/components/schemas/times' + berth: + type: object + description: Ship berth used for a ship call + properties: + id: + type: integer + name: + type: string + maxLength: 128 + owner_id: + type: integer + nullable: true + authority_id: + type: integer + nullable: true + lock: + type: boolean + nullable: true + created: + type: string + format: date-time + modified: + type: string + format: date-time + nullable: true + deleted: + type: boolean + default: false + berth_list: + type: array + items: + $ref: '#/components/schemas/berth' + ship: + type: object + description: a ship + properties: + id: + type: integer + name: + type: string + maxLength: 64 + imo: + type: integer + nullable: true + callsign: + type: string + maxLength: 8 + nullable: true + participant_id: + type: integer + nullable: true + length: + type: number + format: float + nullable: true + width: + type: number + format: float + nullable: true + is_tug: + type: boolean + default: false + bollard_pull: + type: integer + nullable: true + eni: + type: integer + nullable: true + created: + type: string + format: date-time + modified: + type: string + format: date-time + nullable: true + deleted: + type: boolean + default: false + ship_list: + type: array + items: + $ref: '#/components/schemas/ship' + notification: + type: object + description: a notification created by the engine if a times entry violates a rule + properties: + id: + type: integer + times_id: + type: integer + participant_id: + type: integer + notification_type: + $ref: '#/components/schemas/NotificationType' + timestamp: + type: string + format: date-time + acknowledged: + type: boolean + created: + type: string + format: date-time + modified: + type: string + format: date-time + nullable: true + participant: + type: object + description: A organisational entity that participates in Bremen Calling + properties: + id: + type: integer + name: + type: string + maxLength: 128 + street: + type: string + maxLength: 128 + postal code: + type: string + maxLength: 5 + city: + type: string + maxLength: 64 + type: + type: integer + description: a logical combinat + flags: + type: integer + nullable: true + created: + type: string + format: date-time + modified: + type: string + format: date-time + nullable: true + deleted: + type: boolean + default: false + participant_list: + type: array + items: + $ref: '#/components/schemas/participant' + login_result: + type: object + description: result structure of a successful login attempt + properties: + id: + type: integer + participant_id: + type: integer + first_name: + type: string + last_name: + type: string + user_name: + type: string + user_phone: + type: string + user_email: + type: string + exp: + type: number + format: float + token: + type: string + user_details: + type: object + description: fields that a user may change + properties: + id: + type: integer + old_password: + type: string + nullable: true + new_password: + type: string + nullable: true + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + user_phone: + type: string + nullable: true + user_email: + type: string + nullable: true + Id: + type: object + description: A unique identifier for an entity + properties: + id: + type: integer + Error: + type: object + required: + - message + properties: + message: + description: A human readable error message + type: string + ShipcallType: + type: string + enum: + - undefined + - arrival + - departure + - shifting + x-internal: false + description: '' + NotificationType: + type: string + enum: + - undefined + - email + - push + ParticipantType: + type: integer + enum: + - 1 + - 2 + - 4 + - 8 + - 16 + - 32 + - 64 + x-enumDescriptions: + '1': bsmd + '2': terminal + '4': pilot + '8': agency + '16': mooring + '32': port_authority + '64': tug + ParticipantType2: + title: ParticipantType2 + x-stoplight: + id: whw0m8x8dq6cg + type: integer + oneOf: + - const: 1 + title: bsmd + description: Bremen Schiffsmeldedienst + - const: 2 + title: terminal + description: Terminal + - const: 4 + title: pilot + description: Pilot + - const: 8 + title: agency + description: Agency + - const: 16 + title: mooring + description: Mooring + - const: 32 + title: port_authority + description: Port Authority + - const: 64 + title: tug + description: Tug + description: Enumeration that can take particular values + securitySchemes: + ApiKey: + type: apiKey + in: header + name: Authorization + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Id' + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/Id' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Service unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' security: - - ApiKey: [] + - ApiKey: [] externalDocs: - url: http://textbausteine.net/ - description: Extra documentation and conditions for Bremen Calling + url: 'http://textbausteine.net/' + description: Extra documentation and conditions for Bremen Calling +x-internal: true