Changeset 3d5e60ea4d83…
by Thai Nguyen
Changes to 94 files · Browse files at 3d5e60ea4d83 Diff from another changeset...
|
|
|
@@ -0,0 +1,25 @@ + 
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.329
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NexportApi", "NexportApi\NexportApi.csproj", "{0EF49E24-0A45-402B-AF46-C39850E46DF1}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0EF49E24-0A45-402B-AF46-C39850E46DF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0EF49E24-0A45-402B-AF46-C39850E46DF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0EF49E24-0A45-402B-AF46-C39850E46DF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0EF49E24-0A45-402B-AF46-C39850E46DF1}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {B4918B87-912F-49D8-9AC0-890CBCCEB2F9}
+ EndGlobalSection
+EndGlobal
|
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
|
|
@@ -0,0 +1,259 @@ + /*
+ * NexportVirtualCampus
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: v1
+ *
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Threading.Tasks;
+using RestSharp;
+using NexportApi.Client;
+using NexportApi.Model;
+
+namespace NexportApi.Api
+{
+ /// <summary>
+ /// Represents a collection of functions to interact with the API endpoints
+ /// </summary>
+ public interface IPostmanApiApi : IApiAccessor
+ {
+ #region Synchronous Operations
+
+ /// <summary>
+ /// Get a postman collection of all visible Api (Get the [POSTMAN](http://www.getpostman.com) chrome extension)
+ /// </summary>
+ /// <remarks>
+ /// Get a postman collection of all visible api
+ /// </remarks>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <returns>PostmanCollectionGet</returns>
+ PostmanCollectionGet PostmanApiGetPostmanCollection();
+
+ /// <summary>
+ /// Get a postman collection of all visible Api (Get the [POSTMAN](http://www.getpostman.com) chrome extension)
+ /// </summary>
+ /// <remarks>
+ /// Get a postman collection of all visible api
+ /// </remarks>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <returns>ApiResponse of PostmanCollectionGet</returns>
+ ApiResponse<PostmanCollectionGet> PostmanApiGetPostmanCollectionWithHttpInfo();
+
+
+ #endregion Synchronous Operations
+
+ #region Asynchronous Operations
+
+ /// <summary>
+ /// Get a postman collection of all visible Api (Get the [POSTMAN](http://www.getpostman.com) chrome extension)
+ /// </summary>
+ /// <remarks>
+ /// Get a postman collection of all visible api
+ /// </remarks>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <returns>Task of PostmanCollectionGet</returns>
+ Task<PostmanCollectionGet> PostmanApiGetPostmanCollectionAsync();
+
+ /// <summary>
+ /// Get a postman collection of all visible Api (Get the [POSTMAN](http://www.getpostman.com) chrome extension)
+ /// </summary>
+ /// <remarks>
+ /// Get a postman collection of all visible api
+ /// </remarks>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <returns>Task of ApiResponse (PostmanCollectionGet)</returns>
+ Task<ApiResponse<PostmanCollectionGet>> PostmanApiGetPostmanCollectionAsyncWithHttpInfo();
+
+
+ #endregion Asynchronous Operations
+ }
+
+ /// <summary>
+ /// Represents a collection of functions to interact with the API endpoints
+ /// </summary>
+ public class PostmanApiApi : IPostmanApiApi
+ {
+ private ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PostmanApiApi"/> class.
+ /// </summary>
+ /// <returns></returns>
+ public PostmanApiApi(string basePath)
+ {
+ Configuration = new Configuration { BasePath = basePath };
+
+ ExceptionFactory = Configuration.DefaultExceptionFactory;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PostmanApiApi"/> class
+ /// using Configuration object
+ /// </summary>
+ /// <param name="configuration">An instance of Configuration</param>
+ /// <returns></returns>
+ public PostmanApiApi(Configuration configuration = null)
+ {
+ Configuration = configuration ?? Configuration.Default;
+
+ ExceptionFactory = Configuration.DefaultExceptionFactory;
+ }
+
+ /// <summary>
+ /// Gets the base path of the API client.
+ /// </summary>
+ /// <value>The base path</value>
+ public string GetBasePath()
+ {
+ return Configuration.ApiClient.RestClient.BaseUrl.ToString();
+ }
+
+ /// <summary>
+ /// Gets or sets the configuration object
+ /// </summary>
+ /// <value>An instance of the Configuration</value>
+ public Configuration Configuration {get; set;}
+
+ /// <summary>
+ /// Provides a factory method hook for the creation of exceptions.
+ /// </summary>
+ public ExceptionFactory ExceptionFactory
+ {
+ get
+ {
+ if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
+ {
+ throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
+ }
+ return _exceptionFactory;
+ }
+
+ set => _exceptionFactory = value;
+ }
+
+ /// <summary>
+ /// Get a postman collection of all visible Api (Get the [POSTMAN](http://www.getpostman.com) chrome extension) Get a postman collection of all visible api
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <returns>PostmanCollectionGet</returns>
+ public PostmanCollectionGet PostmanApiGetPostmanCollection ()
+ {
+ var localVarResponse = PostmanApiGetPostmanCollectionWithHttpInfo();
+ return localVarResponse.Data;
+ }
+
+ /// <summary>
+ /// Get a postman collection of all visible Api (Get the [POSTMAN](http://www.getpostman.com) chrome extension) Get a postman collection of all visible api
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <returns>ApiResponse of PostmanCollectionGet</returns>
+ public ApiResponse< PostmanCollectionGet > PostmanApiGetPostmanCollectionWithHttpInfo()
+ {
+
+ var localVarPath = "/api/v1/PostmanApi/GetPostmanCollection";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+
+
+ // make the HTTP request
+ var localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
+ Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("PostmanApiGetPostmanCollection", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<PostmanCollectionGet>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (PostmanCollectionGet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostmanCollectionGet)));
+ }
+
+ /// <summary>
+ /// Get a postman collection of all visible Api (Get the [POSTMAN](http://www.getpostman.com) chrome extension) Get a postman collection of all visible api
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <returns>Task of PostmanCollectionGet</returns>
+ public async System.Threading.Tasks.Task<PostmanCollectionGet> PostmanApiGetPostmanCollectionAsync ()
+ {
+ var localVarResponse = await PostmanApiGetPostmanCollectionAsyncWithHttpInfo();
+ return localVarResponse.Data;
+
+ }
+
+ /// <summary>
+ /// Get a postman collection of all visible Api (Get the [POSTMAN](http://www.getpostman.com) chrome extension) Get a postman collection of all visible api
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <returns>Task of ApiResponse (PostmanCollectionGet)</returns>
+ public async System.Threading.Tasks.Task<ApiResponse<PostmanCollectionGet>> PostmanApiGetPostmanCollectionAsyncWithHttpInfo()
+ {
+
+ var localVarPath = "/api/v1/PostmanApi/GetPostmanCollection";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+
+
+ // make the HTTP request
+ IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
+ Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("PostmanApiGetPostmanCollection", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<PostmanCollectionGet>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (PostmanCollectionGet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostmanCollectionGet)));
+ }
+
+ }
+}
|
|
|
@@ -0,0 +1,512 @@ + /*
+ * NexportVirtualCampus
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: v1
+ *
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Threading.Tasks;
+using RestSharp;
+using NexportApi.Client;
+using NexportApi.Model;
+
+namespace NexportApi.Api
+{
+ /// <summary>
+ /// Represents a collection of functions to interact with the API endpoints
+ /// </summary>
+ public interface IScormApiApi : IApiAccessor
+ {
+ #region Synchronous Operations
+
+ /// <summary>
+ /// Edits data for a student's SCORM courseware attempt and corresponding history (if applicable) based on the supplied assignment status id and SCO id. If a field is not passed in, the value will remain unchanged. Requires the Update Section Enrollments permission in the assignment status enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains assignment status id, sco id, and relevant fields to edit</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>EditScormDataResponse</returns>
+ EditScormDataResponse ScormApiEditScormData(EditScormDataRequest request, string accessToken);
+
+ /// <summary>
+ /// Edits data for a student's SCORM courseware attempt and corresponding history (if applicable) based on the supplied assignment status id and SCO id. If a field is not passed in, the value will remain unchanged. Requires the Update Section Enrollments permission in the assignment status enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains assignment status id, sco id, and relevant fields to edit</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>ApiResponse of EditScormDataResponse</returns>
+ ApiResponse<EditScormDataResponse> ScormApiEditScormDataWithHttpInfo(EditScormDataRequest request, string accessToken);
+
+ /// <summary>
+ /// Gets data for the specified SCORM CMI fields based on the element names. Results are ordered alphabetically by SCO ID. Requires the View Section Enrollments permission in the enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains list of CMI element names</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <param name="page">Which page of results to start on (optional)</param>
+ /// <param name="perPage">How many results to show per page (optional)</param>
+ /// <returns>List<GetCmiDataResponseItem></returns>
+ List<GetCmiDataResponseItem> ScormApiGetCmiData(GetCmiDataRequest request, string accessToken, int? page = null, int? perPage = null);
+
+ /// <summary>
+ /// Gets data for the specified SCORM CMI fields based on the element names. Results are ordered alphabetically by SCO ID. Requires the View Section Enrollments permission in the enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains list of CMI element names</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <param name="page">Which page of results to start on (optional)</param>
+ /// <param name="perPage">How many results to show per page (optional)</param>
+ /// <returns>ApiResponse of List<GetCmiDataResponseItem></returns>
+ ApiResponse<List<GetCmiDataResponseItem>> ScormApiGetCmiDataWithHttpInfo(GetCmiDataRequest request, string accessToken, int? page = null, int? perPage = null);
+
+
+ #endregion Synchronous Operations
+
+ #region Asynchronous Operations
+
+ /// <summary>
+ /// Edits data for a student's SCORM courseware attempt and corresponding history (if applicable) based on the supplied assignment status id and SCO id. If a field is not passed in, the value will remain unchanged. Requires the Update Section Enrollments permission in the assignment status enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains assignment status id, sco id, and relevant fields to edit</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of EditScormDataResponse</returns>
+ Task<EditScormDataResponse> ScormApiEditScormDataAsync(EditScormDataRequest request, string accessToken);
+
+ /// <summary>
+ /// Edits data for a student's SCORM courseware attempt and corresponding history (if applicable) based on the supplied assignment status id and SCO id. If a field is not passed in, the value will remain unchanged. Requires the Update Section Enrollments permission in the assignment status enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains assignment status id, sco id, and relevant fields to edit</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of ApiResponse (EditScormDataResponse)</returns>
+ Task<ApiResponse<EditScormDataResponse>> ScormApiEditScormDataAsyncWithHttpInfo(EditScormDataRequest request, string accessToken);
+
+ /// <summary>
+ /// Gets data for the specified SCORM CMI fields based on the element names. Results are ordered alphabetically by SCO ID. Requires the View Section Enrollments permission in the enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains list of CMI element names</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <param name="page">Which page of results to start on (optional)</param>
+ /// <param name="perPage">How many results to show per page (optional)</param>
+ /// <returns>Task of List<GetCmiDataResponseItem></returns>
+ Task<List<GetCmiDataResponseItem>> ScormApiGetCmiDataAsync(GetCmiDataRequest request, string accessToken, int? page = null, int? perPage = null);
+
+ /// <summary>
+ /// Gets data for the specified SCORM CMI fields based on the element names. Results are ordered alphabetically by SCO ID. Requires the View Section Enrollments permission in the enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains list of CMI element names</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <param name="page">Which page of results to start on (optional)</param>
+ /// <param name="perPage">How many results to show per page (optional)</param>
+ /// <returns>Task of ApiResponse (List<GetCmiDataResponseItem>)</returns>
+ Task<ApiResponse<List<GetCmiDataResponseItem>>> ScormApiGetCmiDataAsyncWithHttpInfo(GetCmiDataRequest request, string accessToken, int? page = null, int? perPage = null);
+
+
+ #endregion Asynchronous Operations
+ }
+
+ /// <summary>
+ /// Represents a collection of functions to interact with the API endpoints
+ /// </summary>
+ public class ScormApiApi : IScormApiApi
+ {
+ private ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ScormApiApi"/> class.
+ /// </summary>
+ /// <returns></returns>
+ public ScormApiApi(string basePath)
+ {
+ Configuration = new Configuration { BasePath = basePath };
+
+ ExceptionFactory = Configuration.DefaultExceptionFactory;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ScormApiApi"/> class
+ /// using Configuration object
+ /// </summary>
+ /// <param name="configuration">An instance of Configuration</param>
+ /// <returns></returns>
+ public ScormApiApi(Configuration configuration = null)
+ {
+ Configuration = configuration ?? Configuration.Default;
+
+ ExceptionFactory = Configuration.DefaultExceptionFactory;
+ }
+
+ /// <summary>
+ /// Gets the base path of the API client.
+ /// </summary>
+ /// <value>The base path</value>
+ public string GetBasePath()
+ {
+ return Configuration.ApiClient.RestClient.BaseUrl.ToString();
+ }
+
+ /// <summary>
+ /// Gets or sets the configuration object
+ /// </summary>
+ /// <value>An instance of the Configuration</value>
+ public Configuration Configuration {get; set;}
+
+ /// <summary>
+ /// Provides a factory method hook for the creation of exceptions.
+ /// </summary>
+ public ExceptionFactory ExceptionFactory
+ {
+ get
+ {
+ if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
+ {
+ throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
+ }
+ return _exceptionFactory;
+ }
+
+ set => _exceptionFactory = value;
+ }
+
+ /// <summary>
+ /// Edits data for a student's SCORM courseware attempt and corresponding history (if applicable) based on the supplied assignment status id and SCO id. If a field is not passed in, the value will remain unchanged. Requires the Update Section Enrollments permission in the assignment status enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains assignment status id, sco id, and relevant fields to edit</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>EditScormDataResponse</returns>
+ public EditScormDataResponse ScormApiEditScormData (EditScormDataRequest request, string accessToken)
+ {
+ var localVarResponse = ScormApiEditScormDataWithHttpInfo(request, accessToken);
+ return localVarResponse.Data;
+ }
+
+ /// <summary>
+ /// Edits data for a student's SCORM courseware attempt and corresponding history (if applicable) based on the supplied assignment status id and SCO id. If a field is not passed in, the value will remain unchanged. Requires the Update Section Enrollments permission in the assignment status enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains assignment status id, sco id, and relevant fields to edit</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>ApiResponse of EditScormDataResponse</returns>
+ public ApiResponse< EditScormDataResponse > ScormApiEditScormDataWithHttpInfo(EditScormDataRequest request, string accessToken)
+ {
+ // verify the required parameter 'request' is set
+ if (request == null)
+ throw new ApiException(400, "Missing required parameter 'request' when calling ScormApiApi->ScormApiEditScormData");
+ // verify the required parameter 'accessToken' is set
+ if (accessToken == null)
+ throw new ApiException(400, "Missing required parameter 'accessToken' when calling ScormApiApi->ScormApiEditScormData");
+
+ var localVarPath = "/api/v1/ScormApi/EditScormData";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (accessToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "access_token", accessToken)); // query parameter
+ if (request != null && request.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = Configuration.ApiClient.Serialize(request); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = request; // byte array
+ }
+
+
+ // make the HTTP request
+ var localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
+ Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("ScormApiEditScormData", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<EditScormDataResponse>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (EditScormDataResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(EditScormDataResponse)));
+ }
+
+ /// <summary>
+ /// Edits data for a student's SCORM courseware attempt and corresponding history (if applicable) based on the supplied assignment status id and SCO id. If a field is not passed in, the value will remain unchanged. Requires the Update Section Enrollments permission in the assignment status enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains assignment status id, sco id, and relevant fields to edit</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of EditScormDataResponse</returns>
+ public async System.Threading.Tasks.Task<EditScormDataResponse> ScormApiEditScormDataAsync (EditScormDataRequest request, string accessToken)
+ {
+ var localVarResponse = await ScormApiEditScormDataAsyncWithHttpInfo(request, accessToken);
+ return localVarResponse.Data;
+
+ }
+
+ /// <summary>
+ /// Edits data for a student's SCORM courseware attempt and corresponding history (if applicable) based on the supplied assignment status id and SCO id. If a field is not passed in, the value will remain unchanged. Requires the Update Section Enrollments permission in the assignment status enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains assignment status id, sco id, and relevant fields to edit</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of ApiResponse (EditScormDataResponse)</returns>
+ public async System.Threading.Tasks.Task<ApiResponse<EditScormDataResponse>> ScormApiEditScormDataAsyncWithHttpInfo(EditScormDataRequest request, string accessToken)
+ {
+ // verify the required parameter 'request' is set
+ if (request == null)
+ throw new ApiException(400, "Missing required parameter 'request' when calling ScormApiApi->ScormApiEditScormData");
+ // verify the required parameter 'accessToken' is set
+ if (accessToken == null)
+ throw new ApiException(400, "Missing required parameter 'accessToken' when calling ScormApiApi->ScormApiEditScormData");
+
+ var localVarPath = "/api/v1/ScormApi/EditScormData";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (accessToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "access_token", accessToken)); // query parameter
+ if (request != null && request.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = Configuration.ApiClient.Serialize(request); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = request; // byte array
+ }
+
+
+ // make the HTTP request
+ IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
+ Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("ScormApiEditScormData", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<EditScormDataResponse>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (EditScormDataResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(EditScormDataResponse)));
+ }
+
+ /// <summary>
+ /// Gets data for the specified SCORM CMI fields based on the element names. Results are ordered alphabetically by SCO ID. Requires the View Section Enrollments permission in the enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains list of CMI element names</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <param name="page">Which page of results to start on (optional)</param>
+ /// <param name="perPage">How many results to show per page (optional)</param>
+ /// <returns>List<GetCmiDataResponseItem></returns>
+ public List<GetCmiDataResponseItem> ScormApiGetCmiData (GetCmiDataRequest request, string accessToken, int? page = null, int? perPage = null)
+ {
+ var localVarResponse = ScormApiGetCmiDataWithHttpInfo(request, accessToken, page, perPage);
+ return localVarResponse.Data;
+ }
+
+ /// <summary>
+ /// Gets data for the specified SCORM CMI fields based on the element names. Results are ordered alphabetically by SCO ID. Requires the View Section Enrollments permission in the enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains list of CMI element names</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <param name="page">Which page of results to start on (optional)</param>
+ /// <param name="perPage">How many results to show per page (optional)</param>
+ /// <returns>ApiResponse of List<GetCmiDataResponseItem></returns>
+ public ApiResponse< List<GetCmiDataResponseItem> > ScormApiGetCmiDataWithHttpInfo(GetCmiDataRequest request, string accessToken, int? page = null, int? perPage = null)
+ {
+ // verify the required parameter 'request' is set
+ if (request == null)
+ throw new ApiException(400, "Missing required parameter 'request' when calling ScormApiApi->ScormApiGetCmiData");
+ // verify the required parameter 'accessToken' is set
+ if (accessToken == null)
+ throw new ApiException(400, "Missing required parameter 'accessToken' when calling ScormApiApi->ScormApiGetCmiData");
+
+ var localVarPath = "/api/v1/ScormApi/GetCmiData";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (page != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "page", page)); // query parameter
+ if (perPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "per_page", perPage)); // query parameter
+ if (accessToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "access_token", accessToken)); // query parameter
+ if (request != null && request.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = Configuration.ApiClient.Serialize(request); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = request; // byte array
+ }
+
+
+ // make the HTTP request
+ var localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
+ Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("ScormApiGetCmiData", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<List<GetCmiDataResponseItem>>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (List<GetCmiDataResponseItem>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<GetCmiDataResponseItem>)));
+ }
+
+ /// <summary>
+ /// Gets data for the specified SCORM CMI fields based on the element names. Results are ordered alphabetically by SCO ID. Requires the View Section Enrollments permission in the enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains list of CMI element names</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <param name="page">Which page of results to start on (optional)</param>
+ /// <param name="perPage">How many results to show per page (optional)</param>
+ /// <returns>Task of List<GetCmiDataResponseItem></returns>
+ public async System.Threading.Tasks.Task<List<GetCmiDataResponseItem>> ScormApiGetCmiDataAsync (GetCmiDataRequest request, string accessToken, int? page = null, int? perPage = null)
+ {
+ var localVarResponse = await ScormApiGetCmiDataAsyncWithHttpInfo(request, accessToken, page, perPage);
+ return localVarResponse.Data;
+
+ }
+
+ /// <summary>
+ /// Gets data for the specified SCORM CMI fields based on the element names. Results are ordered alphabetically by SCO ID. Requires the View Section Enrollments permission in the enrollment organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="request">Contains list of CMI element names</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <param name="page">Which page of results to start on (optional)</param>
+ /// <param name="perPage">How many results to show per page (optional)</param>
+ /// <returns>Task of ApiResponse (List<GetCmiDataResponseItem>)</returns>
+ public async System.Threading.Tasks.Task<ApiResponse<List<GetCmiDataResponseItem>>> ScormApiGetCmiDataAsyncWithHttpInfo(GetCmiDataRequest request, string accessToken, int? page = null, int? perPage = null)
+ {
+ // verify the required parameter 'request' is set
+ if (request == null)
+ throw new ApiException(400, "Missing required parameter 'request' when calling ScormApiApi->ScormApiGetCmiData");
+ // verify the required parameter 'accessToken' is set
+ if (accessToken == null)
+ throw new ApiException(400, "Missing required parameter 'accessToken' when calling ScormApiApi->ScormApiGetCmiData");
+
+ var localVarPath = "/api/v1/ScormApi/GetCmiData";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (page != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "page", page)); // query parameter
+ if (perPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "per_page", perPage)); // query parameter
+ if (accessToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "access_token", accessToken)); // query parameter
+ if (request != null && request.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = Configuration.ApiClient.Serialize(request); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = request; // byte array
+ }
+
+
+ // make the HTTP request
+ IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
+ Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("ScormApiGetCmiData", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<List<GetCmiDataResponseItem>>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (List<GetCmiDataResponseItem>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<GetCmiDataResponseItem>)));
+ }
+
+ }
+}
|
|
|
@@ -0,0 +1,492 @@ + /*
+ * NexportVirtualCampus
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: v1
+ *
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Threading.Tasks;
+using RestSharp;
+using NexportApi.Client;
+using NexportApi.Model;
+
+namespace NexportApi.Api
+{
+ /// <summary>
+ /// Represents a collection of functions to interact with the API endpoints
+ /// </summary>
+ public interface ISsoApiApi : IApiAccessor
+ {
+ #region Synchronous Operations
+
+ /// <summary>
+ /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="classroomSsoRequest">Contains option for chrome/nochrome and enrollment id</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>SsoResponse</returns>
+ SsoResponse SsoApiClassroom(ClassroomSsoRequest classroomSsoRequest, string accessToken);
+
+ /// <summary>
+ /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="classroomSsoRequest">Contains option for chrome/nochrome and enrollment id</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>ApiResponse of SsoResponse</returns>
+ ApiResponse<SsoResponse> SsoApiClassroomWithHttpInfo(ClassroomSsoRequest classroomSsoRequest, string accessToken);
+
+ /// <summary>
+ /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="ssoRequest">Request information</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>SsoResponse</returns>
+ SsoResponse SsoApiSignIn(SsoRequest ssoRequest, string accessToken);
+
+ /// <summary>
+ /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="ssoRequest">Request information</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>ApiResponse of SsoResponse</returns>
+ ApiResponse<SsoResponse> SsoApiSignInWithHttpInfo(SsoRequest ssoRequest, string accessToken);
+
+
+ #endregion Synchronous Operations
+
+ #region Asynchronous Operations
+
+ /// <summary>
+ /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="classroomSsoRequest">Contains option for chrome/nochrome and enrollment id</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of SsoResponse</returns>
+ Task<SsoResponse> SsoApiClassroomAsync(ClassroomSsoRequest classroomSsoRequest, string accessToken);
+
+ /// <summary>
+ /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="classroomSsoRequest">Contains option for chrome/nochrome and enrollment id</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of ApiResponse (SsoResponse)</returns>
+ Task<ApiResponse<SsoResponse>> SsoApiClassroomAsyncWithHttpInfo(ClassroomSsoRequest classroomSsoRequest, string accessToken);
+
+ /// <summary>
+ /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="ssoRequest">Request information</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of SsoResponse</returns>
+ Task<SsoResponse> SsoApiSignInAsync(SsoRequest ssoRequest, string accessToken);
+
+ /// <summary>
+ /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="ssoRequest">Request information</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of ApiResponse (SsoResponse)</returns>
+ Task<ApiResponse<SsoResponse>> SsoApiSignInAsyncWithHttpInfo(SsoRequest ssoRequest, string accessToken);
+
+
+ #endregion Asynchronous Operations
+ }
+
+ /// <summary>
+ /// Represents a collection of functions to interact with the API endpoints
+ /// </summary>
+ public class SsoApiApi : ISsoApiApi
+ {
+ private ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SsoApiApi"/> class.
+ /// </summary>
+ /// <returns></returns>
+ public SsoApiApi(string basePath)
+ {
+ Configuration = new Configuration { BasePath = basePath };
+
+ ExceptionFactory = Configuration.DefaultExceptionFactory;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SsoApiApi"/> class
+ /// using Configuration object
+ /// </summary>
+ /// <param name="configuration">An instance of Configuration</param>
+ /// <returns></returns>
+ public SsoApiApi(Configuration configuration = null)
+ {
+ Configuration = configuration ?? Configuration.Default;
+
+ ExceptionFactory = Configuration.DefaultExceptionFactory;
+ }
+
+ /// <summary>
+ /// Gets the base path of the API client.
+ /// </summary>
+ /// <value>The base path</value>
+ public string GetBasePath()
+ {
+ return Configuration.ApiClient.RestClient.BaseUrl.ToString();
+ }
+
+ /// <summary>
+ /// Gets or sets the configuration object
+ /// </summary>
+ /// <value>An instance of the Configuration</value>
+ public Configuration Configuration {get; set;}
+
+ /// <summary>
+ /// Provides a factory method hook for the creation of exceptions.
+ /// </summary>
+ public ExceptionFactory ExceptionFactory
+ {
+ get
+ {
+ if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
+ {
+ throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
+ }
+ return _exceptionFactory;
+ }
+
+ set => _exceptionFactory = value;
+ }
+
+ /// <summary>
+ /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="classroomSsoRequest">Contains option for chrome/nochrome and enrollment id</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>SsoResponse</returns>
+ public SsoResponse SsoApiClassroom (ClassroomSsoRequest classroomSsoRequest, string accessToken)
+ {
+ var localVarResponse = SsoApiClassroomWithHttpInfo(classroomSsoRequest, accessToken);
+ return localVarResponse.Data;
+ }
+
+ /// <summary>
+ /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="classroomSsoRequest">Contains option for chrome/nochrome and enrollment id</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>ApiResponse of SsoResponse</returns>
+ public ApiResponse< SsoResponse > SsoApiClassroomWithHttpInfo(ClassroomSsoRequest classroomSsoRequest, string accessToken)
+ {
+ // verify the required parameter 'classroomSsoRequest' is set
+ if (classroomSsoRequest == null)
+ throw new ApiException(400, "Missing required parameter 'classroomSsoRequest' when calling SsoApiApi->SsoApiClassroom");
+ // verify the required parameter 'accessToken' is set
+ if (accessToken == null)
+ throw new ApiException(400, "Missing required parameter 'accessToken' when calling SsoApiApi->SsoApiClassroom");
+
+ var localVarPath = "/api/v1/SsoApi/Classroom";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (accessToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "access_token", accessToken)); // query parameter
+ if (classroomSsoRequest != null && classroomSsoRequest.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = Configuration.ApiClient.Serialize(classroomSsoRequest); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = classroomSsoRequest; // byte array
+ }
+
+
+ // make the HTTP request
+ var localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
+ Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("SsoApiClassroom", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<SsoResponse>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (SsoResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SsoResponse)));
+ }
+
+ /// <summary>
+ /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="classroomSsoRequest">Contains option for chrome/nochrome and enrollment id</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of SsoResponse</returns>
+ public async System.Threading.Tasks.Task<SsoResponse> SsoApiClassroomAsync (ClassroomSsoRequest classroomSsoRequest, string accessToken)
+ {
+ var localVarResponse = await SsoApiClassroomAsyncWithHttpInfo(classroomSsoRequest, accessToken);
+ return localVarResponse.Data;
+
+ }
+
+ /// <summary>
+ /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="classroomSsoRequest">Contains option for chrome/nochrome and enrollment id</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of ApiResponse (SsoResponse)</returns>
+ public async System.Threading.Tasks.Task<ApiResponse<SsoResponse>> SsoApiClassroomAsyncWithHttpInfo(ClassroomSsoRequest classroomSsoRequest, string accessToken)
+ {
+ // verify the required parameter 'classroomSsoRequest' is set
+ if (classroomSsoRequest == null)
+ throw new ApiException(400, "Missing required parameter 'classroomSsoRequest' when calling SsoApiApi->SsoApiClassroom");
+ // verify the required parameter 'accessToken' is set
+ if (accessToken == null)
+ throw new ApiException(400, "Missing required parameter 'accessToken' when calling SsoApiApi->SsoApiClassroom");
+
+ var localVarPath = "/api/v1/SsoApi/Classroom";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (accessToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "access_token", accessToken)); // query parameter
+ if (classroomSsoRequest != null && classroomSsoRequest.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = Configuration.ApiClient.Serialize(classroomSsoRequest); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = classroomSsoRequest; // byte array
+ }
+
+
+ // make the HTTP request
+ IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
+ Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("SsoApiClassroom", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<SsoResponse>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (SsoResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SsoResponse)));
+ }
+
+ /// <summary>
+ /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="ssoRequest">Request information</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>SsoResponse</returns>
+ public SsoResponse SsoApiSignIn (SsoRequest ssoRequest, string accessToken)
+ {
+ var localVarResponse = SsoApiSignInWithHttpInfo(ssoRequest, accessToken);
+ return localVarResponse.Data;
+ }
+
+ /// <summary>
+ /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="ssoRequest">Request information</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>ApiResponse of SsoResponse</returns>
+ public ApiResponse< SsoResponse > SsoApiSignInWithHttpInfo(SsoRequest ssoRequest, string accessToken)
+ {
+ // verify the required parameter 'ssoRequest' is set
+ if (ssoRequest == null)
+ throw new ApiException(400, "Missing required parameter 'ssoRequest' when calling SsoApiApi->SsoApiSignIn");
+ // verify the required parameter 'accessToken' is set
+ if (accessToken == null)
+ throw new ApiException(400, "Missing required parameter 'accessToken' when calling SsoApiApi->SsoApiSignIn");
+
+ var localVarPath = "/api/v1/SsoApi/SignIn";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (accessToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "access_token", accessToken)); // query parameter
+ if (ssoRequest != null && ssoRequest.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = Configuration.ApiClient.Serialize(ssoRequest); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = ssoRequest; // byte array
+ }
+
+
+ // make the HTTP request
+ var localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
+ Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("SsoApiSignIn", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<SsoResponse>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (SsoResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SsoResponse)));
+ }
+
+ /// <summary>
+ /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="ssoRequest">Request information</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of SsoResponse</returns>
+ public async System.Threading.Tasks.Task<SsoResponse> SsoApiSignInAsync (SsoRequest ssoRequest, string accessToken)
+ {
+ var localVarResponse = await SsoApiSignInAsyncWithHttpInfo(ssoRequest, accessToken);
+ return localVarResponse.Data;
+
+ }
+
+ /// <summary>
+ /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.
+ /// </summary>
+ /// <exception cref="ApiException">Thrown when fails to make API call</exception>
+ /// <param name="ssoRequest">Request information</param>
+ /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param>
+ /// <returns>Task of ApiResponse (SsoResponse)</returns>
+ public async System.Threading.Tasks.Task<ApiResponse<SsoResponse>> SsoApiSignInAsyncWithHttpInfo(SsoRequest ssoRequest, string accessToken)
+ {
+ // verify the required parameter 'ssoRequest' is set
+ if (ssoRequest == null)
+ throw new ApiException(400, "Missing required parameter 'ssoRequest' when calling SsoApiApi->SsoApiSignIn");
+ // verify the required parameter 'accessToken' is set
+ if (accessToken == null)
+ throw new ApiException(400, "Missing required parameter 'accessToken' when calling SsoApiApi->SsoApiSignIn");
+
+ var localVarPath = "/api/v1/SsoApi/SignIn";
+ var localVarPathParams = new Dictionary<string, string>();
+ var localVarQueryParams = new List<KeyValuePair<string, string>>();
+ var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
+ var localVarFormParams = new Dictionary<string, string>();
+ var localVarFileParams = new Dictionary<string, FileParameter>();
+ object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ var localVarHttpContentTypes = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+ // to determine the Accept header
+ var localVarHttpHeaderAccepts = new string [] {
+ "application/json",
+ "text/json"
+ };
+ var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (accessToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "access_token", accessToken)); // query parameter
+ if (ssoRequest != null && ssoRequest.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = Configuration.ApiClient.Serialize(ssoRequest); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = ssoRequest; // byte array
+ }
+
+
+ // make the HTTP request
+ IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
+ Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarHttpContentType);
+
+ var localVarStatusCode = (int) localVarResponse.StatusCode;
+
+ var exception = ExceptionFactory?.Invoke("SsoApiSignIn", localVarResponse);
+ if (exception != null) throw exception;
+
+ return new ApiResponse<SsoResponse>(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+ (SsoResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SsoResponse)));
+ }
+
+ }
+}
|
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
|
@@ -0,0 +1,60 @@ + /*
+ * NexportVirtualCampus
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: v1
+ *
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ */
+
+using System;
+
+namespace NexportApi.Client
+{
+ /// <summary>
+ /// API Exception
+ /// </summary>
+ public class ApiException : Exception
+ {
+ /// <summary>
+ /// Gets or sets the error code (HTTP status code)
+ /// </summary>
+ /// <value>The error code (HTTP status code).</value>
+ public int ErrorCode { get; set; }
+
+ /// <summary>
+ /// Gets or sets the error content (body json object)
+ /// </summary>
+ /// <value>The error content (Http response body).</value>
+ public dynamic ErrorContent { get; private set; }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ApiException"/> class.
+ /// </summary>
+ public ApiException() {}
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ApiException"/> class.
+ /// </summary>
+ /// <param name="errorCode">HTTP status code.</param>
+ /// <param name="message">Error message.</param>
+ public ApiException(int errorCode, string message) : base(message)
+ {
+ this.ErrorCode = errorCode;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ApiException"/> class.
+ /// </summary>
+ /// <param name="errorCode">HTTP status code.</param>
+ /// <param name="message">Error message.</param>
+ /// <param name="errorContent">Error content.</param>
+ public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message)
+ {
+ this.ErrorCode = errorCode;
+ this.ErrorContent = errorContent;
+ }
+ }
+
+}
|
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
Change 1 of 1
|
||
---|---|---|
|
|
@@ -0,0 +1,392 @@ + /*
+ * NexportVirtualCampus
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: v1
+ *
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ */
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using SwaggerDateConverter = NexportApi.Client.SwaggerDateConverter;
+
+namespace NexportApi.Model
+{
+ /// <summary>
+ /// Contains information for a single custom enrollment field setting
+ /// </summary>
+ [DataContract]
+ public class GetDefaultCustomEnrollmentFieldSettingResponse : IEquatable<GetDefaultCustomEnrollmentFieldSettingResponse>, IValidatableObject
+ {
+ /// <summary>
+ /// Type of custom enrollment field.
+ /// None=0;
+ /// Text=1;
+ /// DateTime=2;
+ /// Boolean=3;
+ /// Numeric=4;
+ /// Email=5;
+ /// SelectDropDown=6;
+ /// DateOnly=7;
+ /// SelectCheckbox=8;
+ /// </summary>
+ /// <value>Type of custom enrollment field.
+ /// None=0;
+ /// Text=1;
+ /// DateTime=2;
+ /// Boolean=3;
+ /// Numeric=4;
+ /// Email=5;
+ /// SelectDropDown=6;
+ /// DateOnly=7;
+ /// SelectCheckbox=8;
+ /// </value>
+ public enum TypeEnum
+ {
+ /// <summary>
+ /// Enum None for value: 0
+ /// </summary>
+ [Display(Name = "None")]
+ None = 0,
+
+ /// <summary>
+ /// Enum Text for value: 1
+ /// </summary>
+ [Display(Name = "Text")]
+ Text = 1,
+
+ /// <summary>
+ /// Enum DateTime for value: 2
+ /// </summary>
+ [Display(Name = "Date time")]
+ DateTime = 2,
+
+ /// <summary>
+ /// Enum Boolean for value: 3
+ /// </summary>
+ [Display(Name = "Boolean")]
+ Boolean = 3,
+
+ /// <summary>
+ /// Enum Numeric for value: 4
+ /// </summary>
+ [Display(Name = "Numeric")]
+ Numeric = 4,
+
+ /// <summary>
+ /// Enum Email for value: 5
+ /// </summary>
+ [Display(Name = "Email")]
+ Email = 5,
+
+ /// <summary>
+ /// Enum SelectDropDown for value: 6
+ /// </summary>
+ [Display(Name = "Select dropdown")]
+ SelectDropDown = 6,
+
+ /// <summary>
+ /// Enum DateOnly for value: 7
+ /// </summary>
+ [Display(Name = "Date only")]
+ DateOnly = 7,
+
+ /// <summary>
+ /// Enum SelectCheckbox for value: 8
+ /// </summary>
+ [Display(Name = "Select checkbox")]
+ SelectCheckbox = 8
+ }
+
+ /// <summary>
+ /// Type of custom enrollment field.
+ /// None=0;
+ /// Text=1;
+ /// DateTime=2;
+ /// Boolean=3;
+ /// Numeric=4;
+ /// Email=5;
+ /// SelectDropDown=6;
+ /// DateOnly=7;
+ /// SelectCheckbox=8;
+ /// </summary>
+ /// <value>Type of custom enrollment field.
+ /// None=0;
+ /// Text=1;
+ /// DateTime=2;
+ /// Boolean=3;
+ /// Numeric=4;
+ /// Email=5;
+ /// SelectDropDown=6;
+ /// DateOnly=7;
+ /// SelectCheckbox=8;
+ /// </value>
+ [DataMember(Name="type", EmitDefaultValue=true)]
+ public TypeEnum Type { get; set; }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="GetDefaultCustomEnrollmentFieldSettingResponse" /> class.
+ /// </summary>
+ [JsonConstructor]
+ protected GetDefaultCustomEnrollmentFieldSettingResponse() { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="GetDefaultCustomEnrollmentFieldSettingResponse" /> class.
+ /// </summary>
+ /// <param name="fieldId">Id of the field this custom enrollment field setting corresponds to (required).</param>
+ /// <param name="name">Represents the name of the custom field (required).</param>
+ /// <param name="key">Key of the custom field (required).</param>
+ /// <param name="defaultValue">Custom field default value (required).</param>
+ /// <param name="settingOrgId">Id of the organization the default setting is in (required).</param>
+ /// <param name="settingOrgShortName">Short name of the organization the default setting is in (required).</param>
+ /// <param name="fieldOrgId">Id of the organization the setting field is in (required).</param>
+ /// <param name="fieldOrgShortName">Short name of the organization the setting field is in (required).</param>
+ /// <param name="type">Type of custom enrollment field this setting belongs to. None=0; Text=1; DateTime=2; Boolean=3; Numeric=4; Email=5; SelectDropDown=6; DateOnly=7; SelectCheckbox=8; (required).</param>
+ /// <param name="apiErrorEntity">Error information (required).</param>
+ public GetDefaultCustomEnrollmentFieldSettingResponse(string fieldId = default(string), string name = default(string), string key = default(string), string defaultValue = default(string), string settingOrgId = default(string), string settingOrgShortName = default(string), string fieldOrgId = default(string), string fieldOrgShortName = default(string), TypeEnum type = default(TypeEnum), ApiErrorEntity apiErrorEntity = default(ApiErrorEntity))
+ {
+ // to ensure "fieldId" is required (not null)
+ FieldId = fieldId ?? throw new InvalidDataException("fieldId is a required property for GetDefaultCustomEnrollmentFieldSettingResponse and cannot be null");;
+ // to ensure "name" is required (not null)
+ Name = name ?? throw new InvalidDataException("name is a required property for GetDefaultCustomEnrollmentFieldSettingResponse and cannot be null");;
+ // to ensure "key" is required (not null)
+ Key = key ?? throw new InvalidDataException("key is a required property for GetDefaultCustomEnrollmentFieldSettingResponse and cannot be null");;
+ // to ensure "defaultValue" is required (not null)
+ DefaultValue = defaultValue ?? throw new InvalidDataException("defaultValue is a required property for GetDefaultCustomEnrollmentFieldSettingResponse and cannot be null");;
+ // to ensure "settingOrgId" is required (not null)
+ SettingOrgId = settingOrgId ?? throw new InvalidDataException("settingOrgId is a required property for GetDefaultCustomEnrollmentFieldSettingResponse and cannot be null");;
+ // to ensure "settingOrgShortName" is required (not null)
+ SettingOrgShortName = settingOrgShortName ?? throw new InvalidDataException("settingOrgShortName is a required property for GetDefaultCustomEnrollmentFieldSettingResponse and cannot be null");;
+ // to ensure "fieldOrgId" is required (not null)
+ FieldOrgId = fieldOrgId ?? throw new InvalidDataException("fieldOrgId is a required property for GetDefaultCustomEnrollmentFieldSettingResponse and cannot be null");;
+ // to ensure "fieldOrgShortName" is required (not null)
+ FieldOrgShortName = fieldOrgShortName ?? throw new InvalidDataException("fieldOrgShortName is a required property for GetDefaultCustomEnrollmentFieldSettingResponse and cannot be null");;
+ // to ensure "type" is required (not null)
+ Type = type;
+ // to ensure "apiErrorEntity" is required (not null)
+ ApiErrorEntity = apiErrorEntity ?? throw new InvalidDataException("apiErrorEntity is a required property for GetDefaultCustomEnrollmentFieldSettingResponse and cannot be null");;
+ }
+
+ /// <summary>
+ /// Id of the field this custom enrollment field setting corresponds to
+ /// </summary>
+ /// <value>Id of the field this custom enrollment field setting corresponds to</value>
+ [DataMember(Name="field_id", EmitDefaultValue=false)]
+ public string FieldId { get; set; }
+
+ /// <summary>
+ /// Represents the name of the custom field
+ /// </summary>
+ /// <value>Represents the name of the custom field</value>
+ [DataMember(Name="name", EmitDefaultValue=false)]
+ public string Name { get; set; }
+
+ /// <summary>
+ /// Key of the custom field
+ /// </summary>
+ /// <value>Key of the custom field</value>
+ [DataMember(Name="key", EmitDefaultValue=false)]
+ public string Key { get; set; }
+
+ /// <summary>
+ /// Custom field default value
+ /// </summary>
+ /// <value>Custom field default value</value>
+ [DataMember(Name="default_value", EmitDefaultValue=false)]
+ public string DefaultValue { get; set; }
+
+ /// <summary>
+ /// Id of the organization the default setting is in
+ /// </summary>
+ /// <value>Id of the organization the default setting is in</value>
+ [DataMember(Name="setting_org_id", EmitDefaultValue=false)]
+ public string SettingOrgId { get; set; }
+
+ /// <summary>
+ /// Short name of the organization the default setting is in
+ /// </summary>
+ /// <value>Short name of the organization the default setting is in</value>
+ [DataMember(Name="setting_org_short_name", EmitDefaultValue=false)]
+ public string SettingOrgShortName { get; set; }
+
+ /// <summary>
+ /// Id of the organization the setting field is in
+ /// </summary>
+ /// <value>Id of the organization the setting field is in</value>
+ [DataMember(Name="field_org_id", EmitDefaultValue=false)]
+ public string FieldOrgId { get; set; }
+
+ /// <summary>
+ /// Short name of the organization the setting field is in
+ /// </summary>
+ /// <value>Short name of the organization the setting field is in</value>
+ [DataMember(Name="field_org_short_name", EmitDefaultValue=false)]
+ public string FieldOrgShortName { get; set; }
+
+
+ /// <summary>
+ /// Error information
+ /// </summary>
+ /// <value>Error information</value>
+ [DataMember(Name="api_error_entity", EmitDefaultValue=false)]
+ public ApiErrorEntity ApiErrorEntity { get; set; }
+
+ /// <summary>
+ /// Returns the string presentation of the object
+ /// </summary>
+ /// <returns>String presentation of the object</returns>
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class GetDefaultCustomEnrollmentFieldSettingResponse {\n");
+ sb.Append(" FieldId: ").Append(FieldId).Append("\n");
+ sb.Append(" Name: ").Append(Name).Append("\n");
+ sb.Append(" Key: ").Append(Key).Append("\n");
+ sb.Append(" DefaultValue: ").Append(DefaultValue).Append("\n");
+ sb.Append(" SettingOrgId: ").Append(SettingOrgId).Append("\n");
+ sb.Append(" SettingOrgShortName: ").Append(SettingOrgShortName).Append("\n");
+ sb.Append(" FieldOrgId: ").Append(FieldOrgId).Append("\n");
+ sb.Append(" FieldOrgShortName: ").Append(FieldOrgShortName).Append("\n");
+ sb.Append(" Type: ").Append(Type).Append("\n");
+ sb.Append(" ApiErrorEntity: ").Append(ApiErrorEntity).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ /// <summary>
+ /// Returns the JSON string presentation of the object
+ /// </summary>
+ /// <returns>JSON string presentation of the object</returns>
+ public virtual string ToJson()
+ {
+ return JsonConvert.SerializeObject(this, Formatting.Indented);
+ }
+
+ /// <summary>
+ /// Returns true if objects are equal
+ /// </summary>
+ /// <param name="input">Object to be compared</param>
+ /// <returns>Boolean</returns>
+ public override bool Equals(object input)
+ {
+ return Equals(input as GetDefaultCustomEnrollmentFieldSettingResponse);
+ }
+
+ /// <summary>
+ /// Returns true if GetDefaultCustomEnrollmentFieldSettingResponse instances are equal
+ /// </summary>
+ /// <param name="input">Instance of GetDefaultCustomEnrollmentFieldSettingResponse to be compared</param>
+ /// <returns>Boolean</returns>
+ public bool Equals(GetDefaultCustomEnrollmentFieldSettingResponse input)
+ {
+ if (input == null)
+ return false;
+
+ return
+ (
+ FieldId == input.FieldId ||
+ (FieldId != null &&
+ FieldId.Equals(input.FieldId))
+ ) &&
+ (
+ Name == input.Name ||
+ (Name != null &&
+ Name.Equals(input.Name))
+ ) &&
+ (
+ Key == input.Key ||
+ (Key != null &&
+ Key.Equals(input.Key))
+ ) &&
+ (
+ DefaultValue == input.DefaultValue ||
+ (DefaultValue != null &&
+ DefaultValue.Equals(input.DefaultValue))
+ ) &&
+ (
+ SettingOrgId == input.SettingOrgId ||
+ (SettingOrgId != null &&
+ SettingOrgId.Equals(input.SettingOrgId))
+ ) &&
+ (
+ SettingOrgShortName == input.SettingOrgShortName ||
+ (SettingOrgShortName != null &&
+ SettingOrgShortName.Equals(input.SettingOrgShortName))
+ ) &&
+ (
+ FieldOrgId == input.FieldOrgId ||
+ (FieldOrgId != null &&
+ FieldOrgId.Equals(input.FieldOrgId))
+ ) &&
+ (
+ FieldOrgShortName == input.FieldOrgShortName ||
+ (FieldOrgShortName != null &&
+ FieldOrgShortName.Equals(input.FieldOrgShortName))
+ ) &&
+ (
+ Type == input.Type ||
+ Type.Equals(input.Type)
+ ) &&
+ (
+ ApiErrorEntity == input.ApiErrorEntity ||
+ (ApiErrorEntity != null &&
+ ApiErrorEntity.Equals(input.ApiErrorEntity))
+ );
+ }
+
+ /// <summary>
+ /// Gets the hash code
+ /// </summary>
+ /// <returns>Hash code</returns>
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ var hashCode = 41;
+ if (FieldId != null)
+ hashCode = hashCode * 59 + FieldId.GetHashCode();
+ if (Name != null)
+ hashCode = hashCode * 59 + Name.GetHashCode();
+ if (Key != null)
+ hashCode = hashCode * 59 + Key.GetHashCode();
+ if (DefaultValue != null)
+ hashCode = hashCode * 59 + DefaultValue.GetHashCode();
+ if (SettingOrgId != null)
+ hashCode = hashCode * 59 + SettingOrgId.GetHashCode();
+ if (SettingOrgShortName != null)
+ hashCode = hashCode * 59 + SettingOrgShortName.GetHashCode();
+ if (FieldOrgId != null)
+ hashCode = hashCode * 59 + FieldOrgId.GetHashCode();
+ if (FieldOrgShortName != null)
+ hashCode = hashCode * 59 + FieldOrgShortName.GetHashCode();
+ if (Type != null)
+ hashCode = hashCode * 59 + Type.GetHashCode();
+ if (ApiErrorEntity != null)
+ hashCode = hashCode * 59 + ApiErrorEntity.GetHashCode();
+ return hashCode;
+ }
+ }
+
+ /// <summary>
+ /// To validate all properties of the instance
+ /// </summary>
+ /// <param name="validationContext">Validation context</param>
+ /// <returns>Validation Result</returns>
+ IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
+ }
+}
|
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
Loading...