/// <summary>
 /// Refreshes the access token.
 /// </summary>
 /// <remarks>
 /// Called when the access token has expired.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TokenResponse> RefreshTokenAsync(this IPlatformEndpoints operations, RefreshTokenRequest body = default(RefreshTokenRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RefreshTokenWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Searches for recommendations.
 /// </summary>
 /// <remarks>
 /// Retrieves recommendations according to the status.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='statusId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RecommendationsList> GetRecommendationsAsync(this IPlatformEndpoints operations, int statusId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetRecommendationsWithHttpMessagesAsync(statusId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Accepts the status change request.
 /// </summary>
 /// <remarks>
 /// Called when the user accepts the status change request.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UserProfileResponse> AcceptStatusChangeAsync(this IPlatformEndpoints operations, AcceptRequest body = default(AcceptRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AcceptStatusChangeWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Registers the user as a doctor.
 /// </summary>
 /// <remarks>
 /// Called when a user wants to register as a doctor.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UserProfileResponse> RegisterMedicalAsync(this IPlatformEndpoints operations, RegisterDoctorRequest body = default(RegisterDoctorRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RegisterMedicalWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initiates a status change request.
 /// </summary>
 /// <remarks>
 /// Called when a doctor initiates a status change request.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MedicalCode> InitStatusChangeAsync(this IPlatformEndpoints operations, ChangeRequest body = default(ChangeRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.InitStatusChangeWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the user profile.
 /// </summary>
 /// <remarks>
 /// Called whenever the mobile needs the user state and profile metadata.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UserProfileResponse> GetUserProfileAsync(this IPlatformEndpoints operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetUserProfileWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Refreshes the access token.
 /// </summary>
 /// <remarks>
 /// Called when the access token has expired.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static TokenResponse RefreshToken(this IPlatformEndpoints operations, RefreshTokenRequest body = default(RefreshTokenRequest))
 {
     return(operations.RefreshTokenAsync(body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Searches for recommendations.
 /// </summary>
 /// <remarks>
 /// Retrieves recommendations according to the status.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='statusId'>
 /// </param>
 public static RecommendationsList GetRecommendations(this IPlatformEndpoints operations, int statusId)
 {
     return(operations.GetRecommendationsAsync(statusId).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Accepts the status change request.
 /// </summary>
 /// <remarks>
 /// Called when the user accepts the status change request.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static UserProfileResponse AcceptStatusChange(this IPlatformEndpoints operations, AcceptRequest body = default(AcceptRequest))
 {
     return(operations.AcceptStatusChangeAsync(body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Registers the user.
 /// </summary>
 /// <remarks>
 /// Called on initial registration. Validate the uniqueness of the user token.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static TokenAndProfileResponse RegisterUser(this IPlatformEndpoints operations, RegisterRequest body = default(RegisterRequest))
 {
     return(operations.RegisterUserAsync(body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initiates a status change request.
 /// </summary>
 /// <remarks>
 /// Called when a doctor initiates a status change request.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static MedicalCode InitStatusChange(this IPlatformEndpoints operations, ChangeRequest body = default(ChangeRequest))
 {
     return(operations.InitStatusChangeAsync(body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Setups push notifications.
 /// </summary>
 /// <remarks>
 /// Called by the mobile to share the push notification token and mobile OS
 /// identification.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task SetupNotificationsAsync(this IPlatformEndpoints operations, NotificationInfo body = default(NotificationInfo), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.SetupNotificationsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Setups push notifications.
 /// </summary>
 /// <remarks>
 /// Called by the mobile to share the push notification token and mobile OS
 /// identification.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static void SetupNotifications(this IPlatformEndpoints operations, NotificationInfo body = default(NotificationInfo))
 {
     operations.SetupNotificationsAsync(body).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Registers the user as a doctor.
 /// </summary>
 /// <remarks>
 /// Called when a user wants to register as a doctor.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static UserProfileResponse RegisterMedical(this IPlatformEndpoints operations, RegisterDoctorRequest body = default(RegisterDoctorRequest))
 {
     return(operations.RegisterMedicalAsync(body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the user profile.
 /// </summary>
 /// <remarks>
 /// Called whenever the mobile needs the user state and profile metadata.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static UserProfileResponse GetUserProfile(this IPlatformEndpoints operations)
 {
     return(operations.GetUserProfileAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Logins the user.
 /// </summary>
 /// <remarks>
 /// Called when an existing user reinstalls the app.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static LoginResponse Login(this IPlatformEndpoints operations, LoginRequest body = default(LoginRequest))
 {
     return(operations.LoginAsync(body).GetAwaiter().GetResult());
 }